Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 27 Oct 2013 21:06:18 +0000 (UTC)
From:      Jilles Tjoelker <jilles@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r257226 - head/usr.sbin/edquota
Message-ID:  <201310272106.r9RL6I0J032375@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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) {



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201310272106.r9RL6I0J032375>