jobcore/shadow/shadow.install
2022-03-20 14:19:37 +02:00

22 lines
372 B
Text

setcaps() {
_setcap() {
if filecap "$1" "$2"; then
chmod -s "$1"
fi
}
# shadow ships these as setuid, but if we can apply file caps, use those instead.
# 'filecap' insists on absolute paths
_setcap /usr/bin/newuidmap setuid
_setcap /usr/bin/newgidmap setgid
}
post_install() {
setcaps
}
post_upgrade() {
setcaps
}
# vim:set ts=2 sw=2 et: