-/* $OpenBSD: smtpd.h,v 1.684 2024/05/07 12:10:06 op Exp $ */
+/* $OpenBSD: smtpd.h,v 1.685 2024/05/28 07:10:30 op Exp $ */
/*
* Copyright (c) 2008 Gilles Chehade <gilles@poolp.org>
enum table_type t_type;
char t_config[PATH_MAX];
+ unsigned int t_services;
void *t_handle;
struct table_backend *t_backend;
};
-/* $OpenBSD: table.c,v 1.52 2024/05/07 12:10:06 op Exp $ */
+/* $OpenBSD: table.c,v 1.53 2024/05/28 07:10:30 op Exp $ */
/*
* Copyright (c) 2013 Eric Faurot <eric@openbsd.org>
fatalx("table_create: backend \"%s\" does not exist", backend);
t = xcalloc(1, sizeof(*t));
+ t->t_services = tb->services;
t->t_backend = tb;
if (config) {
int
table_check_service(struct table *t, uint32_t mask)
{
- return t->t_backend->services & mask;
+ return t->t_services & mask;
}
int
-/* $OpenBSD: table_proc.c,v 1.22 2024/05/23 17:10:00 op Exp $ */
+/* $OpenBSD: table_proc.c,v 1.23 2024/05/28 07:10:30 op Exp $ */
/*
* Copyright (c) 2024 Omar Polo <op@openbsd.org>
if (services == 0)
fatalx("table-proc: no services registered");
+ table->t_services = services;
table->t_handle = priv;
return (1);