]> code.ossystems Code Review - openembedded-core.git/commit
dhcpd: create dhcpd user for dhcp dameon
authorAlexandru Moise <alexandru.moise@windriver.com>
Fri, 18 Mar 2016 12:21:25 +0000 (14:21 +0200)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sun, 20 Mar 2016 22:57:59 +0000 (22:57 +0000)
commit36d59255131f6d3f289d4f5dfcb58a9890996ffe
tree0bc07bad05c636878565708297a385fee254c2ba
parent7b75303e6df5d685c1b50c53c53af3962d6b3722
dhcpd: create dhcpd user for dhcp dameon

This patch enables the functionality for dhcpd service to be started
with dhcp uid and gid.

Test steps:

Step 1: Assign ip to interface
ifconfig eth0 192.168.1.1

Step 2: Edit /etc/dhcp/dhcpd.conf:
default-lease-time 600;
max-lease-time 7200;
option subnet-mask 255.255.255.0;
subnet 192.168.1.0 netmask 255.255.255.0 {
        option broadcast-address 192.168.1.255;
        range 192.168.1.88 192.168.1.88;
        option routers 192.168.1.0;
}

Step 3: Edit /etc/default/dhcp-server:
INTERFACES="eth0"

Step 4: Check uid and gid of running dhcpd process
$ ps -eo user:19,group:19,cmd | grep dhcpd
dhcp        dhcp        /usr/sbin/dhcpd eth0 -user dhcp -group dhcp

Signed-off-by: Alexandru Moise <alexandru.moise@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
meta/recipes-connectivity/dhcp/dhcp.inc
meta/recipes-connectivity/dhcp/files/init-server