Correctly set the password file mode after renaming in NIS mode
This commit is contained in:
parent
2d2b6ad74d
commit
7a43850530
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=243330
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user