the permissions are even more restrictive than they should.
misc bug reported by qualys
-/* $OpenBSD: enqueue.c,v 1.95 2015/09/07 15:36:53 gilles Exp $ */
+/* $OpenBSD: enqueue.c,v 1.96 2015/10/06 06:04:46 gilles Exp $ */
/*
* Copyright (c) 2005 Henning Brauer <henning@bulabula.org>
PATH_OFFLINE, (long long int) time(NULL)))
err(EX_UNAVAILABLE, "snprintf");
- omode = umask(7077);
+ omode = umask(07077);
if ((fd = mkstemp(path)) == -1 || (fp = fdopen(fd, "w+")) == NULL) {
warn("cannot create temporary file %s", path);
if (fd != -1)
-/* $OpenBSD: makemap.c,v 1.52 2015/01/20 17:37:54 deraadt Exp $ */
+/* $OpenBSD: makemap.c,v 1.53 2015/10/06 06:04:46 gilles Exp $ */
/*
* Copyright (c) 2008 Gilles Chehade <gilles@poolp.org>
if (! bsnprintf(dbname, sizeof(dbname), "%s.XXXXXXXXXXX", oflag))
errx(1, "path too long");
- omode = umask(7077);
+ omode = umask(07077);
if (mkstemp(dbname) == -1)
err(1, "mkstemp");
umask(omode);
-/* $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>
/* 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) {
-/* $OpenBSD: util.c,v 1.117 2015/10/06 05:48:34 gilles Exp $ */
+/* $OpenBSD: util.c,v 1.118 2015/10/06 06:04:46 gilles Exp $ */
/*
* Copyright (c) 2000,2001 Markus Friedl. All rights reserved.
fatal("exiting");
}
- omode = umask(7077);
+ omode = umask(07077);
if ((fd = mkstemp(path)) == -1) {
log_warn("cannot create temporary file %s", path);
fatal("exiting");