[PATCH] syslogd: fix wrong OPT_locallog flag detection
Michael Tokarev
mjt at tls.msk.ru
Wed Oct 16 18:03:20 UTC 2024
On 16.10.2024 11:15, Andrej Valek wrote:
> The OPT_locallog was set on "option_mask32" but checked on local
> "opts" variable. While this flag it's used on multiple places can't be
> has to be used with "option_mask32". Without this change syslogd
> is more-less unusable while no messages are logged locally.
This has been submitted by Jeff Pohlmeyer on Thu Sep 21 12:10:49 UTC
2023 ---
http://lists.busybox.net/pipermail/busybox/2023-September/090499.html
fwiw.
/mjt
> Signed-off-by: Andrej Valek <andrej.v at skyrain.eu>
> ---
> sysklogd/syslogd.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/sysklogd/syslogd.c b/sysklogd/syslogd.c
> index 7558051f0..fa03aa280 100644
> --- a/sysklogd/syslogd.c
> +++ b/sysklogd/syslogd.c
> @@ -1179,7 +1179,7 @@ int syslogd_main(int argc UNUSED_PARAM, char **argv)
> }
> }
> #endif
> - if (!ENABLE_FEATURE_REMOTE_LOG || (opts & OPT_locallog)) {
> + if (!ENABLE_FEATURE_REMOTE_LOG || (option_mask32 & OPT_locallog)) {
> recvbuf[sz] = '\0'; /* ensure it *is* NUL terminated */
> split_escape_and_log(recvbuf, sz);
> }
More information about the busybox
mailing list