Closed zdyxry closed 2 years ago
When installing RPM, use setcap to set cap_net_raw capability in %post stage.
setap exit code with 1 . Maybe we should use setcap to specify specific files?
OS Version: CentOS 7 [root@node1 08:11:43 sbin]$rpm -qf `which setcap` libcap-2.32-1.ky10.x86_64 [root@node1 08:11:56 sbin]$/usr/sbin/setcap cap_net_raw+ep /usr/sbin/fping* fatal error: Invalid argument usage: setcap [-q] [-v] [-n <rootid>] (-r|-|<caps>) <filename> [ ... (-r|-|<capsN>) <filenameN> ] Note <filename> must be a regular (non-symlink) file. [root@node1 08:12:07 sbin]$/usr/sbin/setcap cap_net_raw+ep /usr/sbin/fping [root@node1 08:12:10 sbin]$/usr/sbin/setcap cap_net_raw+ep /usr/sbin/fping6 [root@node1 08:12:12 sbin]$echo $? 0
When installing RPM, use setcap to set cap_net_raw capability in %post stage.
setap exit code with 1 . Maybe we should use setcap to specify specific files?