svn commit: r243328 - head/lib/libutil
Baptiste Daroussin
bapt at FreeBSD.org
Tue Nov 20 07:22:08 UTC 2012
Author: bapt
Date: Tue Nov 20 07:22:07 2012
New Revision: 243328
URL: http://svnweb.freebsd.org/changeset/base/243328
Log:
change mode the group file to 0644 after a successfull rename(2)
Modified:
head/lib/libutil/gr_util.c
Modified: head/lib/libutil/gr_util.c
==============================================================================
--- head/lib/libutil/gr_util.c Tue Nov 20 07:01:26 2012 (r243327)
+++ head/lib/libutil/gr_util.c Tue Nov 20 07:22:07 2012 (r243328)
@@ -318,7 +318,14 @@ gr_copy(int ffd, int tfd, const struct g
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);
}
/*
More information about the svn-src-all
mailing list