summaryrefslogtreecommitdiff
path: root/src/nss-systemd
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2022-01-11 13:36:39 +0100
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2022-01-11 13:39:52 +0100
commita7d15a24659770b0fa9f4cd26fc7bbb17765cbb7 (patch)
tree6795f52523c012270f8ca0f4c976704d427aea36 /src/nss-systemd
parent56a5f4969b96529c82ec8cc08db4fa8e9c61e7b9 (diff)
downloadsystemd-a7d15a24659770b0fa9f4cd26fc7bbb17765cbb7.tar.gz
nss: only read logging config from environment variables
log_parse_environment() uses should_parse_proc_cmdline() to determine whether it should parse settings from the kernel command line. But the checks that should_parse_proc_cmdline() apply to the whole process, and we could get a positive answer also when log_parse_environment() was called from one of the nss modules. In case of nss-modules, we don't want to look at the kernel command line. log_parse_environment_variables() that only looks at the environment variables is split out and used in the nss modules. Fixes #22020.
Diffstat (limited to 'src/nss-systemd')
-rw-r--r--src/nss-systemd/nss-systemd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nss-systemd/nss-systemd.c b/src/nss-systemd/nss-systemd.c
index c6c00c40e6..e87f1d31b3 100644
--- a/src/nss-systemd/nss-systemd.c
+++ b/src/nss-systemd/nss-systemd.c
@@ -118,7 +118,7 @@ static GetentData getsgent_data = {
static void setup_logging_once(void) {
static pthread_once_t once = PTHREAD_ONCE_INIT;
- assert_se(pthread_once(&once, log_parse_environment) == 0);
+ assert_se(pthread_once(&once, log_parse_environment_variables) == 0);
}
#define NSS_ENTRYPOINT_BEGIN \