diff options
author | Yu Watanabe <watanabe.yu+github@gmail.com> | 2023-02-07 06:33:06 +0100 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2023-02-07 06:39:49 +0100 |
commit | f3f2d02e9731e65eb15c26980305cd47e028f4fc (patch) | |
tree | a9658f0e205450dd16279d9881ed301fb3d0ab95 /src/import/pull-common.c | |
parent | udevd: configure a child process name for worker processes (diff) | |
download | systemd-f3f2d02e9731e65eb15c26980305cd47e028f4fc.tar.xz systemd-f3f2d02e9731e65eb15c26980305cd47e028f4fc.zip |
tree-wide: set FORK_RLIMIT_NOFILE_SAFE flag
No functional changes, just refactoring.
Diffstat (limited to 'src/import/pull-common.c')
-rw-r--r-- | src/import/pull-common.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/import/pull-common.c b/src/import/pull-common.c index 6980f12a79..c8a3bf370e 100644 --- a/src/import/pull-common.c +++ b/src/import/pull-common.c @@ -16,7 +16,6 @@ #include "process-util.h" #include "pull-common.h" #include "pull-job.h" -#include "rlimit-util.h" #include "rm-rf.h" #include "signal-util.h" #include "siphash24.h" @@ -415,7 +414,7 @@ static int verify_gpg( gpg_home_created = true; - r = safe_fork("(gpg)", FORK_RESET_SIGNALS|FORK_DEATHSIG|FORK_LOG, &pid); + r = safe_fork("(gpg)", FORK_RESET_SIGNALS|FORK_DEATHSIG|FORK_LOG|FORK_RLIMIT_NOFILE_SAFE, &pid); if (r < 0) return r; if (r == 0) { @@ -446,8 +445,6 @@ static int verify_gpg( _exit(EXIT_FAILURE); } - (void) rlimit_nofile_safe(); - cmd[k++] = strjoina("--homedir=", gpg_home); /* We add the user keyring only to the command line arguments, if it's around since gpg fails |