1 /* 2 * Copyright 2004-2008, Haiku Inc. All Rights Reserved. 3 * Distributed under the terms of the MIT License. 4 */ 5 #ifndef _GRP_H_ 6 #define _GRP_H_ 7 8 9 #include <sys/types.h> 10 11 12 struct group { 13 char *gr_name; 14 char *gr_passwd; 15 gid_t gr_gid; 16 char **gr_mem; 17 }; 18 19 20 #ifdef __cplusplus 21 extern "C" { 22 #endif 23 24 extern struct group *getgrgid(gid_t gid); 25 extern struct group *getgrnam(const char *name); 26 extern int getgrgid_r(gid_t gid, struct group *group, char *buffer, 27 size_t bufferSize, struct group **_result); 28 extern int getgrnam_r(const char *name, struct group *group, char *buffer, 29 size_t bufferSize, struct group **_result); 30 31 extern struct group *getgrent(void); 32 extern int getgrent_r(struct group* group, char* buffer, size_t bufferSize, 33 struct group** _result); 34 extern void setgrent(void); 35 extern void endgrent(void); 36 37 #ifdef __cplusplus 38 } 39 #endif 40 41 #endif /* _GRP_H_ */ 42