summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--usr.sbin/smtpd/aliases.c18
-rw-r--r--usr.sbin/smtpd/lka.c16
-rw-r--r--usr.sbin/smtpd/lka_filter.c22
-rw-r--r--usr.sbin/smtpd/lka_session.c4
-rw-r--r--usr.sbin/smtpd/ruleset.c4
-rw-r--r--usr.sbin/smtpd/smtpd.h10
-rw-r--r--usr.sbin/smtpd/table.c10
-rw-r--r--usr.sbin/smtpd/table_db.c10
-rw-r--r--usr.sbin/smtpd/table_getpwnam.c6
-rw-r--r--usr.sbin/smtpd/table_proc.c32
-rw-r--r--usr.sbin/smtpd/table_static.c12
11 files changed, 62 insertions, 82 deletions
diff --git a/usr.sbin/smtpd/aliases.c b/usr.sbin/smtpd/aliases.c
index 93d3fe685ce..9fff15a5e8f 100644
--- a/usr.sbin/smtpd/aliases.c
+++ b/usr.sbin/smtpd/aliases.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: aliases.c,v 1.73 2018/06/16 19:41:26 gilles Exp $ */
+/* $OpenBSD: aliases.c,v 1.74 2018/12/26 14:15:12 eric Exp $ */
/*
* Copyright (c) 2008 Gilles Chehade <gilles@poolp.org>
@@ -58,7 +58,7 @@ aliases_get(struct expand *expand, const char *username)
/* first, check if entry has a user-part tag */
pbuf = strchr(buf, *env->sc_subaddressing_delim);
if (pbuf) {
- ret = table_lookup(mapping, NULL, buf, K_ALIAS, &lk);
+ ret = table_lookup(mapping, buf, K_ALIAS, &lk);
if (ret < 0)
return (-1);
if (ret)
@@ -67,7 +67,7 @@ aliases_get(struct expand *expand, const char *username)
}
/* no user-part tag, try looking up user */
- ret = table_lookup(mapping, NULL, buf, K_ALIAS, &lk);
+ ret = table_lookup(mapping, buf, K_ALIAS, &lk);
if (ret <= 0)
return ret;
@@ -131,7 +131,7 @@ aliases_virtual_get(struct expand *expand, const struct mailaddr *maddr)
if (!bsnprintf(buf, sizeof(buf), "%s%c%s@%s",
user, *env->sc_subaddressing_delim, tag, domain))
return 0;
- ret = table_lookup(mapping, NULL, buf, K_ALIAS, &lk);
+ ret = table_lookup(mapping, buf, K_ALIAS, &lk);
if (ret < 0)
return (-1);
if (ret)
@@ -141,7 +141,7 @@ aliases_virtual_get(struct expand *expand, const struct mailaddr *maddr)
/* then, check if entry exists without user-part tag */
if (!bsnprintf(buf, sizeof(buf), "%s@%s", user, domain))
return 0;
- ret = table_lookup(mapping, NULL, buf, K_ALIAS, &lk);
+ ret = table_lookup(mapping, buf, K_ALIAS, &lk);
if (ret < 0)
return (-1);
if (ret)
@@ -152,7 +152,7 @@ aliases_virtual_get(struct expand *expand, const struct mailaddr *maddr)
if (!bsnprintf(buf, sizeof(buf), "%s%c%s",
user, *env->sc_subaddressing_delim, tag))
return 0;
- ret = table_lookup(mapping, NULL, buf, K_ALIAS, &lk);
+ ret = table_lookup(mapping, buf, K_ALIAS, &lk);
if (ret < 0)
return (-1);
if (ret)
@@ -162,7 +162,7 @@ aliases_virtual_get(struct expand *expand, const struct mailaddr *maddr)
/* Failed ? We lookup for username only */
if (!bsnprintf(buf, sizeof(buf), "%s", user))
return 0;
- ret = table_lookup(mapping, NULL, buf, K_ALIAS, &lk);
+ ret = table_lookup(mapping, buf, K_ALIAS, &lk);
if (ret < 0)
return (-1);
if (ret)
@@ -171,14 +171,14 @@ aliases_virtual_get(struct expand *expand, const struct mailaddr *maddr)
if (!bsnprintf(buf, sizeof(buf), "@%s", domain))
return 0;
/* Failed ? We lookup for catch all for virtual domain */
- ret = table_lookup(mapping, NULL, buf, K_ALIAS, &lk);
+ ret = table_lookup(mapping, buf, K_ALIAS, &lk);
if (ret < 0)
return (-1);
if (ret)
goto expand;
/* Failed ? We lookup for a *global* catch all */
- ret = table_lookup(mapping, NULL, "@", K_ALIAS, &lk);
+ ret = table_lookup(mapping, "@", K_ALIAS, &lk);
if (ret <= 0)
return (ret);
diff --git a/usr.sbin/smtpd/lka.c b/usr.sbin/smtpd/lka.c
index c08e834b281..67f87dfdcd2 100644
--- a/usr.sbin/smtpd/lka.c
+++ b/usr.sbin/smtpd/lka.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: lka.c,v 1.229 2018/12/23 16:37:53 eric Exp $ */
+/* $OpenBSD: lka.c,v 1.230 2018/12/26 14:15:12 eric Exp $ */
/*
* Copyright (c) 2008 Pierre-Yves Ritschard <pyr@openbsd.org>
@@ -234,7 +234,7 @@ lka_imsg(struct mproc *p, struct imsg *imsg)
m_add_int(p, LKA_TEMPFAIL);
}
else {
- ret = table_fetch(table, NULL, K_SOURCE, &lk);
+ ret = table_fetch(table, K_SOURCE, &lk);
if (ret == -1)
m_add_int(p, LKA_TEMPFAIL);
else if (ret == 0)
@@ -282,7 +282,7 @@ lka_imsg(struct mproc *p, struct imsg *imsg)
m_add_int(p, LKA_TEMPFAIL);
}
else {
- ret = table_fetch(table, NULL, K_RELAYHOST, &lk);
+ ret = table_fetch(table, K_RELAYHOST, &lk);
if (ret == -1)
m_add_int(p, LKA_TEMPFAIL);
else if (ret == 0)
@@ -689,7 +689,7 @@ lka_authenticate(const char *tablename, const char *user, const char *password)
return (LKA_TEMPFAIL);
}
- switch (table_lookup(table, NULL, user, K_CREDENTIALS, &lk)) {
+ switch (table_lookup(table, user, K_CREDENTIALS, &lk)) {
case -1:
log_warnx("warn: user credentials lookup fail for %s:%s",
tablename, user);
@@ -719,7 +719,7 @@ lka_credentials(const char *tablename, const char *label, char *dst, size_t sz)
dst[0] = '\0';
- switch (table_lookup(table, NULL, label, K_CREDENTIALS, &lk)) {
+ switch (table_lookup(table, label, K_CREDENTIALS, &lk)) {
case -1:
log_warnx("warn: credentials lookup fail for %s:%s",
tablename, label);
@@ -760,7 +760,7 @@ lka_userinfo(const char *tablename, const char *username, struct userinfo *res)
return (LKA_TEMPFAIL);
}
- switch (table_lookup(table, NULL, username, K_USERINFO, &lk)) {
+ switch (table_lookup(table, username, K_USERINFO, &lk)) {
case -1:
log_warnx("warn: failure during userinfo lookup %s:%s",
tablename, username);
@@ -790,7 +790,7 @@ lka_addrname(const char *tablename, const struct sockaddr *sa,
return (LKA_TEMPFAIL);
}
- switch (table_lookup(table, NULL, source, K_ADDRNAME, &lk)) {
+ switch (table_lookup(table, source, K_ADDRNAME, &lk)) {
case -1:
log_warnx("warn: failure during helo lookup %s:%s",
tablename, source);
@@ -818,7 +818,7 @@ lka_mailaddrmap(const char *tablename, const char *username, const struct mailad
return (LKA_TEMPFAIL);
}
- switch (table_lookup(table, NULL, username, K_MAILADDRMAP, &lk)) {
+ switch (table_lookup(table, username, K_MAILADDRMAP, &lk)) {
case -1:
log_warnx("warn: failure during mailaddrmap lookup %s:%s",
tablename, username);
diff --git a/usr.sbin/smtpd/lka_filter.c b/usr.sbin/smtpd/lka_filter.c
index e4d9b8498bf..35fc0bc31cc 100644
--- a/usr.sbin/smtpd/lka_filter.c
+++ b/usr.sbin/smtpd/lka_filter.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: lka_filter.c,v 1.31 2018/12/23 15:48:16 gilles Exp $ */
+/* $OpenBSD: lka_filter.c,v 1.32 2018/12/26 14:15:12 eric Exp $ */
/*
* Copyright (c) 2018 Gilles Chehade <gilles@poolp.org>
@@ -806,7 +806,7 @@ filter_check_rdns_table(struct filter *filter, enum table_service kind, const ch
if (filter->config->rdns_table == NULL)
return 0;
- if (table_lookup(filter->config->rdns_table, NULL, key, kind, NULL) > 0)
+ if (table_lookup(filter->config->rdns_table, key, kind, NULL) > 0)
ret = 1;
return filter->config->not_rdns_table < 0 ? !ret : ret;
@@ -820,7 +820,7 @@ filter_check_rdns_regex(struct filter *filter, const char *key)
if (filter->config->rdns_regex == NULL)
return 0;
- if (table_lookup(filter->config->rdns_regex, NULL, key, K_REGEX, NULL) > 0)
+ if (table_lookup(filter->config->rdns_regex, key, K_REGEX, NULL) > 0)
ret = 1;
return filter->config->not_rdns_regex < 0 ? !ret : ret;
}
@@ -833,7 +833,7 @@ filter_check_src_table(struct filter *filter, enum table_service kind, const cha
if (filter->config->src_table == NULL)
return 0;
- if (table_lookup(filter->config->src_table, NULL, key, kind, NULL) > 0)
+ if (table_lookup(filter->config->src_table, key, kind, NULL) > 0)
ret = 1;
return filter->config->not_src_table < 0 ? !ret : ret;
}
@@ -846,7 +846,7 @@ filter_check_src_regex(struct filter *filter, const char *key)
if (filter->config->src_regex == NULL)
return 0;
- if (table_lookup(filter->config->src_regex, NULL, key, K_REGEX, NULL) > 0)
+ if (table_lookup(filter->config->src_regex, key, K_REGEX, NULL) > 0)
ret = 1;
return filter->config->not_src_regex < 0 ? !ret : ret;
}
@@ -859,7 +859,7 @@ filter_check_helo_table(struct filter *filter, enum table_service kind, const ch
if (filter->config->helo_table == NULL)
return 0;
- if (table_lookup(filter->config->helo_table, NULL, key, kind, NULL) > 0)
+ if (table_lookup(filter->config->helo_table, key, kind, NULL) > 0)
ret = 1;
return filter->config->not_helo_table < 0 ? !ret : ret;
}
@@ -872,7 +872,7 @@ filter_check_helo_regex(struct filter *filter, const char *key)
if (filter->config->helo_regex == NULL)
return 0;
- if (table_lookup(filter->config->helo_regex, NULL, key, K_REGEX, NULL) > 0)
+ if (table_lookup(filter->config->helo_regex, key, K_REGEX, NULL) > 0)
ret = 1;
return filter->config->not_helo_regex < 0 ? !ret : ret;
}
@@ -885,7 +885,7 @@ filter_check_mail_from_table(struct filter *filter, enum table_service kind, con
if (filter->config->mail_from_table == NULL)
return 0;
- if (table_lookup(filter->config->mail_from_table, NULL, key, kind, NULL) > 0)
+ if (table_lookup(filter->config->mail_from_table, key, kind, NULL) > 0)
ret = 1;
return filter->config->not_mail_from_table < 0 ? !ret : ret;
}
@@ -898,7 +898,7 @@ filter_check_mail_from_regex(struct filter *filter, const char *key)
if (filter->config->mail_from_regex == NULL)
return 0;
- if (table_lookup(filter->config->mail_from_regex, NULL, key, K_REGEX, NULL) > 0)
+ if (table_lookup(filter->config->mail_from_regex, key, K_REGEX, NULL) > 0)
ret = 1;
return filter->config->not_mail_from_regex < 0 ? !ret : ret;
}
@@ -911,7 +911,7 @@ filter_check_rcpt_to_table(struct filter *filter, enum table_service kind, const
if (filter->config->rcpt_to_table == NULL)
return 0;
- if (table_lookup(filter->config->rcpt_to_table, NULL, key, kind, NULL) > 0)
+ if (table_lookup(filter->config->rcpt_to_table, key, kind, NULL) > 0)
ret = 1;
return filter->config->not_rcpt_to_table < 0 ? !ret : ret;
}
@@ -924,7 +924,7 @@ filter_check_rcpt_to_regex(struct filter *filter, const char *key)
if (filter->config->rcpt_to_regex == NULL)
return 0;
- if (table_lookup(filter->config->rcpt_to_regex, NULL, key, K_REGEX, NULL) > 0)
+ if (table_lookup(filter->config->rcpt_to_regex, key, K_REGEX, NULL) > 0)
ret = 1;
return filter->config->not_rcpt_to_regex < 0 ? !ret : ret;
}
diff --git a/usr.sbin/smtpd/lka_session.c b/usr.sbin/smtpd/lka_session.c
index 0ae31548aaf..906dd747ea4 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.88 2018/11/01 18:01:51 gilles Exp $ */
+/* $OpenBSD: lka_session.c,v 1.89 2018/12/26 14:15:12 eric Exp $ */
/*
* Copyright (c) 2011 Gilles Chehade <gilles@poolp.org>
@@ -377,7 +377,7 @@ lka_expand(struct lka_session *lks, struct rule *rule, struct expandnode *xn)
*tag++ = '\0';
userbase = table_find(env, dsp->u.local.table_userbase, NULL);
- r = table_lookup(userbase, NULL, xn->u.user, K_USERINFO, &lk);
+ r = table_lookup(userbase, xn->u.user, K_USERINFO, &lk);
if (r == -1) {
log_trace(TRACE_EXPAND, "expand: lka_expand: "
"backend error while searching user");
diff --git a/usr.sbin/smtpd/ruleset.c b/usr.sbin/smtpd/ruleset.c
index 7ab7755cff6..1239f927876 100644
--- a/usr.sbin/smtpd/ruleset.c
+++ b/usr.sbin/smtpd/ruleset.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ruleset.c,v 1.38 2018/12/22 08:54:02 gilles Exp $ */
+/* $OpenBSD: ruleset.c,v 1.39 2018/12/26 14:15:12 eric Exp $ */
/*
* Copyright (c) 2009 Gilles Chehade <gilles@poolp.org>
@@ -37,7 +37,7 @@
static int
ruleset_match_table_lookup(struct table *table, const char *key, enum table_service service)
{
- switch (table_lookup(table, NULL, key, service, NULL)) {
+ switch (table_lookup(table, key, service, NULL)) {
case 1:
return 1;
case -1:
diff --git a/usr.sbin/smtpd/smtpd.h b/usr.sbin/smtpd/smtpd.h
index 4c81e1cec71..6c1bdbbe0a5 100644
--- a/usr.sbin/smtpd/smtpd.h
+++ b/usr.sbin/smtpd/smtpd.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: smtpd.h,v 1.604 2018/12/26 11:53:02 eric Exp $ */
+/* $OpenBSD: smtpd.h,v 1.605 2018/12/26 14:15:12 eric Exp $ */
/*
* Copyright (c) 2008 Gilles Chehade <gilles@poolp.org>
@@ -368,8 +368,8 @@ struct table_backend {
void *(*open)(struct table *);
int (*update)(struct table *);
void (*close)(void *);
- int (*lookup)(void *, struct dict *, const char *, enum table_service, char **);
- int (*fetch)(void *, struct dict *, enum table_service, char **);
+ int (*lookup)(void *, const char *, enum table_service, char **);
+ int (*fetch)(void *, enum table_service, char **);
};
@@ -1604,9 +1604,9 @@ void table_close(struct table *);
int table_check_use(struct table *, uint32_t, uint32_t);
int table_check_type(struct table *, uint32_t);
int table_check_service(struct table *, uint32_t);
-int table_lookup(struct table *, struct dict *, const char *, enum table_service,
+int table_lookup(struct table *, const char *, enum table_service,
union lookup *);
-int table_fetch(struct table *, struct dict *, enum table_service, union lookup *);
+int table_fetch(struct table *, enum table_service, union lookup *);
void table_destroy(struct smtpd *, struct table *);
void table_add(struct table *, const char *, const char *);
int table_domain_match(const char *, const char *);
diff --git a/usr.sbin/smtpd/table.c b/usr.sbin/smtpd/table.c
index 5d56b99e63b..e4dc739d573 100644
--- a/usr.sbin/smtpd/table.c
+++ b/usr.sbin/smtpd/table.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: table.c,v 1.35 2018/12/26 11:53:02 eric Exp $ */
+/* $OpenBSD: table.c,v 1.36 2018/12/26 14:15:13 eric Exp $ */
/*
* Copyright (c) 2013 Eric Faurot <eric@openbsd.org>
@@ -116,7 +116,7 @@ table_find(struct smtpd *conf, const char *name, const char *tag)
}
int
-table_lookup(struct table *table, struct dict *params, const char *key, enum table_service kind,
+table_lookup(struct table *table, const char *key, enum table_service kind,
union lookup *lk)
{
int r;
@@ -130,7 +130,7 @@ table_lookup(struct table *table, struct dict *params, const char *key, enum tab
return -1;
}
- r = table->t_backend->lookup(table->t_handle, params, lkey, kind, lk ? &buf : NULL);
+ r = table->t_backend->lookup(table->t_handle, lkey, kind, lk ? &buf : NULL);
if (r == 1) {
log_trace(TRACE_LOOKUP, "lookup: %s \"%s\" as %s in table %s:%s -> %s%s%s",
@@ -160,7 +160,7 @@ table_lookup(struct table *table, struct dict *params, const char *key, enum tab
}
int
-table_fetch(struct table *table, struct dict *params, enum table_service kind, union lookup *lk)
+table_fetch(struct table *table, enum table_service kind, union lookup *lk)
{
int r;
char *buf = NULL;
@@ -168,7 +168,7 @@ table_fetch(struct table *table, struct dict *params, enum table_service kind, u
if (table->t_backend->fetch == NULL)
return (-1);
- r = table->t_backend->fetch(table->t_handle, params, kind, lk ? &buf : NULL);
+ r = table->t_backend->fetch(table->t_handle, kind, lk ? &buf : NULL);
if (r == 1) {
log_trace(TRACE_LOOKUP, "lookup: fetch %s from table %s:%s -> %s%s%s",
diff --git a/usr.sbin/smtpd/table_db.c b/usr.sbin/smtpd/table_db.c
index 7808ea2405b..5d031f2d407 100644
--- a/usr.sbin/smtpd/table_db.c
+++ b/usr.sbin/smtpd/table_db.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: table_db.c,v 1.12 2018/12/26 11:53:02 eric Exp $ */
+/* $OpenBSD: table_db.c,v 1.13 2018/12/26 14:15:13 eric Exp $ */
/*
* Copyright (c) 2011 Gilles Chehade <gilles@poolp.org>
@@ -43,8 +43,8 @@
static int table_db_config(struct table *);
static int table_db_update(struct table *);
static void *table_db_open(struct table *);
-static int table_db_lookup(void *, struct dict *, const char *, enum table_service, char **);
-static int table_db_fetch(void *, struct dict *, enum table_service, char **);
+static int table_db_lookup(void *, const char *, enum table_service, char **);
+static int table_db_fetch(void *, enum table_service, char **);
static void table_db_close(void *);
static char *table_db_get_entry(void *, const char *, size_t *);
@@ -143,7 +143,7 @@ table_db_close(void *hdl)
}
static int
-table_db_lookup(void *hdl, struct dict *params, const char *key, enum table_service service,
+table_db_lookup(void *hdl, const char *key, enum table_service service,
char **dst)
{
struct dbhandle *handle = hdl;
@@ -186,7 +186,7 @@ table_db_lookup(void *hdl, struct dict *params, const char *key, enum table_serv
}
static int
-table_db_fetch(void *hdl, struct dict *params, enum table_service service, char **dst)
+table_db_fetch(void *hdl, enum table_service service, char **dst)
{
struct dbhandle *handle = hdl;
struct table *table = handle->table;
diff --git a/usr.sbin/smtpd/table_getpwnam.c b/usr.sbin/smtpd/table_getpwnam.c
index 665df8cafcc..98d2e640253 100644
--- a/usr.sbin/smtpd/table_getpwnam.c
+++ b/usr.sbin/smtpd/table_getpwnam.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: table_getpwnam.c,v 1.6 2018/12/26 11:53:02 eric Exp $ */
+/* $OpenBSD: table_getpwnam.c,v 1.7 2018/12/26 14:15:13 eric Exp $ */
/*
* Copyright (c) 2012 Gilles Chehade <gilles@poolp.org>
@@ -41,7 +41,7 @@
static int table_getpwnam_config(struct table *);
static int table_getpwnam_update(struct table *);
static void *table_getpwnam_open(struct table *);
-static int table_getpwnam_lookup(void *, struct dict *, const char *, enum table_service,
+static int table_getpwnam_lookup(void *, const char *, enum table_service,
char **);
static void table_getpwnam_close(void *);
@@ -83,7 +83,7 @@ table_getpwnam_close(void *hdl)
}
static int
-table_getpwnam_lookup(void *hdl, struct dict *params, const char *key, enum table_service kind,
+table_getpwnam_lookup(void *hdl, const char *key, enum table_service kind,
char **dst)
{
struct passwd *pw;
diff --git a/usr.sbin/smtpd/table_proc.c b/usr.sbin/smtpd/table_proc.c
index 2d20d847c30..9d7b2fe5fb1 100644
--- a/usr.sbin/smtpd/table_proc.c
+++ b/usr.sbin/smtpd/table_proc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: table_proc.c,v 1.9 2018/12/26 11:53:02 eric Exp $ */
+/* $OpenBSD: table_proc.c,v 1.10 2018/12/26 14:15:13 eric Exp $ */
/*
* Copyright (c) 2013 Eric Faurot <eric@openbsd.org>
@@ -167,36 +167,18 @@ table_proc_close(void *arg)
}
static int
-imsg_add_params(struct ibuf *buf, struct dict *params)
+imsg_add_params(struct ibuf *buf)
{
- size_t count;
- const char *key;
- char *value;
- void *iter;
-
- count = 0;
- if (params)
- count = dict_count(params);
+ size_t count = 0;
if (imsg_add(buf, &count, sizeof(count)) == -1)
return (-1);
- if (count == 0)
- return (0);
-
- iter = NULL;
- while (dict_iter(params, &iter, &key, (void **)&value)) {
- if (imsg_add(buf, key, strlen(key) + 1) == -1)
- return (-1);
- if (imsg_add(buf, value, strlen(value) + 1) == -1)
- return (-1);
- }
-
return (0);
}
static int
-table_proc_lookup(void *arg, struct dict *params, const char *k, enum table_service s, char **dst)
+table_proc_lookup(void *arg, const char *k, enum table_service s, char **dst)
{
struct table_proc_priv *priv = arg;
struct ibuf *buf;
@@ -210,7 +192,7 @@ table_proc_lookup(void *arg, struct dict *params, const char *k, enum table_serv
return (-1);
if (imsg_add(buf, &s, sizeof(s)) == -1)
return (-1);
- if (imsg_add_params(buf, params) == -1)
+ if (imsg_add_params(buf) == -1)
return (-1);
if (imsg_add(buf, k, strlen(k) + 1) == -1)
return (-1);
@@ -240,7 +222,7 @@ table_proc_lookup(void *arg, struct dict *params, const char *k, enum table_serv
}
static int
-table_proc_fetch(void *arg, struct dict *params, enum table_service s, char **dst)
+table_proc_fetch(void *arg, enum table_service s, char **dst)
{
struct table_proc_priv *priv = arg;
struct ibuf *buf;
@@ -251,7 +233,7 @@ table_proc_fetch(void *arg, struct dict *params, enum table_service s, char **ds
return (-1);
if (imsg_add(buf, &s, sizeof(s)) == -1)
return (-1);
- if (imsg_add_params(buf, params) == -1)
+ if (imsg_add_params(buf) == -1)
return (-1);
imsg_close(&priv->ibuf, buf);
diff --git a/usr.sbin/smtpd/table_static.c b/usr.sbin/smtpd/table_static.c
index bb4328e944e..e18840bad63 100644
--- a/usr.sbin/smtpd/table_static.c
+++ b/usr.sbin/smtpd/table_static.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: table_static.c,v 1.22 2018/12/26 11:53:02 eric Exp $ */
+/* $OpenBSD: table_static.c,v 1.23 2018/12/26 14:15:13 eric Exp $ */
/*
* Copyright (c) 2013 Eric Faurot <eric@openbsd.org>
@@ -42,10 +42,9 @@
static int table_static_config(struct table *);
static int table_static_update(struct table *);
static void *table_static_open(struct table *);
-static int table_static_lookup(void *, struct dict *, const char *,
- enum table_service, char **);
-static int table_static_fetch(void *, struct dict *, enum table_service,
+static int table_static_lookup(void *, const char *, enum table_service,
char **);
+static int table_static_fetch(void *, enum table_service, char **);
static void table_static_close(void *);
struct table_backend table_backend_static = {
@@ -216,7 +215,7 @@ table_static_close(void *hdl)
}
static int
-table_static_lookup(void *hdl, struct dict *params, const char *key,
+table_static_lookup(void *hdl, const char *key,
enum table_service service, char **dst)
{
struct table *m = hdl;
@@ -266,8 +265,7 @@ table_static_lookup(void *hdl, struct dict *params, const char *key,
}
static int
-table_static_fetch(void *hdl, struct dict *params,
- enum table_service service, char **dst)
+table_static_fetch(void *hdl, enum table_service service, char **dst)
{
struct table *t = hdl;
const char *k;