mirror of
https://github.com/bol-van/zapret2.git
synced 2026-03-13 22:03:09 +00:00
nfqws2: 1ULL in proto/payload
This commit is contained in:
@@ -1053,7 +1053,7 @@ static int luacall_execution_plan(lua_State *L)
|
||||
{
|
||||
for (pl=0 ; pl<L7P_LAST ; pl++)
|
||||
{
|
||||
if (func->payload_type & (1<<pl))
|
||||
if (func->payload_type & (1ULL<<pl))
|
||||
{
|
||||
if ((pls = l7payload_str(pl)))
|
||||
{
|
||||
|
||||
@@ -1097,7 +1097,7 @@ static bool parse_l7_list(char *opt, uint64_t *l7)
|
||||
break;
|
||||
}
|
||||
else
|
||||
*l7 |= 1<<proto;
|
||||
*l7 |= 1ULL<<proto;
|
||||
|
||||
if (e) *e++ = c;
|
||||
p = e;
|
||||
@@ -1125,7 +1125,7 @@ static bool parse_l7p_list(char *opt, uint64_t *l7p)
|
||||
break;
|
||||
}
|
||||
else
|
||||
*l7p |= 1<<payload;
|
||||
*l7p |= 1ULL<<payload;
|
||||
|
||||
if (e) *e++ = c;
|
||||
p = e;
|
||||
@@ -1379,7 +1379,7 @@ static void LuaDesyncDebug(struct desync_profile *dp, const char *entity)
|
||||
if (func->payload_type)
|
||||
{
|
||||
for(i=0;i<L7P_LAST;i++)
|
||||
if (func->payload_type & (1<<i))
|
||||
if (func->payload_type & (1ULL<<i))
|
||||
DLOG(" %s", l7payload_str(i));
|
||||
}
|
||||
else
|
||||
|
||||
@@ -594,7 +594,7 @@ void init_params(struct params_s *params)
|
||||
LIST_INIT(¶ms->blobs);
|
||||
LIST_INIT(¶ms->lua_init_scripts);
|
||||
|
||||
params->reasm_payload_disable = params->payload_disable = 1<<L7P_NONE;
|
||||
params->reasm_payload_disable = params->payload_disable = 1ULL<<L7P_NONE;
|
||||
|
||||
#ifdef __CYGWIN__
|
||||
LIST_INIT(¶ms->ssid_filter);
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user