jobcore/shadow/shadow.install

23 lines
372 B
Text
Raw Normal View History

2022-03-20 13:19:37 +01:00
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: