summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGilles Chehade <gilles@cvs.openbsd.org>2012-04-21 12:45:06 +0000
committerGilles Chehade <gilles@cvs.openbsd.org>2012-04-21 12:45:06 +0000
commit798704c99abfae98b7f5ec3a1841e9a15e3747ef (patch)
tree40556ab3276ef2b82d1e987b4df4beac1650ea89
parentff05b3078300242a9e6dfde389651a8dd381ee06 (diff)
i got the previous fix wrong, /etc/mail/aliases should use SMTPD_USER
privileges. while at it, also apply the same to virtual domains.
-rw-r--r--usr.sbin/smtpd/aliases.c5
1 files 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 <gilles@openbsd.org>
@@ -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 {