summaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/smtpd/enqueue.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/usr.sbin/smtpd/enqueue.c b/usr.sbin/smtpd/enqueue.c
index f120fc64846..78ab6b796cb 100644
--- a/usr.sbin/smtpd/enqueue.c
+++ b/usr.sbin/smtpd/enqueue.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: enqueue.c,v 1.48 2011/11/02 12:01:20 eric Exp $ */
+/* $OpenBSD: enqueue.c,v 1.49 2011/11/14 16:54:19 eric Exp $ */
/*
* Copyright (c) 2005 Henning Brauer <henning@bulabula.org>
@@ -587,6 +587,9 @@ enqueue_offline(int argc, char *argv[])
FILE *fp;
int i, fd, ch;
+ if (ckdir(PATH_SPOOL PATH_OFFLINE, 01777, 0, 0, 0) == 0)
+ errx(1, "error in offline directory setup");
+
if (! bsnprintf(path, sizeof(path), "%s%s/%lld.XXXXXXXXXX", PATH_SPOOL,
PATH_OFFLINE, (long long int) time(NULL)))
err(1, "snprintf");