check_dhcp: Set proper capabilities

This commit is contained in:
Jan Wagner 2014-07-06 12:23:55 +02:00
parent a6611b1e19
commit 90090cbc1b

View file

@ -13,7 +13,7 @@ if [ "$1" = "configure" ]; then
# which allows us to make our binaries working without the # which allows us to make our binaries working without the
# setuid bit # setuid bit
if command -v setcap > /dev/null; then if command -v setcap > /dev/null; then
if setcap cap_net_raw+ep ${plugindir}/check_icmp cap_net_raw+ep ${plugindir}/check_dhcp; then if setcap "cap_net_raw+ep" ${plugindir}/check_icmp "cap_net_bind_service=+ep cap_net_raw=+ep" ${plugindir}/check_dhcp; then
echo "Setcap for check_icmp and check_dhcp worked!" echo "Setcap for check_icmp and check_dhcp worked!"
else else
echo "Setcap for check_icmp and check_dhcp failed." >&2 echo "Setcap for check_icmp and check_dhcp failed." >&2