package/dhcpcd: create dhcpcd user
authorFabrice Fontaine <fontaine.fabrice@gmail.com>
Sat, 26 Dec 2020 17:17:44 +0000 (18:17 +0100)
committerThomas Petazzoni <thomas.petazzoni@bootlin.com>
Sat, 26 Dec 2020 17:28:13 +0000 (18:28 +0100)
privsep is supported since version 9.0.0 and
https://github.com/rsmarples/dhcpcd/commit/d5786118da1bad4c247631cae86344f1b249a8cb
It is enabled by default since
https://github.com/rsmarples/dhcpcd/commit/3a4c2e5604d72151b06ed365aa71493740a3ad75

So use --privsepuser to avoid that the detection mechanism finds a wrong
value from host and create it on the target

Fixes:
 - https://bugs.buildroot.org/show_bug.cgi?id=13416

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
package/dhcpcd/dhcpcd.mk

index 11d78e1847b53cc1022efe4b9aa53396144eefdd..7b69602605d979a8d9c4e31513a9e4c2b3c491ce 100644 (file)
@@ -13,7 +13,8 @@ DHCPCD_LICENSE_FILES = LICENSE
 
 DHCPCD_CONFIG_OPTS = \
        --libexecdir=/lib/dhcpcd \
-       --os=linux
+       --os=linux \
+       --privsepuser=dhcpcd
 
 ifeq ($(BR2_STATIC_LIBS),y)
 DHCPCD_CONFIG_OPTS += --enable-static
@@ -50,6 +51,10 @@ define DHCPCD_INSTALL_INIT_SYSTEMD
 endef
 endif
 
+define DHCPCD_USERS
+       dhcpcd -1 dhcpcd -1 * - - - dhcpcd user
+endef
+
 # NOTE: Even though this package has a configure script, it is not generated
 # using the autotools, so we have to use the generic package infrastructure.