summaryrefslogtreecommitdiff
path: root/usr.sbin/smtpd/smtpd.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.sbin/smtpd/smtpd.c')
-rw-r--r--usr.sbin/smtpd/smtpd.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/usr.sbin/smtpd/smtpd.c b/usr.sbin/smtpd/smtpd.c
index 670feb0c199..909ece5200a 100644
--- a/usr.sbin/smtpd/smtpd.c
+++ b/usr.sbin/smtpd/smtpd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: smtpd.c,v 1.94 2010/01/03 14:37:37 chl Exp $ */
+/* $OpenBSD: smtpd.c,v 1.95 2010/01/10 08:59:19 gilles Exp $ */
/*
* Copyright (c) 2008 Gilles Chehade <gilles@openbsd.org>
@@ -1014,6 +1014,9 @@ main(int argc, char *argv[])
log_info("startup%s", (debug > 1)?" [debug mode]":"");
+ if (env.sc_hostname[0] == '\0')
+ errx(1, "machine does not have a hostname set");
+
env.stats = mmap(NULL, sizeof(struct stats), PROT_WRITE|PROT_READ,
MAP_ANON|MAP_SHARED, -1, (off_t)0);
if (env.stats == MAP_FAILED)