Correctly set the password file mode after renaming in NIS mode
This commit is contained in:
parent
9acb3e40c2
commit
7df2814837
@ -68,6 +68,8 @@ pw_nisupdate(const char * path, struct passwd * pwd, char const * user)
|
|||||||
}
|
}
|
||||||
if (rename(pw_tempname(), path) == -1)
|
if (rename(pw_tempname(), path) == -1)
|
||||||
err(1, "rename()");
|
err(1, "rename()");
|
||||||
|
if (chmod(path, 0644) == -1)
|
||||||
|
err(1, "chmod()");
|
||||||
|
|
||||||
free(pw);
|
free(pw);
|
||||||
pw_fini();
|
pw_fini();
|
||||||
|
Loading…
Reference in New Issue
Block a user