grp.h 827 B

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