[PATCH] syslogd: fix locallog when remote log feature is active
blowfist
blowfist at xroutine.net
Wed Mar 5 16:42:18 UTC 2025
Mar. 5, 2025 07:12:42 Csókás Bence <csokas.bence at prolan.hu>:
> Hi,
>
> On 2025. 03. 04. 21:17, Nicholas Niro wrote:
>> 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;
>
> This would then break `timestamp_and_log_internal()`, which checks for this then.
Good catch, I'll send a new patch to fix this.
>
>> + opts |= OPT_locallog;
>> #if ENABLE_FEATURE_SYSLOGD_CFG
>> parse_syslogdcfg(opt_f);
>> #endif
>
> Bence
>
> _______________________________________________
> busybox mailing list
> busybox at busybox.net
> https://lists.busybox.net/mailman/listinfo/busybox
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/busybox/attachments/20250305/cf3388b1/attachment.htm>
More information about the busybox
mailing list