summaryrefslogtreecommitdiff
path: root/usr.sbin/smtpd/lka_session.c
diff options
context:
space:
mode:
authorEric Faurot <eric@cvs.openbsd.org>2012-09-21 19:37:09 +0000
committerEric Faurot <eric@cvs.openbsd.org>2012-09-21 19:37:09 +0000
commit1f040ae349629abcf8d8dc8eb896478b5b84c220 (patch)
treef22197c7c76be386347757aa2b5fef1376e1ed94 /usr.sbin/smtpd/lka_session.c
parent798a848ddabe2ad7406d31f9a6b37f54a0405cbd (diff)
Do not pass the username to forwards_get() which does not have to care about
this. Instead, set the username on the expand context, and copy it on the expand nodes as they are inserted. ok gilles@
Diffstat (limited to 'usr.sbin/smtpd/lka_session.c')
-rw-r--r--usr.sbin/smtpd/lka_session.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/usr.sbin/smtpd/lka_session.c b/usr.sbin/smtpd/lka_session.c
index ee77d3a3498..5f6342b29f5 100644
--- a/usr.sbin/smtpd/lka_session.c
+++ b/usr.sbin/smtpd/lka_session.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: lka_session.c,v 1.32 2012/09/21 16:40:20 eric Exp $ */
+/* $OpenBSD: lka_session.c,v 1.33 2012/09/21 19:37:08 eric Exp $ */
/*
* Copyright (c) 2011 Gilles Chehade <gilles@openbsd.org>
@@ -193,7 +193,9 @@ lka_session_forward_reply(struct forward_req *fwreq, int fd)
if (fd != -1) {
/* opened .forward okay */
- if (! forwards_get(fd, &lks->expand, fwreq->as_user)) {
+ strlcpy(lks->expand.user, fwreq->as_user,
+ sizeof lks->expand.user);
+ if (! forwards_get(fd, &lks->expand)) {
lks->ss.code = 530;
lks->flags |= F_ERROR;
}