diff options
author | 2015-12-10 09:33:50 +0000 | |
---|---|---|
committer | 2015-12-10 09:33:50 +0000 | |
commit | f2a891702703e39e7715a3be844ea48068ecdc31 (patch) | |
tree | 41e46447170094ff662c41b061b224d4b97b74a3 | |
parent | While listing envelopes using mailq(or smtpctl show queue), pass (diff) | |
download | wireguard-openbsd-f2a891702703e39e7715a3be844ea48068ecdc31.tar.xz wireguard-openbsd-f2a891702703e39e7715a3be844ea48068ecdc31.zip |
Do not fatal when a log_warn suffices.
Ok jung@ gilles@
-rw-r--r-- | usr.sbin/smtpd/smtpd.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/usr.sbin/smtpd/smtpd.c b/usr.sbin/smtpd/smtpd.c index 4700f61a1a8..2127e57652e 100644 --- a/usr.sbin/smtpd/smtpd.c +++ b/usr.sbin/smtpd/smtpd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: smtpd.c,v 1.259 2015/12/08 17:28:03 sunil Exp $ */ +/* $OpenBSD: smtpd.c,v 1.260 2015/12/10 09:33:50 sunil Exp $ */ /* * Copyright (c) 2008 Gilles Chehade <gilles@poolp.org> @@ -1220,8 +1220,10 @@ parent_forward_open(char *username, char *directory, uid_t uid, gid_t gid) struct stat sb; if (! bsnprintf(pathname, sizeof (pathname), "%s/.forward", - directory)) - fatal("smtpd: parent_forward_open: snprintf"); + directory)) { + log_warnx("warn: smtpd: %s: pathname too large", pathname); + return -1; + } if (stat(directory, &sb) < 0) { log_warn("warn: smtpd: parent_forward_open: %s", directory); |