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;