grp.h 799 B

12345678910111213141516171819202122232425262728293031323334353637
  1. #ifndef __GRP_H
  2. #define __GRP_H
  3. #include <sys/types.h>
  4. #include <features.h>
  5. #include <stdio.h>
  6. /* The group structure */
  7. struct group
  8. {
  9. char *gr_name; /* Group name. */
  10. char *gr_passwd; /* Password. */
  11. gid_t gr_gid; /* Group ID. */
  12. char **gr_mem; /* Member list. */
  13. };
  14. extern void setgrent __P ((void));
  15. extern void endgrent __P ((void));
  16. extern struct group * getgrent __P ((void));
  17. extern struct group * getgrgid __P ((__const gid_t gid));
  18. extern struct group * getgrnam __P ((__const char * name));
  19. extern struct group * fgetgrent __P ((FILE * file));
  20. extern int setgroups __P ((size_t n, __const gid_t * groups));
  21. extern int initgroups __P ((__const char * user, gid_t gid));
  22. #ifdef _LIBC
  23. extern struct group * __getgrent __P ((int grp_fd));
  24. #endif
  25. #endif /* _GRP_H */