diff options
author | stefan <stefan@FreeBSD.org> | 2009-01-12 23:17:52 +0800 |
---|---|---|
committer | stefan <stefan@FreeBSD.org> | 2009-01-12 23:17:52 +0800 |
commit | cca0064c25638fa0635e8f0520131fa226ee4139 (patch) | |
tree | 9292da3a0cb7490fd5297805ba5147b4e54e7815 | |
parent | c99717a09dae28ac9d006827240d010132f3bbd3 (diff) | |
download | freebsd-ports-gnome-cca0064c25638fa0635e8f0520131fa226ee4139.tar.gz freebsd-ports-gnome-cca0064c25638fa0635e8f0520131fa226ee4139.tar.zst freebsd-ports-gnome-cca0064c25638fa0635e8f0520131fa226ee4139.zip |
Register a fixed UID/GID for the user 'dhcpd' and use that instead of a
dynamically chosen one.
PR: 127995
Submitted by: Ashish Shukla <wahjava@gmail.com>
Approved by: maintainer timeout (3 months)
-rw-r--r-- | GIDs | 1 | ||||
-rw-r--r-- | UIDs | 1 | ||||
-rw-r--r-- | net/isc-dhcp30-server/Makefile | 2 | ||||
-rw-r--r-- | net/isc-dhcp30-server/files/isc-dhcpd.in | 11 |
4 files changed, 9 insertions, 6 deletions
@@ -67,6 +67,7 @@ _spamd:*:132: freeradius:*:133: undernet:*:134: rabbitmq:*:135: +dhcpd:*:136: dovecot:*:143: rbldns:*:153: sfs:*:171: @@ -75,6 +75,7 @@ _spamd:*:132:132::0:0:Spam Daemon:/var/empty:/usr/sbin/nologin freeradius:*:133:133::0:0:FreeRADIUS Daemon:/nonexistent:/usr/sbin/nologin undernet:*:134:134::0:0:Undernet ircu Daemon:/nonexistant:/usr/sbin/nologin rabbitmq:*:135:135::0:0:RabbitMQ:/var/db/rabbitmq:/usr/sbin/nologin +dhcpd:*:136:136::0:0:ISC DHCP daemon:/nonexistent:/usr/sbin/nologin cricket:*:141:80::0:0:Cricket Monitoring User:/usr/local/cricket:/usr/sbin/nologin dovecot:*:143:143::0:0:Dovecot User:/var/empty:/usr/sbin/nologin rbldns:*:153:153::0:0:rbldnsd pseudo-user:/nonexistent:/usr/sbin/nologin diff --git a/net/isc-dhcp30-server/Makefile b/net/isc-dhcp30-server/Makefile index 1dcfa83b7cee..215f5409b673 100644 --- a/net/isc-dhcp30-server/Makefile +++ b/net/isc-dhcp30-server/Makefile @@ -8,7 +8,7 @@ PORTNAME= dhcp PORTVERSION= 3.0.7 -PORTREVISION= 1 +PORTREVISION= 2 PORTREVISION= ${DHCP_PORTREVISION} CATEGORIES= net MASTER_SITES= ${MASTER_SITE_ISC} diff --git a/net/isc-dhcp30-server/files/isc-dhcpd.in b/net/isc-dhcp30-server/files/isc-dhcpd.in index c1e482945ad2..808576a3c483 100644 --- a/net/isc-dhcp30-server/files/isc-dhcpd.in +++ b/net/isc-dhcp30-server/files/isc-dhcpd.in @@ -271,16 +271,17 @@ safe_umount () # dir safe_useradd () { - local _user _group _home _shell _gecos + local _user _group _home _shell _gecos _gid _usr _user=$1 _group=$2 _gecos=${3:-"& daemon"} - _home=${4:-/nonexistent} _shell=${5:-/usr/sbin/nologin} + _uid=$4 _gid=$5 + _home=${6:-/nonexistent} _shell=${7:-/usr/sbin/nologin} if [ -n "${_group}" ]; then if pw group show ${_group} 2>/dev/null; then echo "You already have a group \"${_group}\"," \ "so I will use it." - elif pw groupadd ${_group} -h -; then + elif pw groupadd ${_group} -g ${_gid} -h -; then echo "Added group \"${_group}\"." else echo "Adding group \"${_group}\" failed..." @@ -292,7 +293,7 @@ safe_useradd () if pw user show ${_user} 2>/dev/null; then echo "You already have a user \"${_user}\"," \ "so I will use it." - elif pw useradd ${_user} -g ${_group} -h - \ + elif pw useradd ${_user} -u ${_uid} -g ${_group} -h - \ -d ${_home} -s ${_shell} -c "${_gecos}"; then echo "Added user \"${_user}\"." else @@ -638,7 +639,7 @@ dhcpd_install () { if checkyesno paranoia; then safe_useradd "${dhcpd_withuser}" "${dhcpd_withgroup}" \ - "DHCP Daemon" + "DHCP Daemon" 136 136 fi } |