diff options
author | Lennart Poettering <lennart@poettering.net> | 2019-04-30 19:25:29 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2019-05-24 15:07:55 +0200 |
commit | 4b3b5bc71b791a67d991389d8f59ab891b051b86 (patch) | |
tree | 58535e2b8d7658d76241b1403f191b1416421c2d /src/random-seed | |
parent | f8a8579e84bf5cb33d2c331efd74ffeaf8072539 (diff) | |
download | systemd-4b3b5bc71b791a67d991389d8f59ab891b051b86.tar.gz |
tree-wide: port various places over to use chmod_and_chown()
Doing this properly is hard, hence let's unify the code.
Diffstat (limited to 'src/random-seed')
-rw-r--r-- | src/random-seed/random-seed.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/random-seed/random-seed.c b/src/random-seed/random-seed.c index 71c2dba431..510a2715f2 100644 --- a/src/random-seed/random-seed.c +++ b/src/random-seed/random-seed.c @@ -10,6 +10,7 @@ #include "alloc-util.h" #include "fd-util.h" +#include "fs-util.h" #include "io-util.h" #include "log.h" #include "main-func.h" @@ -156,8 +157,7 @@ static int run(int argc, char *argv[]) { /* This is just a safety measure. Given that we are root and * most likely created the file ourselves the mode and owner * should be correct anyway. */ - (void) fchmod(seed_fd, 0600); - (void) fchown(seed_fd, 0, 0); + (void) fchmod_and_chown(seed_fd, 0600, 0, 0); k = loop_read(random_fd, buf, buf_size, false); if (k < 0) |