diff options
author | jilles <jilles@FreeBSD.org> | 2013-10-27 21:06:17 +0000 |
---|---|---|
committer | jilles <jilles@FreeBSD.org> | 2013-10-27 21:06:17 +0000 |
commit | 9117c60cf73e7ee93784242b506b7b8cbcdc2cbe (patch) | |
tree | 91eb8e92ee4256c744434ab81641f3398e695bac /usr.sbin/edquota/edquota.c | |
parent | 64ca26f9485ce47e51eb7216882b358fe2701028 (diff) | |
download | FreeBSD-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.c | 2 |
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) { |