summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormillert <millert@openbsd.org>1998-06-12 17:15:24 +0000
committermillert <millert@openbsd.org>1998-06-12 17:15:24 +0000
commit75e2e18561c3885afed8b13bef70f07c1f51cb57 (patch)
treed0e85c01ed6bc9284d1b320aa2e2366936b86043
parentwarn when ../../../ appears in include directive, since includes are relative to srcdir and kludge code is still active. (diff)
downloadwireguard-openbsd-75e2e18561c3885afed8b13bef70f07c1f51cb57.tar.xz
wireguard-openbsd-75e2e18561c3885afed8b13bef70f07c1f51cb57.zip
Properly delete messages that the user has deleted in his/her spool.
I fudged up the logic when I replaced an unlink with a truncate.
-rw-r--r--usr.bin/mail/v7.local.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/usr.bin/mail/v7.local.c b/usr.bin/mail/v7.local.c
index 467df474c1d..1bd7e77e336 100644
--- a/usr.bin/mail/v7.local.c
+++ b/usr.bin/mail/v7.local.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: v7.local.c,v 1.10 1998/05/04 05:37:53 millert Exp $ */
+/* $OpenBSD: v7.local.c,v 1.11 1998/06/12 17:15:24 millert Exp $ */
/* $NetBSD: v7.local.c,v 1.8 1997/05/13 06:15:58 mikel Exp $ */
/*
@@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)v7.local.c 8.1 (Berkeley) 6/6/93";
#else
-static char rcsid[] = "$OpenBSD: v7.local.c,v 1.10 1998/05/04 05:37:53 millert Exp $";
+static char rcsid[] = "$OpenBSD: v7.local.c,v 1.11 1998/06/12 17:15:24 millert Exp $";
#endif
#endif /* not lint */
@@ -86,8 +86,8 @@ void
demail()
{
- if (value("keep") != NULL)
- (void)truncate(mailname, 0);
+ if (value("keep") != NULL || truncate(mailname, 0) == -1)
+ (void)close(creat(mailname, 0600));
}
/*