diff options
author | Baptiste Daroussin <bapt@FreeBSD.org> | 2012-11-20 10:59:41 +0000 |
---|---|---|
committer | Baptiste Daroussin <bapt@FreeBSD.org> | 2012-11-20 10:59:41 +0000 |
commit | ef34619dbd59da6485c17838c174b91c7938c05a (patch) | |
tree | 9ebe08cebed28fca5dcb11743315a3ccf6ff3aa3 /pw/pw_nis.c | |
parent | 530ff00378e7fc235e5ea51067c77398d575141e (diff) | |
download | pw-darwin-ef34619dbd59da6485c17838c174b91c7938c05a.tar.gz pw-darwin-ef34619dbd59da6485c17838c174b91c7938c05a.tar.zst pw-darwin-ef34619dbd59da6485c17838c174b91c7938c05a.zip |
Correctly set the password file mode after renaming in NIS mode
Diffstat (limited to 'pw/pw_nis.c')
-rw-r--r-- | pw/pw_nis.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/pw/pw_nis.c b/pw/pw_nis.c index af5901a..7af2bef 100644 --- a/pw/pw_nis.c +++ b/pw/pw_nis.c @@ -68,6 +68,8 @@ pw_nisupdate(const char * path, struct passwd * pwd, char const * user) } if (rename(pw_tempname(), path) == -1) err(1, "rename()"); + if (chmod(path, 0644) == -1) + err(1, "chmod()"); free(pw); pw_fini(); |