mirror of
https://github.com/opnsense/src.git
synced 2026-06-10 17:22:46 -04:00
change mode the group file to 0644 after a successfull rename(2)
This commit is contained in:
parent
c426f75e3b
commit
2d2b6ad74d
1 changed files with 8 additions and 1 deletions
|
|
@ -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 a new issue