diff options
Diffstat (limited to 'src/machine-id-setup.c')
-rw-r--r-- | src/machine-id-setup.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/machine-id-setup.c b/src/machine-id-setup.c index be51d0dec7..519521fe67 100644 --- a/src/machine-id-setup.c +++ b/src/machine-id-setup.c @@ -167,7 +167,10 @@ int machine_id_setup(void) { mkdir_p("/run/systemd", 0755); + m = umask(0022); r = write_one_line_file("/run/systemd/machine-id", id); + umask(m); + if (r < 0) { log_error("Cannot write /run/systemd/machine-id: %s", strerror(-r)); |