Created attachment 299397 [details] help usage screenshot Hello, I execute command for capsh with parameter, such like uid, gid,keep... When I input paramter as negative number, it would be a big number. $ capsh --uid=-5 -- -c "whoami" whoami: cannot find name for user ID 5294967291 When I input paramter as character, it would be 0 and execute return by root. $ capsh --uid=test -- -c "whoami" root Could you check the parameter value? I see in the help usage, some paramters are specify as number. Thanks.
Thanks for the bug report. This is fixed with this commit (will be included in 2.61): https://git.kernel.org/pub/scm/libs/libcap/libcap.git/commit/?id=9c4997d6592e5daf046a6968ac83cf615c51fbe1 $ sudo ./capsh --uid=-5 -- -c "whoami" invalid --uid value: want non-negative integer, got "-5" $ sudo ./capsh --uid=test -- -c "whoami" invalid --uid value: want non-negative integer, got "test" $ sudo ./capsh --uid=1 -- -c "whoami" daemon