1 #ifndef _PWD_H_ 2 #define _PWD_H_ 3 /* 4 ** Distributed under the terms of the OpenBeOS License. 5 */ 6 7 #include <sys/types.h> 8 9 #ifdef __cplusplus 10 extern "C" { 11 #endif 12 13 struct passwd { 14 char *pw_name; 15 char *pw_passwd; 16 uid_t pw_uid; 17 gid_t pw_gid; 18 char *pw_dir; 19 char *pw_shell; 20 char *pw_gecos; 21 }; 22 23 /* traverse the user password database */ 24 extern struct passwd *getpwent(void); 25 extern void setpwent(void); 26 extern void endpwent(void); 27 28 /*search the user password database */ 29 extern struct passwd *getpwnam(const char *name); 30 extern int getpwnam_r(const char *name, struct passwd *passwd, char *buffer, 31 size_t bufferSize, struct passwd **result); 32 extern struct passwd *getpwuid(uid_t uid); 33 extern int getpwuid_r(uid_t uid, struct passwd *passwd, char *buffer, 34 size_t bufferSize, struct passwd **result); 35 36 #ifdef __cplusplus 37 } 38 #endif 39 40 #endif /* _PWD_H_ */ 41