Repository navigation
pwcat: add password database dump utility - #63
Franklin-Qi wants to merge 1 commit into
Conversation
Alonely0
left a comment
There was a problem hiding this comment.
As oech3 had mentioned in the other PR, we would really prefer not to use libc directly if we can help it. I can't see these functions implemented in either nix or rustix, so maybe we could add a safe API boundary in uucore and reuse it here? Mentioning this since we plan to reuse a lot of functionality from uucore in the interpreter directly.
|
PD: use |
9852239 to
c2117de
Compare
Thanks for the review and the great suggestion; I’ve frequently encountered this issue before. |
3cf396b to
048fe2a
Compare
|
i am sorry but why it should belong to awk ? |
See #34 |
c2117de to
fb6b09e
Compare
fb6b09e to
090e90f
Compare
|
a bunch of jobs are failing |
|
sorry, needs to be rebased! |
Add the pwcat helper used by gawk library routines such as passwd.awk. Print /etc/passwd-format lines from getpwent/endpwent, return ExitCode from main, and treat BrokenPipe as success. On platforms without a password database, print nothing and exit successfully. libc is needed because rustix/nix/uucore do not expose the password-database iterators. Closes uutils#61
090e90f to
506c8ff
Compare
Add a
pwcatbinary that prints the password database in/etc/passwdformat for gawk library routines, matching the helper shipped with GNU awk.Includes integration tests that validate the seven-field output format and compare against
getent passwd.Closes #61