From: eric Date: Fri, 1 Jul 2016 17:53:23 +0000 (+0000) Subject: flag the local socket listener as local. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=dc89f6ba6f270426ce1ea22149e90b9607ddd74e;p=openbsd flag the local socket listener as local. clarify check for local listeners. ok gilles@ millert@ --- diff --git a/usr.sbin/smtpd/parse.y b/usr.sbin/smtpd/parse.y index d4c0fcbc1b7..6d14f9a2eae 100644 --- a/usr.sbin/smtpd/parse.y +++ b/usr.sbin/smtpd/parse.y @@ -1,4 +1,4 @@ -/* $OpenBSD: parse.y,v 1.185 2016/06/21 21:35:25 benno Exp $ */ +/* $OpenBSD: parse.y,v 1.186 2016/07/01 17:53:23 eric Exp $ */ /* * Copyright (c) 2008 Gilles Chehade @@ -2093,6 +2093,7 @@ create_sock_listener(struct listen_opts *lo) lo->hostname = conf->sc_hostname; l->ss.ss_family = AF_LOCAL; l->ss.ss_len = sizeof(struct sockaddr *); + l->local = 1; config_listener(l, lo); return (l); diff --git a/usr.sbin/smtpd/smtp_session.c b/usr.sbin/smtpd/smtp_session.c index 191cb1089c7..9bfcaa0187f 100644 --- a/usr.sbin/smtpd/smtp_session.c +++ b/usr.sbin/smtpd/smtp_session.c @@ -1,4 +1,4 @@ -/* $OpenBSD: smtp_session.c,v 1.278 2016/06/29 06:46:06 eric Exp $ */ +/* $OpenBSD: smtp_session.c,v 1.279 2016/07/01 17:53:23 eric Exp $ */ /* * Copyright (c) 2008 Gilles Chehade @@ -694,7 +694,7 @@ smtp_session(struct listener *listener, int sock, rfc2822_body_callback(&s->tx->rfc2822_parser, dataline_callback, s); - if (hostname || listener->local || listener->port == 587) { + if (listener->local || listener->port == 587) { rfc2822_missing_header_callback(&s->tx->rfc2822_parser, "date", header_missing_callback, s); rfc2822_missing_header_callback(&s->tx->rfc2822_parser, "message-id",