diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2016-08-11 22:48:58 -0400 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2016-08-12 00:38:03 -0400 |
commit | 10752e829b5751d332c0cfb95d69754bc4875ee9 (patch) | |
tree | 57f8a40bca6da93c55a60df52ed0947bd53c38c1 /src/journal | |
parent | 1aaa68f535a4cb5908917031610bb7473baa30c7 (diff) |
sd-journal: allow SYSTEM and CURRENT_USER flags with sd_j_open_directory[_fd]
There is no reason not to. This makes journalctl -D ... --system work,
useful for example when viewing files from a deactivated container.
Diffstat (limited to 'src/journal')
-rw-r--r-- | src/journal/sd-journal.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/journal/sd-journal.c b/src/journal/sd-journal.c index a9e90c159a..082d2dd178 100644 --- a/src/journal/sd-journal.c +++ b/src/journal/sd-journal.c @@ -1815,7 +1815,8 @@ fail: } #define OPEN_DIRECTORY_ALLOWED_FLAGS \ - SD_JOURNAL_OS_ROOT + (SD_JOURNAL_OS_ROOT | \ + SD_JOURNAL_SYSTEM | SD_JOURNAL_CURRENT_USER ) _public_ int sd_journal_open_directory(sd_journal **ret, const char *path, int flags) { sd_journal *j; @@ -1873,7 +1874,8 @@ fail: } #define OPEN_DIRECTORY_FD_ALLOWED_FLAGS \ - SD_JOURNAL_OS_ROOT + (SD_JOURNAL_OS_ROOT | \ + SD_JOURNAL_SYSTEM | SD_JOURNAL_CURRENT_USER ) _public_ int sd_journal_open_directory_fd(sd_journal **ret, int fd, int flags) { sd_journal *j; |