| Issue |
235268
|
| Summary |
[libc] Implement getresuid and getresgid in unistd.h
|
| Labels |
libc
|
| Assignees |
|
| Reporter |
amanmaurya92
|
Implement `getresuid` and `getresgid` functions in `unistd.h` for Linux targets.
### Background & Motivation
LLVM libc recently implemented `setresuid` and `setresgid` (along with `setreuid`, `setregid`, `setuid`, `setgid`, `getuid`, `getgid`, `geteuid`, `getegid`). However, their companion getters `getresuid` and `getresgid` are not yet implemented in `libc`.
### Proposed Implementation
- Add function signatures and specifications to `libc/include/unistd.yaml`.
- Add Linux syscall wrappers for `SYS_getresuid`/`SYS_getresuid32` and `SYS_getresgid`/`SYS_getresgid32` under `src/__support/OSUtil/linux/syscall_wrappers/`.
- Implement entrypoints in `src/unistd/getresuid.h`, `src/unistd/linux/getresuid.cpp`, `src/unistd/getresgid.h`, and `src/unistd/linux/getresgid.cpp`.
- Add unit tests verifying real/effective/saved ID retrieval and EFAULT error handling on invalid pointers.
- Enable entrypoints for supported Linux architectures (`x86_64`, `aarch64`, `riscv`, `arm`).
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs