From f108ec74c278b14363dc9ad1274596f284d21868 Mon Sep 17 00:00:00 2001 From: Jeremy Harris Date: Fri, 27 Jan 2023 10:31:11 +0000 Subject: Support use-but-not-create of notifier socket --- src/src/daemon.c | 7 ++++++- src/src/exim.c | 2 +- src/src/globals.c | 1 + src/src/globals.h | 1 + 4 files changed, 9 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/src/daemon.c b/src/src/daemon.c index 05d94b188..c3ab735d0 100644 --- a/src/src/daemon.c +++ b/src/src/daemon.c @@ -1169,7 +1169,7 @@ const uschar * where; struct sockaddr_un sa_un = {.sun_family = AF_UNIX}; ssize_t len; -if (!notifier_socket || !*notifier_socket) +if (!f.notifier_socket_en) { DEBUG(D_any) debug_printf("-oY used so not creating notifier socket\n"); return; @@ -1180,6 +1180,11 @@ if (override_local_interfaces && !override_pid_file_path) debug_printf("-oX used without -oP so not creating notifier socket\n"); return; } +if (!notifier_socket || !*notifier_socket) + { + DEBUG(D_any) debug_printf("no name for notifier socket\n"); + return; + } DEBUG(D_any) debug_printf("creating notifier socket\n"); diff --git a/src/src/exim.c b/src/src/exim.c index dc082f392..9072ffd54 100644 --- a/src/src/exim.c +++ b/src/src/exim.c @@ -3450,7 +3450,7 @@ on the second character (the one after '-'), to save some effort. */ case 'Y': if (*argrest) badarg = TRUE; - else notifier_socket = NULL; + else f.notifier_socket_en = FALSE; break; /* Unknown -o argument */ diff --git a/src/src/globals.c b/src/src/globals.c index efe34902a..7af345465 100644 --- a/src/src/globals.c +++ b/src/src/globals.c @@ -280,6 +280,7 @@ struct global_flags f = .no_mbox_unspool = FALSE, #endif .no_multiline_responses = FALSE, + .notifier_socket_en = TRUE, .parse_allow_group = FALSE, .parse_found_group = FALSE, diff --git a/src/src/globals.h b/src/src/globals.h index 5aae73fba..f2e147670 100644 --- a/src/src/globals.h +++ b/src/src/globals.h @@ -246,6 +246,7 @@ extern struct global_flags { BOOL no_mbox_unspool :1; /* don't unlink files in /scan directory */ #endif BOOL no_multiline_responses :1; /* For broken clients */ + BOOL notifier_socket_en :1; /* Permit create of notifier socket */ BOOL parse_allow_group :1; /* Allow group syntax */ BOOL parse_found_group :1; /* In the middle of a group */ -- cgit v1.2.1