summaryrefslogtreecommitdiff
path: root/src/shared/journal-util.h
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2018-02-19 22:40:26 +0100
committerLennart Poettering <lennart@poettering.net>2018-02-20 22:36:01 +0100
commite79d0b59c8d01d35343b21d02d997d2579c32f27 (patch)
tree2999a5c8332215ae77c1b08c48e32b800c690f70 /src/shared/journal-util.h
parent2e10cc5649193eef5117fa5186869fbb74b0481e (diff)
downloadsystemd-e79d0b59c8d01d35343b21d02d997d2579c32f27.tar.gz
journalctl: improve hint about lack of access for --user-unit=...
When running journalctl --user-unit=foo as an unprivileged user we could get the usual hint: Hint: You are currently not seeing messages from the system and other users. Users in groups 'adm', 'systemd-journal', 'wheel' can see all messages. ... But with --user-unit our filter is: (((_UID=0 OR _UID=1000) AND OBJECT_SYSTEMD_USER_UNIT=foo.service) OR ((_UID=0 OR _UID=1000) AND COREDUMP_USER_UNIT=foo.service) OR (_UID=1000 AND USER_UNIT=foo.service) OR (_UID=1000 AND _SYSTEMD_USER_UNIT=foo.service)) so we would never see messages from other users. We could still see messages from the system. In fact, on my machine the only messages with OBJECT_SYSTEMD_USER_UNIT= are from the system: journalctl $(journalctl -F OBJECT_SYSTEMD_USER_UNIT|sed 's/.*/OBJECT_SYSTEMD_USER_UNIT=\0/') Thus, a more correct hint is that we cannot see messages from the system. Make it so. Fixes #7887.
Diffstat (limited to 'src/shared/journal-util.h')
-rw-r--r--src/shared/journal-util.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/shared/journal-util.h b/src/shared/journal-util.h
index ef5e314d37..f973729a32 100644
--- a/src/shared/journal-util.h
+++ b/src/shared/journal-util.h
@@ -26,4 +26,4 @@
bool journal_field_valid(const char *p, size_t l, bool allow_protected);
-int journal_access_check_and_warn(sd_journal *j, bool quiet);
+int journal_access_check_and_warn(sd_journal *j, bool quiet, bool want_other_users);