Use setcap to specify specific files

pull/232/head
Yiran Zhou 3 years ago
parent 19ddae8fdc
commit 029da075e2

@ -54,7 +54,8 @@ rm -rf $RPM_BUILD_ROOT
%post %post
if [ -x /usr/sbin/setcap ]; then if [ -x /usr/sbin/setcap ]; then
/bin/chmod 0755 /usr/sbin/fping* /bin/chmod 0755 /usr/sbin/fping*
/usr/sbin/setcap cap_net_raw+ep /usr/sbin/fping* /usr/sbin/setcap cap_net_raw+ep /usr/sbin/fping
/usr/sbin/setcap cap_net_raw+ep /usr/sbin/fping6
fi fi
%changelog %changelog

Loading…
Cancel
Save