tpws,nfqws : fix checkpcap

This commit is contained in:
bol-van 2020-01-21 13:08:04 +03:00
parent c69a31cc1d
commit 12c6c90d47
2 changed files with 2 additions and 2 deletions

View File

@ -12,7 +12,7 @@ bool checkpcap(uint64_t caps)
uint32_t c0 = (uint32_t)caps; uint32_t c0 = (uint32_t)caps;
uint32_t c1 = (uint32_t)(caps>>32); uint32_t c1 = (uint32_t)(caps>>32);
return !capget(&ch,cd) && (cd[0].effective & c0)==c0 && (cd[0].effective & c1)==c1; return !capget(&ch,cd) && (cd[0].effective & c0)==c0 && (cd[1].effective & c1)==c1;
} }
bool setpcap(uint64_t caps) bool setpcap(uint64_t caps)
{ {

View File

@ -12,7 +12,7 @@ bool checkpcap(uint64_t caps)
uint32_t c0 = (uint32_t)caps; uint32_t c0 = (uint32_t)caps;
uint32_t c1 = (uint32_t)(caps>>32); uint32_t c1 = (uint32_t)(caps>>32);
return !capget(&ch,cd) && (cd[0].effective & c0)==c0 && (cd[0].effective & c1)==c1; return !capget(&ch,cd) && (cd[0].effective & c0)==c0 && (cd[1].effective & c1)==c1;
} }
bool setpcap(uint64_t caps) bool setpcap(uint64_t caps)
{ {