Added struct passwd type definition, pwd.yaml header specification, and parse_passwd_line utility returning ErrorOr<struct passwd> for colon-separated password file parsing with hermetic unit tests. Note: Additional POSIX pwd.h functions (getpwuid, getpwnam, getpwuid_r, getpwnam_r, fgetpwent) are omitted from this initial change and will be added in follow-up PRs. * Added libc/include/llvm-libc-types/struct_passwd.h and proxy header * Added libc/include/pwd.yaml header specification * Added pwd_utils.h and pwd_utils.cpp implementing ErrorOr<struct passwd> parse_passwd_line * Added pwd.h to target public headers for linux architectures * Added unit tests in libc/test/src/pwd/pwd_utils_test.cpp Assisted-by: Automated tooling, human reviewed.
26 lines
443 B
YAML
26 lines
443 B
YAML
header: pwd.h
|
|
standards:
|
|
- posix
|
|
types:
|
|
- type_name: struct_passwd
|
|
- type_name: gid_t
|
|
- type_name: uid_t
|
|
- type_name: size_t
|
|
enums: []
|
|
objects: []
|
|
functions:
|
|
- name: getpwent
|
|
standards:
|
|
- posix
|
|
return_type: struct passwd *
|
|
arguments: []
|
|
- name: setpwent
|
|
standards:
|
|
- posix
|
|
return_type: void
|
|
arguments: []
|
|
- name: endpwent
|
|
standards:
|
|
- posix
|
|
return_type: void
|
|
arguments: []
|