check_dhcp: Set proper capabilities
This commit is contained in:
parent
a6611b1e19
commit
90090cbc1b
2
debian/monitoring-plugins-basic.postinst
vendored
2
debian/monitoring-plugins-basic.postinst
vendored
|
@ -13,7 +13,7 @@ if [ "$1" = "configure" ]; then
|
|||
# which allows us to make our binaries working without the
|
||||
# setuid bit
|
||||
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!"
|
||||
else
|
||||
echo "Setcap for check_icmp and check_dhcp failed." >&2
|
||||
|
|
Loading…
Reference in a new issue