ports/72713: [patch] dhcpd fails to start with dhcpd_chroot_enable="YES"

Hilko Meyer hilko.meyer at gmx.de
Thu Oct 14 22:10:32 UTC 2004


>Number:         72713
>Category:       ports
>Synopsis:       [patch] dhcpd fails to start with dhcpd_chroot_enable="YES"
>Confidential:   no
>Severity:       critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Oct 14 22:10:30 GMT 2004
>Closed-Date:
>Last-Modified:
>Originator:     Hilko Meyer
>Release:        FreeBSD 5.2.1-RELEASE-p9 i386
>Organization:
>Environment:
System: FreeBSD kirk.hochpass.uni-hannover.de 5.2.1-RELEASE-p9 FreeBSD 5.2.1-RELEASE-p9 #0: Sat Jul 3 22:30:56 CEST 2004 hilti at kirk.hochpass.uni-hannover.de:/usr/obj/usr/src/sys/KIRK i386
>Description:

net/isc-dhcp3-server fails to start with
the following settings in /etc/rc.conf

dhcpd_enable="YES"
dhcpd_flags="-q"
dhcpd_conf="/usr/local/etc/dhcpd.conf"
dhcpd_withumask="022"
dhcpd_chuser_enable="YES"
dhcpd_withuser="dhcpd"
dhcpd_withgroup="dhcpd"
dhcpd_chroot_enable="YES"
dhcpd_devfs_enable="YES"
dhcpd_rootdir="/var/db/dhcpd"

/usr/local/etc/rc.d/isc-dhcpd.sh start yeilds the following
failure:

rmdir: /var/db/dhcpd: Directory not empty
rc.d/isc-dhcpd.sh: WARNING: unable to remove directory /var/db/dhcpd
mount: /var/db/dhcpd/dev: No such file or directory
rc.d/isc-dhcpd.sh: ERROR: unable to mount /var/db/dhcpd/dev

The error is caused by the deletion of /var/db/dhcpd/dev at once after
its creation in the setup_chroot () function in the start script. 

>How-To-Repeat:

Set dhcpd_chroot_enable="YES" in /etc/rc.conf and start the dhcpd with
the installed start-script

>Fix:


--- dhcp.diff begins here ---
--- isc-dhcpd.sh	Wed Oct 13 21:10:31 2004
+++ rc.d/isc-dhcpd.sh.neu	Thu Oct 14 23:24:34 2004
@@ -443,7 +443,6 @@
 {
 	if checkyesno paranoia && checkyesno dhcpd_chroot_enable; then
 		safe_mkdir ${_dhcpd_rootdir} ${_dhcpd_devdir}/_ ${_dhcpd_confdir}
-		safe_rmdir ${_dhcpd_devdir}/_	# /_, so, .../dev is root owned.
 		if checkyesno dhcpd_devfs_enable; then
 			safe_mount ${_dhcpd_devdir}
 		else
--- dhcp.diff ends here ---


>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list