diff options
author | Gilles Chehade <gilles@cvs.openbsd.org> | 2012-04-15 13:11:14 +0000 |
---|---|---|
committer | Gilles Chehade <gilles@cvs.openbsd.org> | 2012-04-15 13:11:14 +0000 |
commit | 34ccdea5aa20222b3ff28af19381c24c7bb1cc25 (patch) | |
tree | 197723c30c03b084a7fba96496fa9b803b072d5f /usr.sbin | |
parent | 7b7206fcf34f736e39c7de371ee6d253089f122f (diff) |
when using aliases, the *real* delivery user is not set on expand nodes
which prevents filters / filenames from working from /etc/mail/aliases.
in aliases_get() during the rb tree iteration, copy the username to the
expand node.
diff from Christopher Zimmermann, thankkkks and sorry for the delay
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/smtpd/aliases.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.sbin/smtpd/aliases.c b/usr.sbin/smtpd/aliases.c index 28a01ed142b..429967e8016 100644 --- a/usr.sbin/smtpd/aliases.c +++ b/usr.sbin/smtpd/aliases.c @@ -1,4 +1,4 @@ -/* $OpenBSD: aliases.c,v 1.45 2012/03/07 23:22:53 gilles Exp $ */ +/* $OpenBSD: aliases.c,v 1.46 2012/04/15 13:11:13 gilles Exp $ */ /* * Copyright (c) 2008 Gilles Chehade <gilles@openbsd.org> @@ -77,6 +77,7 @@ aliases_get(objid_t mapid, struct expandtree *expandtree, char *username) /* foreach node in map_alias expandtree, we merge */ nbaliases = 0; RB_FOREACH(expnode, expandtree, &map_alias->expandtree) { + strlcpy(expnode->as_user, username, sizeof (expnode->as_user)); if (expnode->type == EXPAND_INCLUDE) nbaliases += aliases_expand_include(expandtree, expnode->u.buffer); else { |