nfqws,tpws: check list files accessibility with dropped privs in --dry-run mode

This commit is contained in:
bol-van
2025-05-29 15:43:27 +03:00
parent 38a3833351
commit fd698d801b
3 changed files with 27 additions and 0 deletions

View File

@@ -1715,6 +1715,18 @@ void parse_params(int argc, char *argv[])
#endif
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");
exit_clean(0);
}