Hello, When I executed below command: $ setcap -n 0 cap_net_raw,cap_net_admin=eip /usr/bin/ping $ setcap -n root cap_net_raw,cap_net_admin=eip /usr/bin/ping The ouput displayed: invalid rootid!=0 of 'xxx', the message was mistaken the line did.'t wrap. Could you check the parameter value, and set clearly output message? And more details, please see: https://gitee.com/src-openeuler/libcap/issues/I4FR7U?from=project-issue
Created attachment 299395 [details] command output
*** Bug 214907 has been marked as a duplicate of this bug. ***
Thanks for the bug report. This commit should fix it (will be included in 2.61): https://git.kernel.org/pub/scm/libs/libcap/libcap.git/commit/?id=8e1e967bc8d99a3233d51f67f6b88620cdff78dc $ sudo ./setcap -n 5 cap_net_raw,cap_net_admin=eip ./setcap $ ./getcap -n ./setcap ./setcap cap_net_admin,cap_net_raw=eip [rootid=5] $ sudo ./setcap -n 0 cap_net_raw,cap_net_admin=eip ./setcap bad ns rootid: want positive integer, got "0" $ sudo ./setcap -n -5 cap_net_raw,cap_net_admin=eip ./setcap bad ns rootid: want positive integer, got "-5" $ sudo ./setcap -n root cap_net_raw,cap_net_admin=eip ./setcap bad ns rootid: want positive integer, got "root"