return result;
return result == 1;
weak_alias (__getnetgrent_r, getnetgrent_r)/* Test whether given (host,user,domain) triple is in NETGROUP.  */intinnetgr (const char *netgroup, const char *host, const char *user,	 const char *domain){  union  {    int (*f) (const char *, struct __netgrent *);    void *ptr;  } setfct;  void (*endfct) (struct __netgrent *);  int (*getfct) (struct __netgrent *, char *, size_t, int *);  struct __netgrent entry;  int result = 0;  const char *current_group = netgroup;  int real_entry = 0;  memset (&entry, '\0', sizeof (entry));  /* Walk through the services until we found an answer or we shall     not work further.  We can do some optimization here.  Since all     services must provide the `setnetgrent' function we can do all     the work during one walk through the service list.  */  while (1)    {      int no_more = setup (&setfct.ptr, &entry.nip);      while (! no_more)	{	  assert (entry.data == NULL);	  /* Open netgroup.  */	  enum nss_status status = (*setfct.f) (current_group, &entry);	  if (status == NSS_STATUS_SUCCESS	      && (getfct = __nss_lookup_function (entry.nip, "getnetgrent_r"))		 != NULL)	    {	      char buffer[1024];	      while ((*getfct) (&entry, buffer, sizeof buffer, &errno)		     == NSS_STATUS_SUCCESS)		{		  if (entry.type == group_val)		    {		      /* Make sure we haven't seen the name before.  */		      struct name_list *namep;		      for (namep = entry.known_groups; namep != NULL;			   namep = namep->next)			if (strcmp (entry.val.group, namep->name) == 0)			  break;		      if (namep == NULL			  && strcmp (netgroup, entry.val.group) != 0)			{			  size_t group_len = strlen (entry.val.group) + 1;			  namep =			    (struct name_list *) malloc (sizeof (*namep)							 + group_len);			  if (namep == NULL)			    {			      /* Out of memory, simply return.  */			      result = -1;			      break;			    }			  namep->next = entry.needed_groups;			  memcpy (namep->name, entry.val.group, group_len);			  entry.needed_groups = namep;			}		    }		  else		    {		      real_entry = 1;		      if ((entry.val.triple.host == NULL || host == NULL			   || __strcasecmp (entry.val.triple.host, host) == 0)			  && (entry.val.triple.user == NULL || user == NULL			      || strcmp (entry.val.triple.user, user) == 0)			  && (entry.val.triple.domain == NULL || domain == NULL			      || __strcasecmp (entry.val.triple.domain,					       domain) == 0))			{			  result = 1;			  break;			}		    }		}	      if (result != 0)		break;	      /* If we found one service which does know the given		 netgroup we don't try further.  */	      status = NSS_STATUS_RETURN;	    }	  /* Free all resources of the service.  */	  endfct = __nss_lookup_function (entry.nip, "endnetgrent");	  if (endfct != NULL)	    (*endfct) (&entry);	  /* Look for the next service.  */	  no_more = __nss_next (&entry.nip, "setnetgrent",				&setfct.ptr, status, 0);	}      if (result == 0 && entry.needed_groups != NULL)	{	  struct name_list *tmp = entry.needed_groups;	  entry.needed_groups = tmp->next;	  tmp->next = entry.known_groups;	  entry.known_groups = tmp;	  current_group = entry.known_groups->name;	  continue;	}      /* No way out.  */      break;    }  /* Free the memory.  */  free_memory (&entry);  return result;}