postinst is in newrole 2.7-1.
This file is a maintainer script. It is executed when installing (*inst) or removing (*rm) the package.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | #!/bin/sh
set -e
PROGRAM=/usr/bin/newrole
if [ "$1" = configure ]; then
if which setcap > /dev/null && [ -e $PROGRAM ]; then
if ! setcap cap_dac_read_search,cap_setpcap,cap_audit_write,cap_sys_admin,cap_fowner,cap_chown,cap_dac_override=pe $PROGRAM >/dev/null 2>&1; then
echo "Setting capabilities newrole using Linux Capabilities failed, falling back to setuid."
chmod 4755 $PROGRAM
fi
fi
fi
exit 0
|