size_t buflen,
int *errnop);
typedef NSS_STATUS (*__nss_endpwent)(void);
-typedef NSS_STATUS (*__nss_initgroups)(const char *user,
+typedef NSS_STATUS (*__nss_initgroups_dyn)(const char *user,
gid_t group,
long int *start,
long int *size,
NWRAP_NSS_MODULE_SYMBOL_ENTRY(getpwent_r);
NWRAP_NSS_MODULE_SYMBOL_ENTRY(endpwent);
- NWRAP_NSS_MODULE_SYMBOL_ENTRY(initgroups);
+ NWRAP_NSS_MODULE_SYMBOL_ENTRY(initgroups_dyn);
NWRAP_NSS_MODULE_SYMBOL_ENTRY(getgrnam_r);
NWRAP_NSS_MODULE_SYMBOL_ENTRY(getgrgid_r);
NWRAP_NSS_MODULE_SYMBOL_ENTRY(setgrent);
void (*nw_endpwent)(struct nwrap_backend *b);
int (*nw_initgroups)(struct nwrap_backend *b,
const char *user, gid_t group);
+ int (*nw_initgroups_dyn)(struct nwrap_backend *b,
+ const char *user,
+ gid_t group,
+ long int *start,
+ long int *size,
+ gid_t **groups,
+ long int limit,
+ int *errnop);
struct group * (*nw_getgrnam)(struct nwrap_backend *b,
const char *name);
int (*nw_getgrnam_r)(struct nwrap_backend *b,
char *buf, size_t buflen, struct group **grdstp);
static void nwrap_module_setgrent(struct nwrap_backend *b);
static void nwrap_module_endgrent(struct nwrap_backend *b);
-static int nwrap_module_initgroups(struct nwrap_backend *b,
- const char *user, gid_t group);
+static int nwrap_module_initgroups_dyn(struct nwrap_backend *b,
+ const char *user,
+ gid_t group,
+ long int *start,
+ long int *size,
+ gid_t **groups,
+ long int limit,
+ int *errnop);
static struct hostent *nwrap_module_gethostbyaddr(struct nwrap_backend *b,
const void *addr,
socklen_t len, int type);
.nw_getpwent = nwrap_module_getpwent,
.nw_getpwent_r = nwrap_module_getpwent_r,
.nw_endpwent = nwrap_module_endpwent,
- .nw_initgroups = nwrap_module_initgroups,
+ .nw_initgroups_dyn = nwrap_module_initgroups_dyn,
.nw_getgrnam = nwrap_module_getgrnam,
.nw_getgrnam_r = nwrap_module_getgrnam_r,
.nw_getgrgid = nwrap_module_getgrgid,
nwrap_nss_module_bind_symbol(setpwent);
nwrap_nss_module_bind_symbol(getpwent_r);
nwrap_nss_module_bind_symbol(endpwent);
- nwrap_nss_module_bind_symbol2(initgroups, initgroups_dyn);
+ nwrap_nss_module_bind_symbol(initgroups_dyn);
nwrap_nss_module_bind_symbol(getgrnam_r);
nwrap_nss_module_bind_symbol(getgrgid_r);
nwrap_nss_module_bind_symbol(setgrent);
b->symbols->_nss_endpwent.f();
}
-static int nwrap_module_initgroups(struct nwrap_backend *b,
- const char *user, gid_t group)
+static int nwrap_module_initgroups_dyn(struct nwrap_backend *b,
+ const char *user,
+ gid_t group,
+ long int *start,
+ long int *size,
+ gid_t **groups,
+ long int limit,
+ int *errnop)
{
- gid_t *groups;
- long int start;
- long int size;
-
- if (b->symbols->_nss_initgroups.f == NULL) {
+ if (b->symbols->_nss_initgroups_dyn.f == NULL) {
return NSS_STATUS_UNAVAIL;
}
- return b->symbols->_nss_initgroups.f(user,
+ return b->symbols->_nss_initgroups_dyn.f(user,
group,
- &start,
- &size,
- &groups,
- 0,
- &errno);
+ start,
+ size,
+ groups,
+ limit,
+ errnop);
}
static struct group *nwrap_module_getgrnam(struct nwrap_backend *b,