Bug 68647 - ports/net/isc-dhcp3-server doesn't set piddir permissions properly
Summary: ports/net/isc-dhcp3-server doesn't set piddir permissions properly
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Pav Lucistnik
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-07-04 05:20 UTC by Rob Byrnes
Modified: 2004-07-06 02:00 UTC (History)
0 users

See Also:


Attachments
file.dat (8.95 KB, message/rfc822)
2004-07-06 00:58 UTC, Cyrille Lefevre
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Rob Byrnes 2004-07-04 05:20:25 UTC
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

Fix: 

Change ownership of the piddir to the dhcpd user
Comment 1 Pav Lucistnik freebsd_committer freebsd_triage 2004-07-05 19:57:54 UTC
Dear maintainer of FreeBSD port net/isc-dhcp3-server, could you please
take a look at 

http://www.freebsd.org/cgi/query-pr.cgi?q=68647

and comment on the issue, perhaps even provide a patch?

-- 
Pav Lucistnik <pav@oook.cz>
              <pav@FreeBSD.org>

What do we know about love? Love is like a pear.  Pear is sweet and havea
specific shape. Try to exactly define the shape of a pear.
  -- Marigold: 50 Years Of Poetry
Comment 2 Pav Lucistnik freebsd_committer freebsd_triage 2004-07-05 19:57:57 UTC
State Changed
From-To: open->feedback

Asked maintainer for review. 


Comment 3 Pav Lucistnik freebsd_committer freebsd_triage 2004-07-05 19:57:57 UTC
Responsible Changed
From-To: freebsd-ports-bugs->pav

Handle.
Comment 4 Cyrille Lefevre 2004-07-06 00:58:34 UTC
Hi,

I thought this was fixed last week, but it looks that not :(
in attachment, there is the fix I sent last week to PR#68357
but not commited yet.

Cyrille Lefevre
-- 
mailto:cyrille.lefevre@laposte.net
Comment 5 Pav Lucistnik freebsd_committer freebsd_triage 2004-07-06 01:57:21 UTC
State Changed
From-To: feedback->closed

Fixed in port revision 3.0.1.r14_2
Comment 6 Pav Lucistnik freebsd_committer freebsd_triage 2004-07-06 01:58:13 UTC
V út, 06. 07. 2004 v 01:58, Cyrille Lefevre pí¹e:

> Hi,
> 
> I thought this was fixed last week, but it looks that not :(
> in attachment, there is the fix I sent last week to PR#68357
> but not commited yet.


Checked in, thank you!

-- 
Pav Lucistnik <pav@oook.cz>
              <pav@FreeBSD.org>

Any Palm app requiring an 90+ page manual has lost its vision.