RFE: provide hint if permissions do no allow any journal files to be opened
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 35/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Ferma
- Stack tecnologico
- python
- Ambito
- operating-systems
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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)
...
>>>
- Lingua principale
- C
- Stelle
- 522
- Fork
- 79
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di systemd/python-systemd
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 48/100
systemd/python-systemd#177 · 1 commento · 1 reazione ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 42/100
systemd/python-systemd#169 · 1 commento ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 48/100
systemd/python-systemd#167 · 19 commenti ·
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 35/100
systemd/python-systemd#152 · 1 commento · 13 reazioni ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 45/100
systemd/python-systemd#146 · 2 commenti ·
Tutte le issue di systemd/python-systemd
Issue simili
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 92/100
libsdl-org/SDL#16372 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
corazawaf/coraza-nginx#140 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
BasedHardware/omi#15662 · 1 commento ·
-
Difficoltà 1/5 1-3 ore Idoneità per principianti 88/100
jamesstringer90/appsandbox#160 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100