summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSunil Nimmagadda <sunil@cvs.openbsd.org>2015-12-10 09:33:51 +0000
committerSunil Nimmagadda <sunil@cvs.openbsd.org>2015-12-10 09:33:51 +0000
commit303d2e661109bde9d0b9bcec9f2644cfad89d217 (patch)
treec2869992f897d3e4256b566da3425498e6ad7c20
parent6e5336b1ba17cac7536cd919a7fab5607aec4696 (diff)
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);