summaryrefslogtreecommitdiffstats
path: root/pw/pw_nis.c
diff options
context:
space:
mode:
Diffstat (limited to 'pw/pw_nis.c')
-rw-r--r--pw/pw_nis.c2
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();