mirror of
https://github.com/systemd/systemd.git
synced 2025-01-21 22:04:01 +03:00
core: run env generators with non-zero umask
For PID 1 we adjust the umask to 0, but generators should not run that way, given that they might be implemented as shell scripts and such. Let's hence explicitly adjust the umask for them. We already do this for unit generators. Let's do this for env generators, too.
This commit is contained in:
parent
f5f9a580dd
commit
e3b8d0637d
@ -3813,6 +3813,7 @@ static int manager_run_environment_generators(Manager *m) {
|
||||
[STDOUT_COLLECT] = &tmp,
|
||||
[STDOUT_CONSUME] = &m->transient_environment,
|
||||
};
|
||||
int r;
|
||||
|
||||
if (MANAGER_IS_TEST_RUN(m) && !(m->test_run_flags & MANAGER_TEST_RUN_ENV_GENERATORS))
|
||||
return 0;
|
||||
@ -3822,7 +3823,10 @@ static int manager_run_environment_generators(Manager *m) {
|
||||
if (!generator_path_any(paths))
|
||||
return 0;
|
||||
|
||||
return execute_directories(paths, DEFAULT_TIMEOUT_USEC, gather_environment, args, NULL, m->transient_environment);
|
||||
RUN_WITH_UMASK(0022)
|
||||
r = execute_directories(paths, DEFAULT_TIMEOUT_USEC, gather_environment, args, NULL, m->transient_environment);
|
||||
|
||||
return r;
|
||||
}
|
||||
|
||||
static int manager_run_generators(Manager *m) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user