summaryrefslogtreecommitdiffstats
path: root/usr.sbin/edquota/edquota.c
diff options
context:
space:
mode:
authorjilles <jilles@FreeBSD.org>2013-10-27 21:06:17 +0000
committerjilles <jilles@FreeBSD.org>2013-10-27 21:06:17 +0000
commit9117c60cf73e7ee93784242b506b7b8cbcdc2cbe (patch)
tree91eb8e92ee4256c744434ab81641f3398e695bac /usr.sbin/edquota/edquota.c
parent64ca26f9485ce47e51eb7216882b358fe2701028 (diff)
downloadFreeBSD-src-9117c60cf73e7ee93784242b506b7b8cbcdc2cbe.zip
FreeBSD-src-9117c60cf73e7ee93784242b506b7b8cbcdc2cbe.tar.gz
edquota: Don't pass fd for temporary file to editor.
The editor opens the temporary file by name.
Diffstat (limited to 'usr.sbin/edquota/edquota.c')
-rw-r--r--usr.sbin/edquota/edquota.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/usr.sbin/edquota/edquota.c b/usr.sbin/edquota/edquota.c
index a92a3c8..0cd117f 100644
--- a/usr.sbin/edquota/edquota.c
+++ b/usr.sbin/edquota/edquota.c
@@ -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) {
OpenPOWER on IntegriCloud