summaryrefslogtreecommitdiff
path: root/usr.sbin/smtpd/lka.c
diff options
context:
space:
mode:
authorGilles Chehade <gilles@cvs.openbsd.org>2009-11-03 19:13:35 +0000
committerGilles Chehade <gilles@cvs.openbsd.org>2009-11-03 19:13:35 +0000
commitb880b2e87435f2810857d787e3800aff820ff7d4 (patch)
tree9bccf9e8dbdcbbbf1d66504b5192fb08345665fc /usr.sbin/smtpd/lka.c
parent1be69534a57983111366280bd293dfe8ac266190 (diff)
- remove a useless member of struct cond
- have virtual related functions take a map id instead of a map - shrink a tiny bit ruleset matching - add missing lka_resolve_path() call in aliases resolution leading to issues spotted by nicm@
Diffstat (limited to 'usr.sbin/smtpd/lka.c')
-rw-r--r--usr.sbin/smtpd/lka.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/usr.sbin/smtpd/lka.c b/usr.sbin/smtpd/lka.c
index d7170930254..2a87304dc60 100644
--- a/usr.sbin/smtpd/lka.c
+++ b/usr.sbin/smtpd/lka.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: lka.c,v 1.73 2009/11/03 10:56:51 nicm Exp $ */
+/* $OpenBSD: lka.c,v 1.74 2009/11/03 19:13:34 gilles Exp $ */
/*
* Copyright (c) 2008 Pierre-Yves Ritschard <pyr@openbsd.org>
@@ -374,7 +374,7 @@ lka_dispatch_mfa(int sig, short event, void *p)
}
else if (lkasession->path.flags & F_PATH_VIRTUAL) {
log_debug("F_PATH_VIRTUAL");
- ret = aliases_virtual_get(env, lkasession->path.cond->c_match,
+ ret = aliases_virtual_get(env, lkasession->path.cond->c_map,
&lkasession->aliaseslist, &lkasession->path);
log_debug("\tVIRTUAL RESOLVED: %d", ret);
}
@@ -959,7 +959,8 @@ lka_expand_rcpt_iteration(struct smtpd *env, struct aliaseslist *aliases, struct
if (alias->type == ALIAS_ADDRESS) {
lka_rcpt_action(env, lkasession->message.tag, &alias->u.path);
- if (aliases_virtual_get(env, alias->u.path.cond->c_match, aliases, &alias->u.path)) {
+ lka_resolve_path(env, &alias->u.path);
+ if (aliases_virtual_get(env, alias->u.path.cond->c_map, aliases, &alias->u.path)) {
rmalias = alias;
done = 0;
}
@@ -1026,7 +1027,7 @@ lka_resolve_path(struct smtpd *env, struct path *path){
return 1;
}
case C_VDOM: {
- if (aliases_virtual_exist(env, path->cond->c_match, path)) {
+ if (aliases_virtual_exist(env, path->cond->c_map, path)) {
path->flags |= F_PATH_VIRTUAL;
return 1;
}