change mode the group file to 0644 after a successfull rename(2)
This commit is contained in:
parent
c426f75e3b
commit
2d2b6ad74d
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=243328
@ -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…
Reference in New Issue
Block a user