edquota: Don't pass fd for temporary file to editor.

The editor opens the temporary file by name.
This commit is contained in:
Jilles Tjoelker 2013-10-27 21:06:17 +00:00
parent 0664b03c16
commit 1ebe85202b

View File

@ -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) {