diff options
author | Gilles Chehade <gilles@cvs.openbsd.org> | 2019-01-30 21:31:49 +0000 |
---|---|---|
committer | Gilles Chehade <gilles@cvs.openbsd.org> | 2019-01-30 21:31:49 +0000 |
commit | 2e1c902e96cfb3af4ad65a89700f583723549768 (patch) | |
tree | c80e140dd28ef666f6f72e18bb75a7b159d3be63 /usr.sbin/smtpd | |
parent | cdf9e3c025379eeabdb9e27223d87db39550aa96 (diff) |
revert previous commit, i wasn't happy with it and it probably came from a
misunderstanding.
Diffstat (limited to 'usr.sbin/smtpd')
-rw-r--r-- | usr.sbin/smtpd/smtpd.c | 6 | ||||
-rw-r--r-- | usr.sbin/smtpd/smtpd.h | 3 |
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); |