(*endgrent_fct) ();
_CALL_DL_FCT (endgrent_fct, ());
compat_call (service_user *nip, const char *user, gid_t group, long int *start,	     long int *size, gid_t *groups, long int limit, int *errnop){  struct group grpbuf, *g;  size_t buflen = sysconf (_SC_GETPW_R_SIZE_MAX);  char *tmpbuf;  enum nss_status status;  set_function setgrent_fct;  get_function getgrent_fct;  end_function endgrent_fct;  setgrent_fct = __nss_lookup_function (nip, "setgrent");  status = (*setgrent_fct) ();  if (status != NSS_STATUS_SUCCESS)    return status;  getgrent_fct = __nss_lookup_function (nip, "getgrent_r");  endgrent_fct = __nss_lookup_function (nip, "endgrent");  tmpbuf = __alloca (buflen);  do    {      while ((status =	      (*getgrent_fct) (&grpbuf, tmpbuf, buflen, errnop)) ==	     NSS_STATUS_TRYAGAIN && *errnop == ERANGE)        {          buflen *= 2;          tmpbuf = __alloca (buflen);        }      if (status != NSS_STATUS_SUCCESS)        goto done;      g = &grpbuf;      if (g->gr_gid != group)        {          char **m;          for (m = g->gr_mem; *m != NULL; ++m)            if (strcmp (*m, user) == 0)              {                /* Matches user.  Insert this group.  */                if (*start == *size && limit <= 0)                  {                    /* Need a bigger buffer.  */                    groups = realloc (groups, *size * sizeof (*groups));                    if (groups == NULL)                      goto done;                    *size *= 2;                  }                groups[*start] = g->gr_gid;                *start += 1;                if (*start == limit)                  /* Can't take any more groups; stop searching.  */                  goto done;                break;              }        }    }  while (status == NSS_STATUS_SUCCESS); done:  (*endgrent_fct) ();  return NSS_STATUS_SUCCESS;}