Summary: | [patch] dhcpd fails to start with dhcpd_chroot_enable="YES" | ||||||
---|---|---|---|---|---|---|---|
Product: | Ports & Packages | Reporter: | Hilko Meyer <hilko.meyer> | ||||
Component: | Individual Port(s) | Assignee: | Pav Lucistnik <pav> | ||||
Status: | Closed FIXED | ||||||
Severity: | Affects Only Me | ||||||
Priority: | Normal | ||||||
Version: | Latest | ||||||
Hardware: | Any | ||||||
OS: | Any | ||||||
Attachments: |
|
Description
Hilko Meyer
2004-10-14 23:10:30 UTC
Dear maintainer of FreeBSD port net/isc-dhcp3-server, please take a look at http://www.freebsd.org/cgi/query-pr.cgi?q=72713 Do you approve this patch? -- Pav Lucistnik <pav@oook.cz> <pav@FreeBSD.org> May your arrow always find its mark. State Changed From-To: open->feedback Asked maintainer for approval. Responsible Changed From-To: freebsd-ports-bugs->pav Handle. > Dear maintainer of FreeBSD port net/isc-dhcp3-server, please take a look > at > > http://www.freebsd.org/cgi/query-pr.cgi?q=72713 > > Do you approve this patch? I prefer this one :) well, .../_ is a hack until I add getopts to safe_* functions one day. thanks anyway. Index: Makefile =================================================================== RCS file: /home/ncvs/ports/net/isc-dhcp3-server/Makefile,v retrieving revision 1.103 diff -u -I$Id.*$ -I$.+BSD.*$ -r1.103 Makefile --- Makefile 13 Oct 2004 00:17:49 -0000 1.103 +++ Makefile 16 Oct 2004 01:15:19 -0000 @@ -8,7 +8,7 @@ PORTNAME= dhcp PORTVERSION= 3.0.1.r14 -PORTREVISION= 5 +PORTREVISION= 6 CATEGORIES= net MASTER_SITES= ${MASTER_SITE_ISC} MASTER_SITE_SUBDIR= dhcp dhcp/dhcp-3.0-history Index: files/isc-dhcpd.sh.sample =================================================================== RCS file: /home/ncvs/ports/net/isc-dhcp3-server/files/isc-dhcpd.sh.sample,v retrieving revision 1.10 diff -u -I$Id.*$ -I$.+BSD.*$ -r1.10 isc-dhcpd.sh.sample --- files/isc-dhcpd.sh.sample 13 Oct 2004 00:17:49 -0000 1.10 +++ files/isc-dhcpd.sh.sample 16 Oct 2004 01:15:20 -0000 @@ -443,7 +443,7 @@ { 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. + # XXX /_ hack! so, .../dev is root owned. if checkyesno dhcpd_devfs_enable; then safe_mount ${_dhcpd_devdir} else @@ -540,7 +540,7 @@ safe_remove ${_dhcpd_conffile} if checkyesno dhcpd_devfs_enable; then safe_umount ${_dhcpd_devdir} - safe_rmdir ${_dhcpd_devdir} + safe_rmdir ${_dhcpd_devdir}/_ # XXX /_ hack! else safe_remove ${_dhcpd_devdir} fi Cyrille Lefevre -- mailto:cyrille.lefevre@laposte.net forgot the following unrelated fix : Index: files/isc-dhcpd.sh.sample =================================================================== RCS file: /home/ncvs/ports/net/isc-dhcp3-server/files/isc-dhcpd.sh.sample,v retrieving revision 1.10 diff -u -I$Id.*$ -I$.+BSD.*$ -r1.10 isc-dhcpd.sh.sample --- files/isc-dhcpd.sh.sample 13 Oct 2004 00:17:49 -0000 1.10 +++ files/isc-dhcpd.sh.sample 16 Oct 2004 01:46:31 -0000 @@ -268,7 +268,7 @@ local _user _group _home _shell _gecos _user=$1 _group=$2 _gecos=${3:-"& daemon"} - _home=${4:-/nonexistent} _shell=${5:-/sbin/nologin} + _home=${4:-/nonexistent} _shell=${5:-/usr/sbin/nologin} if [ -n "${_group}" ]; then if pw group show ${_group} 2>/dev/null; then Cyrille Lefevre -- mailto:cyrille.lefevre@laposte.net V so, 16. 10. 2004 v 03:47, Cyrille Lefevre pí¹e: > forgot the following unrelated fix : > > Index: files/isc-dhcpd.sh.sample > =================================================================== > RCS file: /home/ncvs/ports/net/isc-dhcp3-server/files/isc-dhcpd.sh.sample,v > retrieving revision 1.10 > diff -u -I$Id.*$ -I$.+BSD.*$ -r1.10 isc-dhcpd.sh.sample > --- files/isc-dhcpd.sh.sample 13 Oct 2004 00:17:49 -0000 1.10 > +++ files/isc-dhcpd.sh.sample 16 Oct 2004 01:46:31 -0000 > @@ -268,7 +268,7 @@ > local _user _group _home _shell _gecos > > _user=$1 _group=$2 _gecos=${3:-"& daemon"} > - _home=${4:-/nonexistent} _shell=${5:-/sbin/nologin} > + _home=${4:-/nonexistent} _shell=${5:-/usr/sbin/nologin} > > if [ -n "${_group}" ]; then > if pw group show ${_group} 2>/dev/null; then What about FreeBSD 4.x users who still have /sbin/nologin? Should this change be conditional on ${OSVERSION} perhaps? -- Pav Lucistnik <pav@oook.cz> <pav@FreeBSD.org> Me go and see Elves and all! Hooray! "Pav Lucistnik" <pav@FreeBSD.org> wrote: V so, 16. 10. 2004 v 03:47, Cyrille Lefevre píse: [snip] > What about FreeBSD 4.x users who still have /sbin/nologin? > Should this change be conditional on ${OSVERSION} perhaps? ok, ignore this for instance, I'll post a new follow-up later. however, do you know the OSVERSION to use ? thanks. Cyrille Lefevre. -- home: mailto:cyrille.lefevre@laposte.net On Oct 16, 2004 12:07:06 pm +0200, Pav Lucistnik wrote: hi, how about this patch ? Index: Makefile =================================================================== RCS file: /home/ncvs/ports/net/isc-dhcp3-server/Makefile,v retrieving revision 1.103 diff -u -I$Id.*$ -I$.+BSD.*$ -r1.103 Makefile --- Makefile 13 Oct 2004 00:17:49 -0000 1.103 +++ Makefile 17 Oct 2004 02:52:23 -0000 @@ -161,6 +161,11 @@ .endif REINPLACE_SUB= PREFIX=${PREFIX} RCSCRIPTS_SUB= PREFIX=${PREFIX} RC_SUBR=${RC_SUBR} +.if ${OSVERSION} >= 502100 +RCSCRIPTS_SUB+= NOLOGIN=/usr/sbin/nologin +.else +RCSCRIPTS_SUB+= NOLOGIN=/sbin/nologin +.endif .if !defined(WITHOUT_DHCP_PARANOIA) RCSCRIPTS_SUB+= PARANOIA=YES .else Index: files/isc-dhcpd.sh.sample =================================================================== RCS file: /home/ncvs/ports/net/isc-dhcp3-server/files/isc-dhcpd.sh.sample,v retrieving revision 1.10 diff -u -I$Id.*$ -I$.+BSD.*$ -r1.10 isc-dhcpd.sh.sample --- files/isc-dhcpd.sh.sample 13 Oct 2004 00:17:49 -0000 1.10 +++ files/isc-dhcpd.sh.sample 17 Oct 2004 02:52:24 -0000 @@ -268,7 +268,7 @@ local _user _group _home _shell _gecos _user=$1 _group=$2 _gecos=${3:-"& daemon"} - _home=${4:-/nonexistent} _shell=${5:-/sbin/nologin} + _home=${4:-/nonexistent} _shell=${5:-%%NOLOGIN%%} if [ -n "${_group}" ]; then if pw group show ${_group} 2>/dev/null; then Cyrille Lefevre -- mailto:cyrille.lefevre@laposte.net V ne, 17. 10. 2004 v 04:53, Cyrille Lefevre pí¹e: > hi, how about this patch ? This looks fine. -- Pav Lucistnik <pav@oook.cz> <pav@FreeBSD.org> A spoonful of curry, garlic and mustard helps the medicine go down... and come straight back up again. -- JLE on #angband State Changed From-To: feedback->closed Committed maintainer's version of patch. |