[PATCH] syslogd: fix locallog when remote log feature is active
Nicholas Niro
blowfist at xroutine.net
Tue Mar 4 20:17:12 UTC 2025
When the remote log feature is active, running syslogd would not log
locally by default. Without this patch, the only way to activate local
logging was to use the '-L' argument.
tested by doing :
busybox syslogd -n -f /dev/null -O -
And then by running :
busybox logger foo bar
The syslogd process is expected to output a message like :
<date> user.notice <youruser> foo bar
Signed-off-by: Nicholas Niro <blowfist at xroutine.net>
---
sysklogd/syslogd.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sysklogd/syslogd.c b/sysklogd/syslogd.c
index 7558051f0..2ff994b08 100644
--- a/sysklogd/syslogd.c
+++ b/sysklogd/syslogd.c
@@ -1045,7 +1045,7 @@ static int NOINLINE syslogd_init(char **argv)
#endif
/* If they have not specified remote logging, then log locally */
if (ENABLE_FEATURE_REMOTE_LOG && !(opts & OPT_remotelog)) // -R
- option_mask32 |= OPT_locallog;
+ opts |= OPT_locallog;
#if ENABLE_FEATURE_SYSLOGD_CFG
parse_syslogdcfg(opt_f);
#endif
--
2.39.5
More information about the busybox
mailing list