summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsunil <sunil@openbsd.org>2015-12-10 09:33:50 +0000
committersunil <sunil@openbsd.org>2015-12-10 09:33:50 +0000
commitf2a891702703e39e7715a3be844ea48068ecdc31 (patch)
tree41e46447170094ff662c41b061b224d4b97b74a3
parentWhile listing envelopes using mailq(or smtpctl show queue), pass (diff)
downloadwireguard-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.c8
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);