summaryrefslogtreecommitdiff
path: root/usr.sbin/smtpd/smtpd.c
diff options
context:
space:
mode:
authorGilles Chehade <gilles@cvs.openbsd.org>2015-10-06 06:04:47 +0000
committerGilles Chehade <gilles@cvs.openbsd.org>2015-10-06 06:04:47 +0000
commitf5cc67c3313cce02d40f01ef436afdbc3ef72cbf (patch)
tree8f0897c7922bc50ea41a93d99ffe835a90db687a /usr.sbin/smtpd/smtpd.c
parentcc8bc8b2b5d8683469535a630d65be7c45e70680 (diff)
fix values passed to umask(), they should be octal.
the permissions are even more restrictive than they should. misc bug reported by qualys
Diffstat (limited to 'usr.sbin/smtpd/smtpd.c')
-rw-r--r--usr.sbin/smtpd/smtpd.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/smtpd/smtpd.c b/usr.sbin/smtpd/smtpd.c
index 9e55df0cfcb..abc3856ee84 100644
--- a/usr.sbin/smtpd/smtpd.c
+++ b/usr.sbin/smtpd/smtpd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: smtpd.c,v 1.240 2015/10/02 00:37:53 gilles Exp $ */
+/* $OpenBSD: smtpd.c,v 1.241 2015/10/06 06:04:46 gilles Exp $ */
/*
* Copyright (c) 2008 Gilles Chehade <gilles@poolp.org>
@@ -942,7 +942,7 @@ forkmda(struct mproc *p, uint64_t id, struct deliver *deliver)
/* prepare file which captures stdout and stderr */
(void)strlcpy(sfn, "/tmp/smtpd.out.XXXXXXXXXXX", sizeof(sfn));
- omode = umask(7077);
+ omode = umask(07077);
allout = mkstemp(sfn);
umask(omode);
if (allout < 0) {