pwd.h 921 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. #ifndef __PWD_H
  2. #define __PWD_H
  3. #include <sys/types.h>
  4. #include <features.h>
  5. #include <stdio.h>
  6. /* The passwd structure. */
  7. struct passwd
  8. {
  9. char *pw_name; /* Username. */
  10. char *pw_passwd; /* Password. */
  11. uid_t pw_uid; /* User ID. */
  12. gid_t pw_gid; /* Group ID. */
  13. char *pw_gecos; /* Real name. */
  14. char *pw_dir; /* Home directory. */
  15. char *pw_shell; /* Shell program. */
  16. };
  17. extern void setpwent __P ((void));
  18. extern void endpwent __P ((void));
  19. extern struct passwd * getpwent __P ((void));
  20. extern int putpwent __P ((__const struct passwd * __p, FILE * __f));
  21. extern int getpw __P ((uid_t uid, char *buf));
  22. extern struct passwd * fgetpwent __P ((FILE * file));
  23. extern struct passwd * getpwuid __P ((__const uid_t));
  24. extern struct passwd * getpwnam __P ((__const char *));
  25. #ifdef __LIBC__
  26. extern struct passwd * __getpwent __P ((__const int passwd_fd));
  27. #endif
  28. #endif /* pwd.h */