Open ryanwoodsmall opened 4 years ago
This is almost certainly fine. It's worth noting that the whole repo could use an update, but I haven't found the time to do so yet.
What OS are you running this on?
Tested on Linux - Alpine, CentOS 7, and a custom GCC+musl-based build environment in Docker with bonsai linux bsd-headers (https://github.com/bonsai-linux/bsd-headers).
Eek. Bonsai is undergoing a rewrite and things may be broken. My headers could potentially be the culprit.
On a side note, I love this project and hope to PR some things when I get time. 👍
@mitchweaver - bonsai bsd-headers are working better than libbsd for me ;)
libopenbsd/pwd.c, ls/ls.c: fix segfault on name lookup when uid/gid not present in /etc/passwd or /etc/group
Noticed a segfault on a name lookup for uid/gid not found; numeric IDs work as expected. This patch does a minor fixup, converting ls.c to use user_from_uid and group_from_gid with a NULL check on getpwuid and getgrgid in libopenbsd/pwd.c. Let me know if this works. Thanks!