diff options
author | 2018-12-14 20:22:52 +0000 | |
---|---|---|
committer | 2018-12-14 20:22:52 +0000 | |
commit | 6470e9e569da90f44ffb4c5d789bc8a3b6ff138a (patch) | |
tree | c3c9bebb06338283160780373113a833b6b97566 | |
parent | Delete a note taken during the rev. 1.1 man page splite (diff) | |
download | wireguard-openbsd-6470e9e569da90f44ffb4c5d789bc8a3b6ff138a.tar.xz wireguard-openbsd-6470e9e569da90f44ffb4c5d789bc8a3b6ff138a.zip |
let smtpd fatal on misbehaving proc filters
let filters register the reporting events and filter hooks they support but
only as a stub for now
-rw-r--r-- | usr.sbin/smtpd/lka_filter.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/usr.sbin/smtpd/lka_filter.c b/usr.sbin/smtpd/lka_filter.c index bcb870dee17..b7b0a5b6418 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.14 2018/12/11 13:40:30 gilles Exp $ */ +/* $OpenBSD: lka_filter.c,v 1.15 2018/12/14 20:22:52 gilles Exp $ */ /* * Copyright (c) 2018 Gilles Chehade <gilles@poolp.org> @@ -197,9 +197,13 @@ lka_filter_process_response(const char *name, const char *line) *ep = 0; kind = buffer; + + if (strcmp(kind, "register") == 0) + return 1; + if (strcmp(kind, "filter-result") != 0 && strcmp(kind, "filter-dataline") != 0) - return 1; + return 0; qid = ep+1; if ((ep = strchr(qid, '|')) == NULL) |