1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-09-02 16:01:20 +03:00
* inet/getnetgrent_r.c (innetgr): We must get the lock used for
	the set/get/end interfaces since we call all these functions in
	succession and must not be interrupted doing this.
	Reported by Chuck Simmons.
This commit is contained in:
Ulrich Drepper
2004-08-13 23:24:09 +00:00
parent 2486480e23
commit a575320641
2 changed files with 9 additions and 0 deletions

View File

@@ -344,6 +344,8 @@ innetgr (const char *netgroup, const char *host, const char *user,
const char *current_group = netgroup;
int real_entry = 0;
__libc_lock_lock (lock);
/* 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
@@ -445,6 +447,8 @@ innetgr (const char *netgroup, const char *host, const char *user,
break;
}
__libc_lock_unlock (lock);
/* Free the memory. */
while (known != NULL)
{