Template
1
0
mirror of https://github.com/bol-van/zapret2.git synced 2026-03-14 06:13:09 +00:00

nfqws2: 1ULL in proto/payload

This commit is contained in:
bol-van
2026-02-06 11:31:47 +03:00
parent c5ecc0493d
commit 6299a46ab7
4 changed files with 8 additions and 8 deletions

View File

@@ -210,10 +210,10 @@ int getmaxcap(void)
}
bool dropcaps(void)
{
uint64_t caps = (1<<CAP_NET_ADMIN)|(1<<CAP_NET_RAW);
uint64_t caps = (1ULL<<CAP_NET_ADMIN)|(1ULL<<CAP_NET_RAW);
int maxcap = getmaxcap();
if (setpcap(caps|(1<<CAP_SETPCAP)))
if (setpcap(caps|(1ULL<<CAP_SETPCAP)))
{
for (int cap = 0; cap <= maxcap; cap++)
{
@@ -249,7 +249,7 @@ bool can_drop_root(void)
{
#ifdef __linux__
// has some caps
return checkpcap((1<<CAP_SETUID)|(1<<CAP_SETGID));
return checkpcap((1ULL<<CAP_SETUID)|(1ULL<<CAP_SETGID));
#else
// effective root
return !geteuid();