Back to index

glibc  2.9
grp.h
Go to the documentation of this file.
00001 #ifndef _GRP_H
00002 #include <grp/grp.h>
00003 
00004 libc_hidden_proto (setgroups)
00005 
00006 /* Now define the internal interfaces.  */
00007 extern int __getgrent_r (struct group *__resultbuf, char *buffer,
00008                       size_t __buflen, struct group **__result)
00009      attribute_hidden;
00010 extern int __old_getgrent_r (struct group *__resultbuf, char *buffer,
00011                           size_t __buflen, struct group **__result);
00012 extern int __fgetgrent_r (FILE * __stream, struct group *__resultbuf,
00013                        char *buffer, size_t __buflen,
00014                        struct group **__result);
00015 
00016 /* Search for an entry with a matching group ID.  */
00017 extern int __getgrgid_r (__gid_t __gid, struct group *__resultbuf,
00018                       char *__buffer, size_t __buflen,
00019                       struct group **__result);
00020 extern int __old_getgrgid_r (__gid_t __gid, struct group *__resultbuf,
00021                           char *__buffer, size_t __buflen,
00022                           struct group **__result);
00023 
00024 /* Search for an entry with a matching group name.  */
00025 extern int __getgrnam_r (__const char *__name, struct group *__resultbuf,
00026                       char *__buffer, size_t __buflen,
00027                       struct group **__result);
00028 extern int __old_getgrnam_r (__const char *__name, struct group *__resultbuf,
00029                           char *__buffer, size_t __buflen,
00030                           struct group **__result);
00031 
00032 struct parser_data;
00033 extern int _nss_files_parse_grent (char *line, struct group *result,
00034                                struct parser_data *data,
00035                                size_t datalen, int *errnop);
00036 libc_hidden_proto (_nss_files_parse_grent)
00037 
00038 #define DECLARE_NSS_PROTOTYPES(service)                                  \
00039 extern enum nss_status _nss_ ## service ## _setgrent (int);              \
00040 extern enum nss_status _nss_ ## service ## _endgrent (void);             \
00041 extern enum nss_status _nss_ ## service ## _getgrgid_r                   \
00042                        (gid_t gid, struct group *grp, char *buffer,      \
00043                      size_t buflen, int *errnop);                        \
00044 extern enum nss_status _nss_ ## service ## _getgrnam_r                   \
00045                        (const char *name, struct group *grp,             \
00046                      char *buffer, size_t buflen, int *errnop);          \
00047 extern enum nss_status _nss_ ## service ##_getgrent_r                    \
00048                        (struct group *result, char *buffer, size_t buflen, \
00049                      int *errnop);                                \
00050 extern enum nss_status _nss_ ## service ##_initgroups_dyn                \
00051                        (const char *user, gid_t group, long int *start,         \
00052                      long int *size, gid_t **groupsp, long int limit,   \
00053                      int *errnop);
00054 
00055 DECLARE_NSS_PROTOTYPES (compat)
00056 DECLARE_NSS_PROTOTYPES (files)
00057 DECLARE_NSS_PROTOTYPES (hesiod)
00058 DECLARE_NSS_PROTOTYPES (nis)
00059 DECLARE_NSS_PROTOTYPES (nisplus)
00060 
00061 #undef DECLARE_NSS_PROTOTYPES
00062 #endif