diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 1996-06-06 20:27:50 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 1996-06-06 20:27:50 +0000 |
commit | a9b8c44c47e26589d96cdb7144c10559047df87d (patch) | |
tree | b5ff1ddf1ba1b818f7baeeccf1f0c2bd28c2d8db /usr.sbin | |
parent | 95ce34efe94dfde536b356b88b5f27f3b7e7f383 (diff) |
do not forget to unlink tmpfil
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/edquota/edquota.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/usr.sbin/edquota/edquota.c b/usr.sbin/edquota/edquota.c index a48cf5150dd..e1c8f129f5e 100644 --- a/usr.sbin/edquota/edquota.c +++ b/usr.sbin/edquota/edquota.c @@ -42,7 +42,7 @@ static char copyright[] = #ifndef lint /*static char sccsid[] = "from: @(#)edquota.c 8.1 (Berkeley) 6/6/93";*/ -static char *rcsid = "$Id: edquota.c,v 1.8 1996/06/06 12:10:04 deraadt Exp $"; +static char *rcsid = "$Id: edquota.c,v 1.9 1996/06/06 20:27:49 deraadt Exp $"; #endif /* not lint */ /* @@ -138,11 +138,14 @@ main(argc, argv) fchown(tmpfd, getuid(), getgid()); if (tflag) { protoprivs = getprivs(0, quotatype); - if (writetimes(protoprivs, tmpfd, quotatype) == 0) + if (writetimes(protoprivs, tmpfd, quotatype) == 0) { + unlink(tmpfil); exit(1); + } if (editit(tmpfil) && readtimes(protoprivs, tmpfd)) putprivs(0, quotatype, protoprivs); freeprivs(protoprivs); + unlink(tmpfil); exit(0); } for ( ; argc > 0; argc--, argv++) { |