change mode the group file to 0644 after a successfull rename(2)
This commit is contained in:
parent
c426f75e3b
commit
2d2b6ad74d
@ -318,7 +318,14 @@ gr_copy(int ffd, int tfd, const struct group *gr, struct group *old_gr)
|
||||
int
|
||||
gr_mkdb(void)
|
||||
{
|
||||
return (rename(tempname, group_file));
|
||||
int ret;
|
||||
|
||||
ret = rename(tempname, group_file);
|
||||
|
||||
if (ret == 0)
|
||||
chmod(group_file, 0644);
|
||||
|
||||
return (ret);
|
||||
}
|
||||
|
||||
/*
|
||||
|
Loading…
x
Reference in New Issue
Block a user