nfqws, tpws : loop through 0..63 caps (for future). do not fail on error

This commit is contained in:
bolvan
2019-05-20 16:59:48 +03:00
parent 12f530b287
commit 9b91c3430c
26 changed files with 13 additions and 6 deletions

View File

@@ -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");
}
}
}
}