diff options
author | 2014-10-12 11:49:38 +0000 | |
---|---|---|
committer | 2014-10-12 11:49:38 +0000 | |
commit | a4cac635c8960df090bf309242178bd44081ff80 (patch) | |
tree | 289973d56e07632f901590814732272fa16791c1 | |
parent | ansi function declarations. (diff) | |
download | wireguard-openbsd-a4cac635c8960df090bf309242178bd44081ff80.tar.xz wireguard-openbsd-a4cac635c8960df090bf309242178bd44081ff80.zip |
local host is not "localhost", local host is env->sc_hostname
-rw-r--r-- | usr.sbin/smtpd/smtp.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/usr.sbin/smtpd/smtp.c b/usr.sbin/smtpd/smtp.c index 022bb996d31..cfa094d7918 100644 --- a/usr.sbin/smtpd/smtp.c +++ b/usr.sbin/smtpd/smtp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: smtp.c,v 1.139 2014/07/08 14:38:17 eric Exp $ */ +/* $OpenBSD: smtp.c,v 1.140 2014/10/12 11:49:38 gilles Exp $ */ /* * Copyright (c) 2008 Gilles Chehade <gilles@poolp.org> @@ -222,7 +222,7 @@ smtp_enqueue(uid_t *euid) (void)strlcpy(listener->tag, "local", sizeof(listener->tag)); listener->ss.ss_family = AF_LOCAL; listener->ss.ss_len = sizeof(struct sockaddr *); - (void)strlcpy(listener->hostname, "localhost", + (void)strlcpy(listener->hostname, env->sc_hostname, sizeof(listener->hostname)); } @@ -238,9 +238,9 @@ smtp_enqueue(uid_t *euid) if (socketpair(AF_UNIX, SOCK_STREAM, PF_UNSPEC, fd)) fatal("socketpair"); - hostname = "localhost"; + hostname = env->sc_hostname; if (euid) { - (void)snprintf(buf, sizeof(buf), "%d@localhost", *euid); + (void)snprintf(buf, sizeof(buf), "%d@%s", *euid, hostname); hostname = buf; } |