mirror of
https://github.com/systemd/systemd.git
synced 2025-03-19 22:50:17 +03:00
Merge pull request #15544 from poettering/fix-journalctl-namespace
sd-journal: fix namespace check
This commit is contained in:
commit
b70cc80ffb
@ -1626,9 +1626,10 @@ static int add_directory(
|
||||
!((dirname && dirname_is_machine_id(dirname) > 0) || path_has_prefix(j, path, "/run")))
|
||||
return 0;
|
||||
|
||||
if (!(FLAGS_SET(j->flags, SD_JOURNAL_ALL_NAMESPACES) ||
|
||||
dirname_has_namespace(dirname, j->namespace) > 0 ||
|
||||
(FLAGS_SET(j->flags, SD_JOURNAL_INCLUDE_DEFAULT_NAMESPACE) && dirname_has_namespace(dirname, NULL) > 0)))
|
||||
if (dirname &&
|
||||
(!(FLAGS_SET(j->flags, SD_JOURNAL_ALL_NAMESPACES) ||
|
||||
dirname_has_namespace(dirname, j->namespace) > 0 ||
|
||||
(FLAGS_SET(j->flags, SD_JOURNAL_INCLUDE_DEFAULT_NAMESPACE) && dirname_has_namespace(dirname, NULL) > 0))))
|
||||
return 0;
|
||||
|
||||
r = directory_open(j, path, &d);
|
||||
|
@ -106,4 +106,7 @@ systemctl kill --signal=SIGKILL systemd-journald
|
||||
sleep 3
|
||||
[[ ! -f "/i-lose-my-logs" ]]
|
||||
|
||||
# https://github.com/systemd/systemd/issues/15528
|
||||
journalctl --follow --file=/var/log/journal/*/* | head -n1 || [[ $? -eq 1 ]]
|
||||
|
||||
touch /testok
|
||||
|
Loading…
x
Reference in New Issue
Block a user