| /* |
| * Copyright (c) 2024 Meta Platforms |
| * |
| * SPDX-License-Identifier: Apache-2.0 |
| */ |
| #ifndef ZEPHYR_INCLUDE_POSIX_PWD_H_ |
| #define ZEPHYR_INCLUDE_POSIX_PWD_H_ |
| |
| #ifdef __cplusplus |
| extern "C" { |
| #endif |
| |
| #include <zephyr/posix/sys/stat.h> |
| |
| struct passwd { |
| /* user's login name */ |
| char *pw_name; |
| /* numerical user ID */ |
| uid_t pw_uid; |
| /* numerical group ID */ |
| gid_t pw_gid; |
| /* initial working directory */ |
| char *pw_dir; |
| /* program to use as shell */ |
| char *pw_shell; |
| }; |
| |
| int getpwnam_r(const char *nam, struct passwd *pwd, char *buffer, size_t bufsize, |
| struct passwd **result); |
| int getpwuid_r(uid_t uid, struct passwd *pwd, char *buffer, size_t bufsize, struct passwd **result); |
| |
| #ifdef __cplusplus |
| } |
| #endif |
| |
| #endif /* ZEPHYR_INCLUDE_POSIX_PWD_H_ */ |