summaryrefslogtreecommitdiff
path: root/usr.sbin/smtpd/smtpd.h
diff options
context:
space:
mode:
authorGilles Chehade <gilles@cvs.openbsd.org>2019-12-12 22:10:48 +0000
committerGilles Chehade <gilles@cvs.openbsd.org>2019-12-12 22:10:48 +0000
commitc061781b8e63c71074b410e3b8a1562c30b15b22 (patch)
tree57175ef4fe327265d2ff038f45b57bec5dfbe319 /usr.sbin/smtpd/smtpd.h
parente2b406712e4ad7201e9f4545798e0fe136f7ae51 (diff)
filter protocol has an initial handshake within which smtpd tells filters
about a few global configuration informations. this makes smtpd tell proc filters for which subsystem they are registered allowing them to register only events that are relevant.
Diffstat (limited to 'usr.sbin/smtpd/smtpd.h')
-rw-r--r--usr.sbin/smtpd/smtpd.h24
1 files changed, 15 insertions, 9 deletions
diff --git a/usr.sbin/smtpd/smtpd.h b/usr.sbin/smtpd/smtpd.h
index 39ca485abcf..acb8f5f5a3c 100644
--- a/usr.sbin/smtpd/smtpd.h
+++ b/usr.sbin/smtpd/smtpd.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: smtpd.h,v 1.643 2019/11/25 14:18:33 gilles Exp $ */
+/* $OpenBSD: smtpd.h,v 1.644 2019/12/12 22:10:47 gilles Exp $ */
/*
* Copyright (c) 2008 Gilles Chehade <gilles@poolp.org>
@@ -1032,22 +1032,28 @@ enum lka_resp_status {
LKA_PERMFAIL
};
-struct processor {
+enum filter_type {
+ FILTER_TYPE_BUILTIN,
+ FILTER_TYPE_PROC,
+ FILTER_TYPE_CHAIN,
+};
+
+enum filter_subsystem {
+ FILTER_SUBSYSTEM_SMTP_IN = 1
+};
+
+struct filter_proc {
const char *command;
const char *user;
const char *group;
const char *chroot;
int errfd;
-};
-
-enum filter_type {
- FILTER_TYPE_BUILTIN,
- FILTER_TYPE_PROC,
- FILTER_TYPE_CHAIN,
+ enum filter_subsystem filter_subsystem;
};
struct filter_config {
char *name;
+ enum filter_subsystem filter_subsystem;
enum filter_type filter_type;
enum filter_phase phase;
char *reject;
@@ -1334,7 +1340,7 @@ int lka(void);
/* lka_proc.c */
int lka_proc_ready(void);
-void lka_proc_forked(const char *, int);
+void lka_proc_forked(const char *, uint32_t, int);
void lka_proc_errfd(const char *, int);
struct io *lka_proc_get_io(const char *);