From 84b08bf7a81edb9d2b318384c7885dfa1994bcff Mon Sep 17 00:00:00 2001 From: Gilles Chehade Date: Sun, 21 Dec 2008 18:51:09 +0000 Subject: - missing prototype + smtp.c was misusing session_auth_pickup() - unlike starttls, ssmtp sets the F_SECURE flag on session before helo/ehlo handlers are called. this means that if we clear all flags in helo/ helo handlers, we prevent smtpd from advertising AUTH as it will do so only for F_SECURE sessions. This commits unbreaks SMTP AUTH with smtp sessions. Problem spotted by James Turner --- usr.sbin/smtpd/smtp.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'usr.sbin/smtpd/smtp.c') diff --git a/usr.sbin/smtpd/smtp.c b/usr.sbin/smtpd/smtp.c index 3219d07e260..84d0e345432 100644 --- a/usr.sbin/smtpd/smtp.c +++ b/usr.sbin/smtpd/smtp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: smtp.c,v 1.10 2008/12/21 02:18:46 gilles Exp $ */ +/* $OpenBSD: smtp.c,v 1.11 2008/12/21 18:51:08 gilles Exp $ */ /* * Copyright (c) 2008 Gilles Chehade @@ -46,6 +46,7 @@ void smtp_setup_events(struct smtpd *); void smtp_disable_events(struct smtpd *); void smtp_accept(int, short, void *); void session_timeout(int, short, void *); +void session_auth_pickup(struct session *, char *, size_t); void smtp_sig_handler(int sig, short event, void *p) @@ -178,7 +179,7 @@ smtp_dispatch_parent(int sig, short event, void *p) if (reply->value) s->s_flags |= F_AUTHENTICATED; - session_auth_pickup(s, NULL); + session_auth_pickup(s, NULL, 0); break; } -- cgit v1.2.3