[all-commits] [llvm/llvm-project] 5a24d1: [libc] Add getgrnam and getgrgid entrypoints (#224...
Jeff Bailey via All-commits
all-commits at lists.llvm.org
Tue Sep 22 13:07:38 PDT 2026
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 5a24d15712a9b02da52be18d418f031dda3e3d07
https://github.com/llvm/llvm-project/commit/5a24d15712a9b02da52be18d418f031dda3e3d07
Author: Jeff Bailey <jbailey at raspberryginger.com>
Date: 2026-09-22 (Tue, 22 Sep 2026)
Changed paths:
M libc/config/linux/aarch64/entrypoints.txt
M libc/config/linux/arm/entrypoints.txt
M libc/config/linux/i386/entrypoints.txt
M libc/config/linux/riscv/entrypoints.txt
M libc/config/linux/x86_64/entrypoints.txt
M libc/include/grp.yaml
M libc/src/grp/CMakeLists.txt
A libc/src/grp/getgrgid.cpp
A libc/src/grp/getgrgid.h
A libc/src/grp/getgrnam.cpp
A libc/src/grp/getgrnam.h
M libc/src/grp/grp_utils.cpp
M libc/src/grp/grp_utils.h
M libc/test/src/grp/CMakeLists.txt
A libc/test/src/grp/getgrgid_test.cpp
A libc/test/src/grp/getgrnam_test.cpp
Log Message:
-----------
[libc] Add getgrnam and getgrgid entrypoints (#224858)
Add the non-reentrant group database lookup entrypoints getgrnam and
getgrgid.
Both entrypoints delegate to grp::find_by_name and grp::find_by_gid,
sharing the single static DynamicBuffer and struct group with getgrent
as permitted by POSIX. Because endgrent closes the file stream without
freeing the shared buffer, calling endgrent does not invalidate pointers
returned by getgrnam or getgrgid.
* Add getgrnam and getgrgid entrypoints
* Add non-reentrant find_by_name and find_by_gid overloads in grp_utils
* Define getgrnam and getgrgid in include/grp.yaml
* Add hermetic unit tests for getgrnam and getgrgid
Assisted-by: Automated tooling, human reviewed.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list