mirror of
https://github.com/systemd/systemd.git
synced 2026-07-12 02:24:15 +00:00
Don't open /var journals in volatile mode when runtime_journal==NULL
This commit is contained in:
committed by
Lennart Poettering
parent
8908ceb7a8
commit
d64441b669
@@ -408,6 +408,13 @@ static JournalFile* find_journal(Server *s, uid_t uid) {
|
||||
if (s->runtime_journal)
|
||||
return s->runtime_journal;
|
||||
|
||||
/* If we are not in persistent mode, then we need return NULL immediately rather than opening a
|
||||
* persistent journal of any sort.
|
||||
*
|
||||
* Fixes https://github.com/systemd/systemd/issues/20390 */
|
||||
if (!IN_SET(s->storage, STORAGE_AUTO, STORAGE_PERSISTENT))
|
||||
return NULL;
|
||||
|
||||
if (uid_for_system_journal(uid))
|
||||
return s->system_journal;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user