mirror of
https://git.yoctoproject.org/poky
synced 2026-05-31 00:39:46 +00:00
dhcpcd: add dhcpcd user to support priviledge separation
The dhcpcd enables privsep by default. It requires a user added to the system. Add dhcpcd user and group to support it. (From OE-Core rev: 31c13dc5bbdde0e6ba1510b684eba0aa2ff2c937) Signed-off-by: Yi Zhao <yi.zhao@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
@@ -19,7 +19,7 @@ SRC_URI = "https://roy.marples.name/downloads/${BPN}/${BPN}-${PV}.tar.xz \
|
|||||||
|
|
||||||
SRC_URI[sha256sum] = "fcb2d19672d445bbfd38678fdee4f556ef967a3ea6bd81092d10545df2cb9666"
|
SRC_URI[sha256sum] = "fcb2d19672d445bbfd38678fdee4f556ef967a3ea6bd81092d10545df2cb9666"
|
||||||
|
|
||||||
inherit pkgconfig autotools-brokensep systemd
|
inherit pkgconfig autotools-brokensep systemd useradd
|
||||||
|
|
||||||
SYSTEMD_SERVICE_${PN} = "dhcpcd.service"
|
SYSTEMD_SERVICE_${PN} = "dhcpcd.service"
|
||||||
|
|
||||||
@@ -33,10 +33,16 @@ EXTRA_OECONF = "--enable-ipv4 \
|
|||||||
--runstatedir=/run \
|
--runstatedir=/run \
|
||||||
"
|
"
|
||||||
|
|
||||||
|
USERADD_PACKAGES = "${PN}"
|
||||||
|
USERADD_PARAM_${PN} = "--system -d ${localstatedir}/lib/${BPN} -M -s /bin/false -U dhcpcd"
|
||||||
|
|
||||||
do_install_append () {
|
do_install_append () {
|
||||||
# install systemd unit files
|
# install systemd unit files
|
||||||
install -d ${D}${systemd_unitdir}/system
|
install -d ${D}${systemd_unitdir}/system
|
||||||
install -m 0644 ${WORKDIR}/dhcpcd*.service ${D}${systemd_unitdir}/system
|
install -m 0644 ${WORKDIR}/dhcpcd*.service ${D}${systemd_unitdir}/system
|
||||||
|
|
||||||
|
chmod 700 ${D}${localstatedir}/lib/${BPN}
|
||||||
|
chown dhcpcd:dhcpcd ${D}${localstatedir}/lib/${BPN}
|
||||||
}
|
}
|
||||||
|
|
||||||
FILES_${PN}-dbg += "${libdir}/dhcpcd/dev/.debug"
|
FILES_${PN}-dbg += "${libdir}/dhcpcd/dev/.debug"
|
||||||
|
|||||||
Reference in New Issue
Block a user