mirror of
git://sourceware.org/git/glibc.git
synced 2025-03-19 13:40:59 +08:00
* inet/getnetgrent_r.c (innetgr): Call endfct even if result != 0.
Return 1 only if result == 1. Patch by Benoit Capelle.
This commit is contained in:
parent
c1e3681907
commit
9c5a790487
@ -1,3 +1,8 @@
|
||||
2005-09-24 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
* inet/getnetgrent_r.c (innetgr): Call endfct even if result != 0.
|
||||
Return 1 only if result == 1. Patch by Benoit Capelle.
|
||||
|
||||
2005-09-25 Ulrich Drepper <drepper@redhat.com>
|
||||
|
||||
[BZ #278]
|
||||
|
@ -409,9 +409,6 @@ innetgr (const char *netgroup, const char *host, const char *user,
|
||||
}
|
||||
}
|
||||
|
||||
if (result != 0)
|
||||
break;
|
||||
|
||||
/* If we found one service which does know the given
|
||||
netgroup we don't try further. */
|
||||
status = NSS_STATUS_RETURN;
|
||||
@ -422,6 +419,9 @@ innetgr (const char *netgroup, const char *host, const char *user,
|
||||
if (endfct != NULL)
|
||||
(*endfct) (&entry);
|
||||
|
||||
if (result != 0)
|
||||
break;
|
||||
|
||||
/* Look for the next service. */
|
||||
no_more = __nss_next (&entry.nip, "setnetgrent",
|
||||
&setfct.ptr, status, 0);
|
||||
@ -444,6 +444,6 @@ innetgr (const char *netgroup, const char *host, const char *user,
|
||||
/* Free the memory. */
|
||||
free_memory (&entry);
|
||||
|
||||
return result;
|
||||
return result == 1;
|
||||
}
|
||||
libc_hidden_def (innetgr)
|
||||
|
Loading…
x
Reference in New Issue
Block a user