mirror of
https://git.busybox.net/busybox
synced 2025-05-09 20:24:01 +02:00
In the recent refactoring of 'syslogd_main', a regression was
introduced in handling the manual bitwise OR of 'OPT_locallog' as
follows:
if (ENABLE_FEATURE_REMOTE_LOG && !(opts & OPT_remotelog)) // -R
option_mask32 |= OPT_locallog;
'opts' represents the locally-scoped output of 'getopt32' and
'option_mask32' represents the globally-scoped state of the
same. Consequently, the above performs a bitwise OR to include
'OPT_locallog' of the globally-scoped option state, which 'opts' will
not reflect locally.
Manipulating the global, rather than local, state is correct as
'timestamp_and_log_internal' will later need to check 'OPT_locallog'.
However, when the aforementioned refactor occurred, the following
regressing change was made:
- if (!ENABLE_FEATURE_REMOTE_LOG || (option_mask32 & OPT_locallog)) {
+ if (!ENABLE_FEATURE_REMOTE_LOG || (opts & OPT_locallog)) {
breaking the spatially- and temporally-removed check in
'timestamp_and_log_internal'.
Fixes:
|
||
---|---|---|
.. | ||
Config.src | ||
Kbuild.src | ||
klogd.c | ||
logger.c | ||
logread.c | ||
syslogd.c | ||
syslogd_and_logger.c |