Date: Sat, 3 Jul 2004 05:57:55 +1000 (EST) From: Rob Byrnes <rbyrnes@postmark.net> To: FreeBSD-gnats-submit@FreeBSD.org Subject: ports/68647: ports/net/isc-dhcp3-server doesn't set piddir permissions properly Message-ID: <20040702195755.6A8D1262@erwin.homeunix.org> Resent-Message-ID: <200407040420.i644KPZW094623@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 68647 >Category: ports >Synopsis: ports/net/isc-dhcp3-server doesn't set piddir permissions properly >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sun Jul 04 04:20:25 GMT 2004 >Closed-Date: >Last-Modified: >Originator: Rob Byrnes >Release: FreeBSD 4.10-STABLE alpha >Organization: >Environment: System: FreeBSD erwin.homeunix.org 4.10-STABLE FreeBSD 4.10-STABLE #2: Sun Jun 6 16:37:14 EST 2004 root@erwin.number6:/usr/obj/usr/src/sys/ERWIN alpha >Description: Installed net/isc-dhcp3-server from the port with the default options DHCP_PARANOIA and DHCP_JAIL. When the server is started for the first time, with the dhcp_chuser option selected in the config, the pid dir /var/run/dhcpd is created, but the pidfile is not written to it, even though the server is running. chown-ing the pid dir to dhcpd:wheel allows the pid file to be written. Sample output: root@erwin:/root# ps ax | grep dhcp 57509 ?? Ss 0:00.00 /usr/local/sbin/dhcpd -cf /usr/local/etc/dhcpd.conf -lf /var/db/dhcpd/dhcpd.leases -pf /var/run/dhcpd/dhcpd.pid 57511 p1 RV 0:00.00 grep dhcp (csh) root@erwin:/root# ls -la /var/run total 116 drwxr-xr-x 7 root wheel 512 Jul 3 05:28 . drwxr-xr-x 23 root wheel 512 May 31 04:08 .. -rw-r--r-- 1 root wheel 4 Jun 10 00:31 cron.pid -rw-r--r-- 1 root wheel 65536 Jun 10 00:31 dev.db drwxr-xr-x 2 root wheel 512 Jul 3 05:28 dhcpd -rw-r--r-- 1 root wheel 14302 Jun 10 00:30 dmesg.boot -rw-r--r-- 1 root wheel 4 Jun 10 00:31 inetd.pid srw-rw-rw- 1 root wheel 0 Jun 10 00:30 log -rw-r--r-- 1 root wheel 4 Jun 10 00:31 mountd.pid drwxr-xr-x 2 munin wheel 512 Jul 3 05:25 munin -rw-r--r-- 1 root wheel 6 Jun 27 21:09 named.pid srw------- 1 root wheel 0 Jun 27 21:09 ndc -rw-r--r-- 1 root wheel 20 Jun 27 21:11 nmbd.pid -rw-r--r-- 1 root wheel 3 Jun 10 00:31 ntpd.pid drwxrwx--- 2 root network 512 Oct 10 2002 ppp -rw-r--r-- 1 root wheel 20 Jun 27 21:11 smbd.pid -rw-r--r-- 1 root wheel 4 Jun 10 00:31 sshd.pid drwx------ 4 root wheel 512 Dec 13 2003 sudo -rw-r--r-- 1 root wheel 4 Jun 10 00:30 syslog.pid drwxrwxr-- 2 upclient upclient 512 Jun 10 00:31 upclient -rw-r--r-- 1 root wheel 968 Jul 2 19:17 utmp s--------- 1 root wheel 0 Jun 10 00:31 yppasswdsock root@erwin:/root# ls -la /var/run/dhcpd/ total 4 drwxr-xr-x 2 root wheel 512 Jul 3 05:28 . drwxr-xr-x 7 root wheel 512 Jul 3 05:28 .. root@erwin:/root# /usr/local/etc/rc.d/isc-dhcpd.sh stop dhcpd is not running. root@erwin:/root# killall dhp root@erwin:/root# chown dhcpd:wheel /var/run/dhcpd/ root@erwin:/root# /usr/local/etc/rc.d/isc-dhcpd.sh start Starting dhcpd. Internet Systems Consortium DHCP Server V3.0.1rc14 Copyright 2004 Internet Systems Consortium. All rights reserved. For info, please visit http://www.isc.org/sw/dhcp/ Wrote 1 leases to leases file. Listening on BPF/dc0/08:00:2b:86:69:bd/192.168.100.0/24 Sending on BPF/dc0/08:00:2b:86:69:bd/192.168.100.0/24 Sending on Socket/fallback/fallback-net root@erwin:/root# ls -la /var/run/dhcpd/ total 6 drwxr-xr-x 2 dhcpd wheel 512 Jul 3 05:34 . drwxr-xr-x 7 root wheel 512 Jul 3 05:32 .. -rw-r--r-- 1 dhcpd wheel 6 Jul 3 05:34 dhcpd.pid >How-To-Repeat: >Fix: Change ownership of the piddir to the dhcpd user >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040702195755.6A8D1262>