diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 1998-06-03 16:04:09 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 1998-06-03 16:04:09 +0000 |
commit | fb99f1565f504b10dfd4c2ca1d2e4ae4883a16f4 (patch) | |
tree | 1cfe8241adf0f4658e324ecfe2e542e563583921 /etc | |
parent | 4c14b2c29860df694faf6f4d246c9f84d78980e7 (diff) |
Add named_user and named_chroot variables to simplify chroot'd named
setup.
Diffstat (limited to 'etc')
-rw-r--r-- | etc/rc | 14 | ||||
-rw-r--r-- | etc/rc.conf | 6 |
2 files changed, 16 insertions, 4 deletions
@@ -1,4 +1,4 @@ -# $OpenBSD: rc,v 1.73 1998/05/14 23:58:01 millert Exp $ +# $OpenBSD: rc,v 1.74 1998/06/03 16:04:07 millert Exp $ # System startup script run by init on autoboot # or after single-user. @@ -85,11 +85,21 @@ rm -f /var/spool/uucp/STST/* echo 'starting system logger' rm -f /dev/log +if [ "X${named_chroot}" != "X" -a "X${named_chroot}" != X"NO" ]; then + rm -f ${named_chroot}/dev/log + syslogd_flags="${syslogd_flags} -a ${named_chroot}/dev/log" +fi syslogd ${syslogd_flags} -# $named_flags is imported from /etc/rc.conf; +# $named_flags, $named_user, and $named_chroot are imported from /etc/rc.conf; # if $named_flags != NO, named is run. if [ "X${named_flags}" != X"NO" ]; then + if [ "X${named_user}" != "X" -a "X${named_user}" != X"root" ]; then + named_flags="-u ${named_user} ${named_flags}" + fi + if [ "X${named_chroot}" != "X" -a "X${named_chroot}" != X"NO" ]; then + named_flags="-t ${named_chroot} ${named_flags}" + fi echo 'starting named'; named $named_flags fi diff --git a/etc/rc.conf b/etc/rc.conf index 3051697ffda..4f37b12ad3a 100644 --- a/etc/rc.conf +++ b/etc/rc.conf @@ -1,6 +1,6 @@ #!/bin/sh - # -# $OpenBSD: rc.conf,v 1.20 1998/05/23 19:43:26 millert Exp $ +# $OpenBSD: rc.conf,v 1.21 1998/06/03 16:04:08 millert Exp $ # set these to "NO" to turn them off. otherwise, they're used as flags routed_flags=NO # for 'normal' use: routed_flags="-q" @@ -10,7 +10,7 @@ bootparamd_flags=NO # for 'normal' use: bootparamd_flags="" rbootd_flags=NO # for 'normal' use: rbootd_flags="" sendmail_flags=NO # for 'normal' use: sendmail_flags="-bd -q30m" smtpfwdd_flags=NO # for 'normal' use: smtpfwdd_flags="", no -bd above. -named_flags=NO # for 'normal' use: named_flags="-u named -t /var/named" +named_flags=NO # for 'normal' use: named_flags="" timed_flags=NO # for 'normal' use: timed_flags="" photurisd_flags=NO # for 'normal' use: photurisd_flags="" mopd_flags=NO # for 'normal' use: mopd_flags="-a" @@ -48,3 +48,5 @@ ipfilter_rules=/etc/ipf.rules # Rules for IP packet filtering ipnat_rules=/etc/ipnat.rules # Rules for Network Address Translation ipmon_flags=-s # To disable logging, use ipmon_flags=NO syslogd_flags= # add more flags, ie. -u -a /chroot/dev/log +named_user=named # Named should not run as root unless neccesary +named_chroot=/var/named # Where to chroot named unless set to "NO" |