nfqws,tpws: sec_harden after daemonize

This commit is contained in:
bol-van
2025-05-10 16:57:04 +03:00
parent 24b93cca7e
commit c1046a20db
2 changed files with 4 additions and 2 deletions

View File

@@ -297,7 +297,6 @@ static int nfq_main(void)
return 1;
}
sec_harden();
if (params.droproot && !droproot(params.uid, params.gid, params.gid_count) || !dropcaps())
goto err;
print_id();
@@ -309,6 +308,8 @@ static int nfq_main(void)
if (params.daemon) daemonize();
sec_harden();
if (Fpid)
{
if (fprintf(Fpid, "%d", getpid())<=0)