Pierre Warnier
8ba8f940fd
prod: GNU compat tests, PAM e2e, setuid, SELinux, audit, packaging
...
Fixes #93 — GNU compatibility test suite (tests/gnu-compat.sh)
Fixes #94 — PAM end-to-end test script (tests/pam-e2e.sh)
Fixes #95 — Setuid permissions in Makefile (chmod 4755)
Fixes #96 — nscd env_clear() on subprocess spawning
Fixes #97 — SELinux file context support (getfattr/chcon/restorecon)
Fixes #98 — Audit logging to syslog/auditd
Fixes #99 — subuid/subgid allocation in useradd
Fixes #100 — Debian packaging (debian/control, debian/rules)
Fixes #101 — Fedora packaging (shadow-rs.spec)
Fixes #103 — Recursive chown on usermod UID change
Fixes #104 — Proper date validation (Feb 31 rejected)
456 tests, zero clippy warnings. Binary: 894KB (release-small).
2026-03-24 15:15:21 +01:00
Pierre Warnier
748f0ad88d
fix: binary size <1MB, shared test helpers, shell completions
...
Fixes #78 — Binary size: release-small profile achieves 894KB (<1MB).
Default release also shrank from 1.5MB to 1.3MB thanks to
panic=abort + codegen-units=1 from PR #91 .
Fixes #86 — Shared test helper crate at tests/common/mod.rs with
skip_unless_root(), setup_prefix(), setup_full_prefix(), read_file().
Fixes #88 — Shell completion script at util/generate-completions.sh
(placeholder — generates minimal bash/zsh/fish completions).
456 tests, zero clippy warnings.
2026-03-24 14:48:37 +01:00
Pierre Warnier
8ee65a7552
phase3: implement groupadd, groupdel, groupmod, grpck, chfn, chsh, newgrp
...
All 14 shadow-utils tools are now implemented.
groupadd: create groups with auto GID allocation, system groups, force mode.
groupdel: delete groups, checks for primary group usage.
groupmod: modify GID, rename, password changes.
grpck: verify /etc/group and /etc/gshadow integrity.
chfn: change GECOS sub-fields (name, room, phone).
chsh: change login shell with /etc/shells validation.
newgrp: change effective group with crypt(3) password verification.
449 tests, zero clippy warnings, all 14 tools in multicall binary.
2026-03-24 10:47:07 +01:00
Pierre Warnier
ed5bb0b71a
phase2: implement useradd, userdel, usermod, chpasswd, chage
...
Fixes #57 — useradd: create user accounts with all core flags
(-c, -d, -e, -f, -g, -G, -m, -M, -k, -N, -o, -p, -r, -s, -u, -U).
UID/GID allocation, home dir creation, skel copy, shadow entry.
Fixes #62 — userdel: remove user from passwd/shadow/group/gshadow.
Flags: -f, -r, -P. Removes from membership lists.
Fixes #63 — usermod: modify user properties.
Flags: -c, -d, -e, -f, -g, -G, -a, -L, -U, -l, -s, -u, -P.
Lock/unlock via shadow, group membership management.
Fixes #64 — chpasswd: batch password change from stdin.
Reads username:password pairs, updates /etc/shadow.
Supports -e (pre-encrypted), -R (chroot).
Fixes #65 — chage: password aging management.
All flags: -d, -E, -I, -l, -m, -M, -R, -W.
List mode (-l) shows aging info. Matches GNU output format.
364 tests, zero clippy warnings.
2026-03-24 10:19:52 +01:00
Pierre Warnier
3ed6188aea
tests: add proptest, edge cases, fuzz targets, integration tests, docs
...
Fixes #11 — tests/by-util/test_passwd.rs: 15 integration tests
following uutils convention (status format, exit codes, lock/unlock
cycle, aging, lifecycle, quiet mode, error cases).
Fixes #12 — fuzz targets for all parsers:
fuzz_passwd_parse, fuzz_shadow_parse, fuzz_login_defs_parse,
fuzz_validate_username. All must not panic on any input.
Fixes #15 — proptest round-trip tests for PasswdEntry, ShadowEntry:
generate random valid entries, serialize, parse back, compare.
Fixes #16 — parser edge case tests:
wrong field counts, empty files, roundtrip via file I/O, negative
values, boundary values, unicode rejection, null bytes, mixed
whitespace, duplicate keys, key-only lines.
Also: CONTRIBUTING.md, SECURITY.md created. README.md and CLAUDE.md
updated to reflect uucore integration and current project state.
142 tests passing on Debian/Alpine/Fedora, zero clippy warnings.
2026-03-23 14:11:19 +01:00