summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorgilles <gilles@openbsd.org>2019-01-30 21:31:48 +0000
committergilles <gilles@openbsd.org>2019-01-30 21:31:48 +0000
commit1c8fd86d308c2dfd60b2ab9d5c81ddb77c37f247 (patch)
tree05f6a7085a3290c5da3edc6617d8e28c488a1cf3
parentconsistently talk about domain key; ok benno (diff)
downloadwireguard-openbsd-1c8fd86d308c2dfd60b2ab9d5c81ddb77c37f247.tar.xz
wireguard-openbsd-1c8fd86d308c2dfd60b2ab9d5c81ddb77c37f247.zip
revert previous commit, i wasn't happy with it and it probably came from a
misunderstanding.
-rw-r--r--usr.sbin/smtpd/smtpd.c6
-rw-r--r--usr.sbin/smtpd/smtpd.h3
2 files changed, 4 insertions, 5 deletions
diff --git a/usr.sbin/smtpd/smtpd.c b/usr.sbin/smtpd/smtpd.c
index 0a6da4046a6..66022264cd2 100644
--- a/usr.sbin/smtpd/smtpd.c
+++ b/usr.sbin/smtpd/smtpd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: smtpd.c,v 1.316 2019/01/30 14:21:01 gilles Exp $ */
+/* $OpenBSD: smtpd.c,v 1.317 2019/01/30 21:31:48 gilles Exp $ */
/*
* Copyright (c) 2008 Gilles Chehade <gilles@poolp.org>
@@ -1721,8 +1721,8 @@ parent_forward_open(char *username, char *directory, uid_t uid, gid_t gid)
return -1;
}
- if (!secure_forward(fd, pathname, directory, uid)) {
- log_warnx("warn: smtpd: %s: unsecure file, can't be world-writeable", pathname);
+ if (!secure_file(fd, pathname, directory, uid, 1)) {
+ log_warnx("warn: smtpd: %s: unsecure file", pathname);
close(fd);
return -1;
}
diff --git a/usr.sbin/smtpd/smtpd.h b/usr.sbin/smtpd/smtpd.h
index 803745beccf..104205262f6 100644
--- a/usr.sbin/smtpd/smtpd.h
+++ b/usr.sbin/smtpd/smtpd.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: smtpd.h,v 1.618 2019/01/30 14:21:01 gilles Exp $ */
+/* $OpenBSD: smtpd.h,v 1.619 2019/01/30 21:31:48 gilles Exp $ */
/*
* Copyright (c) 2008 Gilles Chehade <gilles@poolp.org>
@@ -1664,7 +1664,6 @@ int valid_localpart(const char *);
int valid_domainpart(const char *);
int valid_smtp_response(const char *);
int secure_file(int, char *, char *, uid_t, int);
-int secure_forward(int, char *, char *, uid_t);
int lowercase(char *, const char *, size_t);
void xlowercase(char *, const char *, size_t);
int uppercase(char *, const char *, size_t);