diff options
author | Jacek Masiulaniec <jacekm@cvs.openbsd.org> | 2010-06-01 23:06:26 +0000 |
---|---|---|
committer | Jacek Masiulaniec <jacekm@cvs.openbsd.org> | 2010-06-01 23:06:26 +0000 |
commit | e4fa6c1a72d6955515ed921d46e9551c550ef257 (patch) | |
tree | 8720dab55e68292502b6e946bc49b8417747963d /usr.sbin/smtpd/aliases.c | |
parent | 98969c9e21deea8c51f1865d89b9e1e694cc033a (diff) |
new queue, again; gcc2 compile tested by deraadt
Diffstat (limited to 'usr.sbin/smtpd/aliases.c')
-rw-r--r-- | usr.sbin/smtpd/aliases.c | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/usr.sbin/smtpd/aliases.c b/usr.sbin/smtpd/aliases.c index f9dfa1fcee7..9a69d927827 100644 --- a/usr.sbin/smtpd/aliases.c +++ b/usr.sbin/smtpd/aliases.c @@ -1,4 +1,4 @@ -/* $OpenBSD: aliases.c,v 1.35 2010/06/01 19:47:08 jacekm Exp $ */ +/* $OpenBSD: aliases.c,v 1.36 2010/06/01 23:06:23 jacekm Exp $ */ /* * Copyright (c) 2008 Gilles Chehade <gilles@openbsd.org> @@ -67,20 +67,13 @@ aliases_exist(struct smtpd *env, objid_t mapid, char *username) } int -aliases_get(struct smtpd *env, objid_t mapid, struct expandtree *expandtree, char *username) +aliases_get(struct smtpd *env, objid_t mapid, struct expandtree *tree, char *username) { - struct map *map; struct map_alias *map_alias; struct expandnode *expnode; - char buf[MAXLOGNAME]; size_t nbaliases; - map = map_find(env, mapid); - if (map == NULL) - return 0; - - lowercase(buf, username, sizeof(buf)); - map_alias = map_lookup(env, mapid, buf, K_ALIAS); + map_alias = map_lookup(env, mapid, username, K_ALIAS); if (map_alias == NULL) return 0; @@ -88,9 +81,9 @@ aliases_get(struct smtpd *env, objid_t mapid, struct expandtree *expandtree, cha nbaliases = 0; RB_FOREACH(expnode, expandtree, &map_alias->expandtree) { if (expnode->type == EXPAND_INCLUDE) - nbaliases += aliases_expand_include(expandtree, expnode->u.filename); + nbaliases += aliases_expand_include(tree, expnode->u.filename); else { - expandtree_increment_node(expandtree, expnode); + expandtree_increment_node(tree, expnode); nbaliases++; } } |