mirror of
https://github.com/bol-van/zapret.git
synced 2025-08-10 01:02:03 +03:00
nfqws,tpws: check list files accessibility with dropped privs in --dry-run mode
This commit is contained in:
@@ -506,5 +506,6 @@ blockcheck: report test function and domain every test
|
|||||||
v71.1
|
v71.1
|
||||||
|
|
||||||
nfqws,tpws: much faster ipset implementation. move from hash to avl tree
|
nfqws,tpws: much faster ipset implementation. move from hash to avl tree
|
||||||
|
nfqws,tpws: check list files accessibility with dropped privs in --dry-run mode
|
||||||
install_easy: stop if running embedded release on traditional linux system (some files missing)
|
install_easy: stop if running embedded release on traditional linux system (some files missing)
|
||||||
install_bin: add "read elf" arch detection method
|
install_bin: add "read elf" arch detection method
|
||||||
|
14
nfq/nfqws.c
14
nfq/nfqws.c
@@ -3094,6 +3094,20 @@ int main(int argc, char **argv)
|
|||||||
|
|
||||||
if (bDry)
|
if (bDry)
|
||||||
{
|
{
|
||||||
|
#ifndef __CYGWIN__
|
||||||
|
if (params.droproot)
|
||||||
|
{
|
||||||
|
if (!droproot(params.uid,params.gid,params.gid_count))
|
||||||
|
exit_clean(1);
|
||||||
|
#ifdef __linux__
|
||||||
|
if (!dropcaps())
|
||||||
|
exit_clean(1);
|
||||||
|
#endif
|
||||||
|
print_id();
|
||||||
|
if (!test_list_files())
|
||||||
|
exit_clean(1);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
DLOG_CONDUP("command line parameters verified\n");
|
DLOG_CONDUP("command line parameters verified\n");
|
||||||
exit_clean(0);
|
exit_clean(0);
|
||||||
}
|
}
|
||||||
|
12
tpws/tpws.c
12
tpws/tpws.c
@@ -1715,6 +1715,18 @@ void parse_params(int argc, char *argv[])
|
|||||||
#endif
|
#endif
|
||||||
if (bDry)
|
if (bDry)
|
||||||
{
|
{
|
||||||
|
if (params.droproot)
|
||||||
|
{
|
||||||
|
if (!droproot(params.uid,params.gid,params.gid_count))
|
||||||
|
exit_clean(1);
|
||||||
|
#ifdef __linux__
|
||||||
|
if (!dropcaps())
|
||||||
|
exit_clean(1);
|
||||||
|
#endif
|
||||||
|
print_id();
|
||||||
|
if (!test_list_files())
|
||||||
|
exit_clean(1);
|
||||||
|
}
|
||||||
DLOG_CONDUP("command line parameters verified\n");
|
DLOG_CONDUP("command line parameters verified\n");
|
||||||
exit_clean(0);
|
exit_clean(0);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user