1 /* 2 * Copyright (c) 2024 Meta Platforms 3 * 4 * SPDX-License-Identifier: Apache-2.0 5 */ 6 #ifndef ZEPHYR_INCLUDE_POSIX_GRP_H_ 7 #define ZEPHYR_INCLUDE_POSIX_GRP_H_ 8 9 #ifdef __cplusplus 10 extern "C" { 11 #endif 12 13 #include <zephyr/posix/sys/stat.h> 14 15 /** 16 * @brief Group structure 17 */ 18 struct group { 19 /**< the name of the group */ 20 char *gr_name; 21 /**< numerical group ID */ 22 gid_t gr_gid; 23 /**< pointer to a null-terminated array of character pointers to member names */ 24 char **gr_mem; 25 }; 26 27 int getgrnam_r(const char *name, struct group *grp, char *buffer, size_t bufsize, 28 struct group **result); 29 int getgrgid_r(gid_t gid, struct group *grp, char *buffer, size_t bufsize, struct group **result); 30 31 #ifdef __cplusplus 32 } 33 #endif 34 35 #endif /* ZEPHYR_INCLUDE_POSIX_GRP_H_ */ 36