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); } /* _______________________________________________ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"