source: freewrt/package/busybox/patches/005-syslogd-fix-wrong-OPT_localog-flag-detection.patch@ 44e51f3

freewrt_2_0
Last change on this file since 44e51f3 was 44e51f3, checked in by Waldemar Brodkorb <wbx@…>, 4 months ago

busybox: update to latest

  • Property mode set to 100644
File size: 1.5 KB
  • sysklogd/syslogd.c

    From 34d331d642c3312e1c04e4650f547f1a67abee24 Mon Sep 17 00:00:00 2001
    From: Andrej Valek <andrej.v@skyrain.eu>
    Date: Wed, 16 Oct 2024 10:15:08 +0200
    Subject: [PATCH] syslogd: fix wrong OPT_locallog flag detection
    
    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.
    
    Signed-off-by: Andrej Valek <andrej.v@skyrain.eu>
    Upstream: https://lists.busybox.net/pipermail/busybox/2024-October/090969.html
    [Thomas: this was reported as beeing needed by Bernd Kuhls at
    https://lore.kernel.org/buildroot/pan$de0bb$35c5a64$ca9b6f21$2408ff40@ID-313208.user.individual.net/,
    but also on the Busybox mailing list at
    https://lists.busybox.net/pipermail/busybox/2023-September/090499.html]
    Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
    ---
     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 b int syslogd_main(int argc UNUSED_PARAM, char **argv)  
    11791179                        }
    11801180                }
    11811181#endif
    1182                 if (!ENABLE_FEATURE_REMOTE_LOG || (opts & OPT_locallog)) {
     1182                if (!ENABLE_FEATURE_REMOTE_LOG || (option_mask32 & OPT_locallog)) {
    11831183                        recvbuf[sz] = '\0'; /* ensure it *is* NUL terminated */
    11841184                        split_escape_and_log(recvbuf, sz);
    11851185                }
Note: See TracBrowser for help on using the repository browser.