mirror of
https://github.com/bol-van/zapret.git
synced 2025-05-24 22:32:58 +03:00
nfqws, tpws : loop through 0..63 caps (for future). do not fail on error
This commit is contained in:
@@ -824,12 +824,15 @@ bool dropcaps()
|
||||
|
||||
if (setpcap(cap_values, capct))
|
||||
{
|
||||
for(int cap=0;cap<=CAP_LAST_CAP;cap++)
|
||||
for(int cap=0;cap<=63;cap++)
|
||||
{
|
||||
if (cap_drop_bound(cap))
|
||||
{
|
||||
perror("cap_drop_bound");
|
||||
return false;
|
||||
if (errno!=EINVAL)
|
||||
{
|
||||
fprintf(stderr,"could not drop cap %d\n",cap);
|
||||
perror("cap_drop_bound");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user