Browse Source

Add named_user and named_chroot variables to simplify chroot'd named

setup.
OPENBSD_2_4
millert 26 years ago
parent
commit
93121833ea
2 changed files with 16 additions and 4 deletions
  1. +12
    -2
      src/etc/rc
  2. +4
    -2
      src/etc/rc.conf

+ 12
- 2
src/etc/rc View File

@ -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


+ 4
- 2
src/etc/rc.conf View File

@ -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"

Loading…
Cancel
Save