1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2024-12-24 21:34:08 +03:00

firstboot: change /etc/shadow access mode to 000

It appears to be customary to remove all access bits from /etc/shadow
including those for the root owner), hence let's do the same.
This commit is contained in:
Lennart Poettering 2014-07-07 16:54:09 +02:00
parent ffc90a1196
commit 3250929b70

View File

@ -531,7 +531,8 @@ static int write_root_shadow(const char *path, const struct spwd *p) {
assert(p);
mkdir_parents(path, 0755);
f = fopen(path, "wex");
RUN_WITH_UMASK(0777)
f = fopen(path, "wex");
if (!f)
return -errno;