summaryrefslogtreecommitdiff
path: root/usr.sbin/smtpd
diff options
context:
space:
mode:
authorGilles Chehade <gilles@cvs.openbsd.org>2015-11-30 11:14:02 +0000
committerGilles Chehade <gilles@cvs.openbsd.org>2015-11-30 11:14:02 +0000
commite8fdbdc794672e8d3885e49f535826182682d6f8 (patch)
treea8c72b05ecdf7be9cd4077667ecc0022bf0992b9 /usr.sbin/smtpd
parent58cd23f8b673bf068b9e90a5f0b96b137a605dcc (diff)
remove mailaddr_to_username(), no longer needed
suggested by jung@
Diffstat (limited to 'usr.sbin/smtpd')
-rw-r--r--usr.sbin/smtpd/lka_session.c16
1 files changed, 4 insertions, 12 deletions
diff --git a/usr.sbin/smtpd/lka_session.c b/usr.sbin/smtpd/lka_session.c
index 13e409af552..cf5e403b8ed 100644
--- a/usr.sbin/smtpd/lka_session.c
+++ b/usr.sbin/smtpd/lka_session.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: lka_session.c,v 1.74 2015/11/30 10:56:25 gilles Exp $ */
+/* $OpenBSD: lka_session.c,v 1.75 2015/11/30 11:14:01 gilles Exp $ */
/*
* Copyright (c) 2011 Gilles Chehade <gilles@poolp.org>
@@ -68,7 +68,6 @@ static void lka_submit(struct lka_session *, struct rule *,
static void lka_resume(struct lka_session *);
static size_t lka_expand_format(char *, size_t, const struct envelope *,
const struct userinfo *);
-static void mailaddr_to_username(const struct mailaddr *, char *, size_t);
static int mod_lowercase(char *, size_t);
static int mod_uppercase(char *, size_t);
@@ -322,9 +321,8 @@ lka_expand(struct lka_session *lks, struct rule *rule, struct expandnode *xn)
* we eventually strip the '+'-part before lookup.
*/
maddr = xn->u.mailaddr;
- mailaddr_to_username(&xn->u.mailaddr, maddr.user,
+ xlowercase(maddr.user, xn->u.mailaddr.user,
sizeof maddr.user);
-
r = aliases_virtual_get(&lks->expand, &maddr);
if (r == -1) {
lks->error = LKA_TEMPFAIL;
@@ -343,8 +341,8 @@ lka_expand(struct lka_session *lks, struct rule *rule, struct expandnode *xn)
lks->expand.alias = 1;
memset(&node, 0, sizeof node);
node.type = EXPAND_USERNAME;
- mailaddr_to_username(&xn->u.mailaddr, node.u.user,
- sizeof node.u.user);
+ xlowercase(node.u.user, xn->u.mailaddr.user,
+ sizeof node.u.user);
node.mapping = rule->r_mapping;
node.userbase = rule->r_userbase;
expand_insert(&lks->expand, &node);
@@ -841,12 +839,6 @@ lka_expand_format(char *buf, size_t len, const struct envelope *ep,
return ret;
}
-static void
-mailaddr_to_username(const struct mailaddr *maddr, char *dst, size_t len)
-{
- xlowercase(dst, maddr->user, len);
-}
-
static int
mod_lowercase(char *buf, size_t len)
{