diff options
author | bapt <bapt@FreeBSD.org> | 2012-11-20 10:59:41 +0000 |
---|---|---|
committer | bapt <bapt@FreeBSD.org> | 2012-11-20 10:59:41 +0000 |
commit | 7df2814837ae2585cc6b0a8006fd6b2ff6c4bdcc (patch) | |
tree | 50cf755e3636ea7bd80a33d153d1e0a4729fa027 /usr.sbin/pw | |
parent | 9acb3e40c2b5badc282bac6ad0196dbbb3f443c7 (diff) | |
download | FreeBSD-src-7df2814837ae2585cc6b0a8006fd6b2ff6c4bdcc.zip FreeBSD-src-7df2814837ae2585cc6b0a8006fd6b2ff6c4bdcc.tar.gz |
Correctly set the password file mode after renaming in NIS mode
Diffstat (limited to 'usr.sbin/pw')
-rw-r--r-- | usr.sbin/pw/pw_nis.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/usr.sbin/pw/pw_nis.c b/usr.sbin/pw/pw_nis.c index af5901a..7af2bef 100644 --- a/usr.sbin/pw/pw_nis.c +++ b/usr.sbin/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(); |