process-util: make safe_fork() unset $NOTIFY_SOCKET
Propagating $NOTIFY_SOCKET is typically dangerous. Let's unset it unless explicitly requested to keep it. Fixes #27288. Replaces #27291.
This commit is contained in:
@@ -284,7 +284,6 @@ static int download_manifest(
|
||||
NULL
|
||||
};
|
||||
|
||||
(void) unsetenv("NOTIFY_SOCKET");
|
||||
execv(pull_binary_path(), (char *const*) cmdline);
|
||||
log_error_errno(errno, "Failed to execute %s tool: %m", pull_binary_path());
|
||||
_exit(EXIT_FAILURE);
|
||||
|
||||
@@ -793,7 +793,6 @@ static int run_helper(
|
||||
if (r == 0) {
|
||||
/* Child */
|
||||
|
||||
(void) unsetenv("NOTIFY_SOCKET");
|
||||
execv(path, (char *const*) cmdline);
|
||||
log_error_errno(errno, "Failed to execute %s tool: %m", path);
|
||||
_exit(EXIT_FAILURE);
|
||||
|
||||
Reference in New Issue
Block a user