Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions srcpkgs/dhcpcd/files/dhcpcd-unprivileged/run
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/bin/sh
exec 2>&1
[ -r conf ] && . ./conf

# automigrate
chown root:_dhcpcd /etc/dhcpcd.conf
chmod 640 /etc/dhcpcd.conf

! [ -d /run/dhcpcd ] && install -m 700 -g _dhcpcd -o _dhcpcd -d /run/dhcpcd
chown -R _dhcpcd:_dhcpcd /run/dhcpcd

exec setpriv --reuid _dhcpcd --regid _dhcpcd --clear-groups \
--ambient-caps -all,+net_admin,+net_raw,+net_bind_service \
--inh-caps -all,+net_admin,+net_raw,+net_bind_service \
--bounding-set -all,+net_admin,+net_raw,+net_bind_service \
--no-new-privs -- dhcpcd -B ${OPTS:=-M}
6 changes: 4 additions & 2 deletions srcpkgs/dhcpcd/template
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Template file for 'dhcpcd'
pkgname=dhcpcd
version=10.1.0
version=10.2.4
revision=1
build_style=configure
make_check_target=test
Expand All @@ -15,19 +15,21 @@ license="BSD-2-Clause"
homepage="https://roy.marples.name/projects/dhcpcd"
changelog="https://github.com/NetworkConfiguration/dhcpcd/releases"
distfiles="https://github.com/NetworkConfiguration/dhcpcd/archive/refs/tags/v${version}.tar.gz"
checksum=e8a83208c2ff63a5a31d886f76bc717b4ec1938d18a2c8b88f328e710d2b515a
checksum=85c8b2535ddf52091b30b31f29b0f9cafd9cd94dc6b78f1bd92db2afce4c1943
lib32disabled=yes
conf_files=/etc/dhcpcd.conf

system_accounts="_dhcpcd"
_dhcpcd_homedir="/var/db/dhcpcd"
make_dirs="/var/db/dhcpcd 0770 root _dhcpcd"

build_options="privsep"
desc_option_privsep="Enable privilege separation mode for the daemon"

post_install() {
vsv dhcpcd
vsv dhcpcd-eth0
vsv dhcpcd-unprivileged

# Enable controlgroup by default, to make dhcpcd-ui work.
vsed -e 's,^#\(controlgroup.*\),\1,' -i ${DESTDIR}/etc/dhcpcd.conf
Expand Down