svn commit: r257226 - head/usr.sbin/edquota

Jilles Tjoelker jilles at FreeBSD.org
Sun Oct 27 21:06:18 UTC 2013


Author: jilles
Date: Sun Oct 27 21:06:17 2013
New Revision: 257226
URL: http://svnweb.freebsd.org/changeset/base/257226

Log:
  edquota: Don't pass fd for temporary file to editor.
  
  The editor opens the temporary file by name.

Modified:
  head/usr.sbin/edquota/edquota.c

Modified: head/usr.sbin/edquota/edquota.c
==============================================================================
--- head/usr.sbin/edquota/edquota.c	Sun Oct 27 20:56:23 2013	(r257225)
+++ head/usr.sbin/edquota/edquota.c	Sun Oct 27 21:06:17 2013	(r257226)
@@ -284,7 +284,7 @@ main(int argc, char *argv[])
 			freeprivs(protoprivs);
 		exit(0);
 	}
-	tmpfd = mkstemp(tmpfil);
+	tmpfd = mkostemp(tmpfil, O_CLOEXEC);
 	fchown(tmpfd, getuid(), getgid());
 	if (tflag) {
 		if ((protoprivs = getprivs(0, quotatype, fspath)) != NULL) {


More information about the svn-src-head mailing list