1
0
mirror of https://github.com/systemd/systemd.git synced 2024-10-28 20:25:38 +03:00

manager: call generators with umask 0022

This commit is contained in:
Lennart Poettering 2011-08-01 20:51:18 +02:00
parent c375a7f750
commit 07f8a4aa49

View File

@ -2985,6 +2985,7 @@ void manager_run_generators(Manager *m) {
DIR *d = NULL;
const char *generator_path;
const char *argv[3];
mode_t u;
assert(m);
@ -3027,7 +3028,9 @@ void manager_run_generators(Manager *m) {
argv[1] = m->generator_unit_path;
argv[2] = NULL;
u = umask(0022);
execute_directory(generator_path, d, (char**) argv);
umask(u);
if (rmdir(m->generator_unit_path) >= 0) {
/* Uh? we were able to remove this dir? I guess that