RFE: provide hint if permissions do no allow any journal files to be opened
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Anfängerfreundlichkeit
- 35/100
- Issue-Typ
- Feature
- Klarheit
- Größtenteils klar
- Aktivitätsstatus
- Veraltet
- Tech-Stack
- python
- Bereich
- operating-systems
Rechercherichtung
Start with the Python systemd.journal.Reader() entry point and reproduce the CentOS permission case using this_boot(), log_level(), and get_next(). The change is complete when reading with no accessible journal files reports the insufficient-permissions condition instead of silently yielding empty results; the payload names no source file or test.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
Reading from journald without permission to do so should throw an exception but doesn't?
build:~$ cat /etc/os-release
NAME="CentOS Linux"
VERSION="7 (Core)"
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="7"
PRETTY_NAME="CentOS Linux 7 (Core)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:centos:centos:7"
HOME_URL="https://www.centos.org/"
BUG_REPORT_URL="https://bugs.centos.org/"
CENTOS_MANTISBT_PROJECT="CentOS-7"
CENTOS_MANTISBT_PROJECT_VERSION="7"
REDHAT_SUPPORT_PRODUCT="centos"
REDHAT_SUPPORT_PRODUCT_VERSION="7"
build:~$
build:~$ groups
developers
build:~$
build:~$ journalctl --since "1 hour ago"
Hint: You are currently not seeing messages from other users and the system.
Users in the 'systemd-journal' group can see all messages. Pass -q to
turn off this notice.
No journal files were opened due to insufficient permissions.
build:~$
build:~$ python3.6
Python 3.6.3 (default, Jan 4 2018, 16:40:53)
[GCC 4.8.5 20150623 (Red Hat 4.8.5-16)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>>
>>>
>>> from systemd import journal
>>> j = journal.Reader()
>>> j.this_boot()
>>> j.log_level(journal.LOG_DEBUG)
>>> j.get_next()
{}
>>> for entry in j:
... print(entry)
...
>>>
- Vorherrschende Sprache
- C
- Sterne
- 522
- Forks
- 79
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beitragsleitfaden
Für dieses Repository ist kein Beitragsleitfaden indexiert
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus systemd/python-systemd
-
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 48/100
systemd/python-systemd#177 · 1 Kommentar · 1 Reaktion ·
-
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 42/100
systemd/python-systemd#169 · 1 Kommentar ·
-
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 48/100
systemd/python-systemd#167 · 19 Kommentare ·
-
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 35/100
systemd/python-systemd#152 · 1 Kommentar · 13 Reaktionen ·
-
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 45/100
systemd/python-systemd#146 · 2 Kommentare ·
Alle Issues in systemd/python-systemd
Ähnliche Issues
-
task
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 70/100
vsanthanam/JBird#429 ·
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 70/100
-
bug documentation
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 75/100
es-ude/OnDeviceTraining#459 ·
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 65/100
bilelmoussaoui/gobject-linter#199 · 1 Kommentar ·
-
bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 75/100
bradcypert/plum#53 ·