Colin Walters
5961d29514
sysusers: Parse more truncated entries
...
This isn't mentioned in the docs, but the tooling
will happily accept missing GECOS or even the uid field
for users.
xref https://github.com/bootc-dev/bootc/issues/1331
Signed-off-by: Colin Walters <walters@verbum.org >
2025-05-26 21:03:34 -04:00
Colin Walters
bd317c3b60
sysusers: Also verify parsing of other entry types
...
xref https://github.com/bootc-dev/bootc/issues/1331
2025-05-26 20:45:34 -04:00
Colin Walters
6da8c2f063
sysusers: Parse path references too
...
These are uncommon, but valid.
xref: https://github.com/bootc-dev/bootc/issues/1331
Signed-off-by: Colin Walters <walters@verbum.org >
2025-05-26 20:39:24 -04:00
Colin Walters
ab827f5b8c
sysusers: Parse 'u!'
...
This was added in newer systemd.
xref: https://github.com/bootc-dev/bootc/issues/1331
Signed-off-by: Colin Walters <walters@verbum.org >
2025-05-26 20:39:24 -04:00
Colin Walters
2b32297540
sysusers: Parse a leading - in user
...
This is used in the wild by `vboxadd` from `virtualbox-guest-additions`.
Signed-off-by: Colin Walters <walters@verbum.org >
2025-02-22 08:54:35 -05:00
Colin Walters
552da45c6d
sysusers: Handle named group references
...
The libvirt package has this entry with a numeric user but
an explicit named group reference:
`u qemu 107:qemu "qemu user" - -`
Fix the parser to handle this.
Signed-off-by: Colin Walters <walters@verbum.org >
2025-02-22 08:35:22 -05:00
Colin Walters
aa635b3a64
sysusers: Make loading /etc/passwd optional
...
On general principle; this fixes a test failure in the lint unit
tests which don't create /etc/passwd.
But also, someone might reasonably create an image this way.
Signed-off-by: Colin Walters <walters@verbum.org >
2025-02-14 10:49:23 -05:00
Colin Walters
569d52a762
sysusers: Add analysis support
...
Signed-off-by: Colin Walters <walters@verbum.org >
2025-02-14 10:49:23 -05:00
Colin Walters
7bb408dc95
sysusers: Import nameservice code from rpm-ostree
...
This imports the code from
https://github.com/coreos/rpm-ostree/tree/main/rust/src/nameservice
as of commit
e1d43ae9e8
Signed-off-by: Colin Walters <walters@verbum.org >
2025-02-14 10:49:23 -05:00
Colin Walters
120db64abc
sysusers: New stub crate
...
Signed-off-by: Colin Walters <walters@verbum.org >
2025-02-14 10:49:23 -05:00