diff --git a/man/sd_journal_open.xml b/man/sd_journal_open.xml
index 153af2387f..74e67023b5 100644
--- a/man/sd_journal_open.xml
+++ b/man/sd_journal_open.xml
@@ -129,10 +129,13 @@
sd_journal_open_directory() is similar to sd_journal_open() but
takes an absolute directory path as argument. All journal files in this directory will be opened and interleaved
- automatically. This call also takes a flags argument. The only flags parameter accepted by this call is
- SD_JOURNAL_OS_ROOT. If specified, the journal files are searched below the usual
- /var/log/journal and /run/log/journal relative to the specified path,
- instead of directly beneath it.
+ automatically. This call also takes a flags argument. The flags parameters accepted by this call are
+ SD_JOURNAL_OS_ROOT, SD_JOURNAL_SYSTEM, and
+ SD_JOURNAL_CURRENT_USER. If SD_JOURNAL_OS_ROOT is specified, journal
+ files are searched for below the usual /var/log/journal and
+ /run/log/journal relative to the specified path, instead of directly beneath it.
+ The other two flags limit which files are opened, the same as for sd_journal_open().
+
sd_journal_open_directory_fd() is similar to
sd_journal_open_directory(), but takes a file descriptor referencing a directory in the file
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;