From 798704c99abfae98b7f5ec3a1841e9a15e3747ef Mon Sep 17 00:00:00 2001 From: Gilles Chehade Date: Sat, 21 Apr 2012 12:45:06 +0000 Subject: i got the previous fix wrong, /etc/mail/aliases should use SMTPD_USER privileges. while at it, also apply the same to virtual domains. --- usr.sbin/smtpd/aliases.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/usr.sbin/smtpd/aliases.c b/usr.sbin/smtpd/aliases.c index 429967e8016..7995ecaa1a1 100644 --- a/usr.sbin/smtpd/aliases.c +++ b/usr.sbin/smtpd/aliases.c @@ -1,4 +1,4 @@ -/* $OpenBSD: aliases.c,v 1.46 2012/04/15 13:11:13 gilles Exp $ */ +/* $OpenBSD: aliases.c,v 1.47 2012/04/21 12:45:05 gilles Exp $ */ /* * Copyright (c) 2008 Gilles Chehade @@ -77,7 +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)); + strlcpy(expnode->as_user, SMTPD_USER, sizeof (expnode->as_user)); if (expnode->type == EXPAND_INCLUDE) nbaliases += aliases_expand_include(expandtree, expnode->u.buffer); else { @@ -165,6 +165,7 @@ aliases_virtual_get(objid_t mapid, struct expandtree *expandtree, /* foreach node in map_virtual expandtree, we merge */ nbaliases = 0; RB_FOREACH(expnode, expandtree, &map_virtual->expandtree) { + strlcpy(expnode->as_user, SMTPD_USER, sizeof (expnode->as_user)); if (expnode->type == EXPAND_INCLUDE) nbaliases += aliases_expand_include(expandtree, expnode->u.buffer); else { -- cgit v1.2.3