diff options
author | Jouke Witteveen <j.witteveen@gmail.com> | 2016-07-07 12:36:33 +0200 |
---|---|---|
committer | Jouke Witteveen <j.witteveen@gmail.com> | 2016-07-07 14:15:50 +0200 |
commit | 1280503b7e74cacfa091f7e270a89c5811388c2b (patch) | |
tree | 0648c1c1faa172df88f8afa8de21a6ae187c4f07 /src | |
parent | 79c954405fd77e36c5567767676b81b79ed80ed5 (diff) |
execute: Cleanup the environment early
By cleaning up before setting up PAM we maintain control of overriding
behavior in setting variables. Otherwise, pam_putenv is in control.
This also makes sure we use a cleaned up environment in replacing
variables in argv.
Diffstat (limited to 'src')
-rw-r--r-- | src/core/execute.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/core/execute.c b/src/core/execute.c index 8cb18dbd5b..1a7620b084 100644 --- a/src/core/execute.c +++ b/src/core/execute.c @@ -1858,6 +1858,7 @@ static int exec_child( *exit_status = EXIT_MEMORY; return -ENOMEM; } + accum_env = strv_env_clean(accum_env); umask(context->umask); @@ -2166,8 +2167,6 @@ static int exec_child( return -ENOMEM; } - accum_env = strv_env_clean(accum_env); - if (_unlikely_(log_get_max_level() >= LOG_DEBUG)) { _cleanup_free_ char *line; |