Skip to content

Commit 05b1b94

Browse files
committed
setcap cvdalloc in the postinst.
This necessitates adding libcap2-bin as a new dependency, but doing so is somewhat expected; other packages that run setcap in postinst also are described similarly. We could setuid root here as a fallback, but that may be a better decision to leave for when we make all this more portable; we have the permissions check at runtime anyway to cover any exceptional cases.
1 parent e0e583e commit 05b1b94

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

base/debian/control

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ Depends: adduser,
4444
iproute2,
4545
iptables,
4646
libarchive-tools | bsdtar,
47+
libcap2-bin,
4748
libcurl4,
4849
libdrm2,
4950
libfdt1,

base/debian/cuttlefish-base.postinst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@ case "$1" in
2424
then
2525
addgroup --system kvm
2626
fi
27+
28+
setcap cap_net_admin,cap_net_bind_service,cap_net_raw=+ep \
29+
/usr/lib/cuttlefish-common/bin/cvdalloc
2730
;;
2831
esac
2932

0 commit comments

Comments
 (0)