mirror of
https://github.com/systemd/systemd.git
synced 2025-03-28 02:50:16 +03:00
sd-journal: don't check namespaces if we have no namespace to go by
Fixes: #15528
This commit is contained in:
parent
73781de41f
commit
2b6df46d21
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user