only allow the host owner to restart dns Reference: /n/atom/patch/applied2013/rdnsho Date: Sun Jun 23 18:16:16 CES 2013 Signed-off-by: quanstro@quanstro.net --- /rc/bin/restartdns Sun Jun 23 18:16:08 2013 +++ /rc/bin/restartdns Sun Jun 23 18:16:08 2013 @@ -71,6 +71,11 @@ } } +if(! ~ `{cat /dev/user} `{cat /dev/hostowner}){ + echo 'restartdns: must be hostowner' >[1=2]; + exit user +} + flagfmt='p,f' args=() if(! ifs=() eval `{aux/getflags $*} || ! ~ $#* 0){ @@ -104,7 +109,7 @@ unmount '#s/dns_net.alt' /net.alt/dns >[2=] rm -f '#s/dns' '#s/dns_net.alt' -$dns -N 20000 -s +$dns -N 30000 -s if(~ $sysname $recursive) $dns -sx /net.alt -f /lib/ndb/external if not