image-info: read the system passwd for ostrees
When analyzing a ostree filesystem, also parse and add the system passwd and group files.
This commit is contained in:
parent
0479bfc78a
commit
ee240e2bf4
1 changed files with 7 additions and 0 deletions
|
|
@ -248,6 +248,13 @@ def append_filesystem(report, tree, *, is_ostree=False):
|
|||
with open(f"{tree}/etc/group") as f:
|
||||
report["groups"] = sorted(f.read().strip().split("\n"))
|
||||
|
||||
if is_ostree:
|
||||
with open(f"{tree}/usr/lib/passwd") as f:
|
||||
report["passwd-system"] = sorted(f.read().strip().split("\n"))
|
||||
|
||||
with open(f"{tree}/usr/lib/group") as f:
|
||||
report["groups-system"] = sorted(f.read().strip().split("\n"))
|
||||
|
||||
if os.path.exists(f"{tree}/boot") and len(os.listdir(f"{tree}/boot")) > 0:
|
||||
assert "bootmenu" not in report
|
||||
try:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue