mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-22 13:00:06 +00:00
Update.
* nscd/nscd_initgroups.c (__nscd_getgrouplist): Always add the group the caller provided unless there is a real problem.
This commit is contained in:
parent
cb984ef2a2
commit
927f0673b3
@ -1,5 +1,8 @@
|
|||||||
2004-10-01 Ulrich Drepper <drepper@redhat.com>
|
2004-10-01 Ulrich Drepper <drepper@redhat.com>
|
||||||
|
|
||||||
|
* nscd/nscd_initgroups.c (__nscd_getgrouplist): Always add the
|
||||||
|
group the caller provided unless there is a real problem.
|
||||||
|
|
||||||
* posix/bug-glob1.c (prepare): Fix creation of symlink.
|
* posix/bug-glob1.c (prepare): Fix creation of symlink.
|
||||||
|
|
||||||
2004-09-30 Ulrich Drepper <drepper@redhat.com>
|
2004-09-30 Ulrich Drepper <drepper@redhat.com>
|
||||||
|
@ -1,5 +1,8 @@
|
|||||||
2004-10-01 Ulrich Drepper <drepper@redhat.com>
|
2004-10-01 Ulrich Drepper <drepper@redhat.com>
|
||||||
|
|
||||||
|
* sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
|
||||||
|
(__lll_mutex_timedlock_wait): Address futex correctly.
|
||||||
|
|
||||||
* sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
|
* sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
|
||||||
(__lll_mutex_timedlock_wait): I woken but cannot get the lock,
|
(__lll_mutex_timedlock_wait): I woken but cannot get the lock,
|
||||||
make sure 2 is stored in the futex and we looked at the old value.
|
make sure 2 is stored in the futex and we looked at the old value.
|
||||||
|
@ -152,7 +152,7 @@ __lll_mutex_timedlock_wait:
|
|||||||
|
|
||||||
/* Make sure the current holder knows we are going to sleep. */
|
/* Make sure the current holder knows we are going to sleep. */
|
||||||
movl %edx, %eax
|
movl %edx, %eax
|
||||||
xchgl %eax, (%ebx)
|
xchgl %eax, (%rdi)
|
||||||
testl %eax, %eax
|
testl %eax, %eax
|
||||||
jz 6b
|
jz 6b
|
||||||
jmp 1b
|
jmp 1b
|
||||||
|
@ -95,6 +95,7 @@ __nscd_getgrouplist (const char *user, gid_t group, long int *size,
|
|||||||
doesn't use memcpy but instead copies each array element one
|
doesn't use memcpy but instead copies each array element one
|
||||||
by one. */
|
by one. */
|
||||||
assert (sizeof (int32_t) == sizeof (gid_t));
|
assert (sizeof (int32_t) == sizeof (gid_t));
|
||||||
|
assert (initgr_resp->ngrps > 0);
|
||||||
|
|
||||||
/* Make sure we have enough room. We always count GROUP in even
|
/* Make sure we have enough room. We always count GROUP in even
|
||||||
though we might not end up adding it. */
|
though we might not end up adding it. */
|
||||||
@ -125,25 +126,21 @@ __nscd_getgrouplist (const char *user, gid_t group, long int *size,
|
|||||||
retval = initgr_resp->ngrps;
|
retval = initgr_resp->ngrps;
|
||||||
memcpy (*groupsp, respdata, retval * sizeof (gid_t));
|
memcpy (*groupsp, respdata, retval * sizeof (gid_t));
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Check whether GROUP is part of the mix. If not, add it. */
|
|
||||||
if (retval >= 0)
|
|
||||||
{
|
|
||||||
int cnt;
|
|
||||||
for (cnt = 0; cnt < retval; ++cnt)
|
|
||||||
if ((*groupsp)[cnt] == group)
|
|
||||||
break;
|
|
||||||
|
|
||||||
if (cnt == retval)
|
|
||||||
(*groupsp)[retval++] = group;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
/* No group found yet. */
|
||||||
|
retval = 0;
|
||||||
|
|
||||||
|
/* Check whether GROUP is part of the mix. If not, add it. */
|
||||||
|
if (retval >= 0)
|
||||||
{
|
{
|
||||||
/* The `errno' to some value != ERANGE. */
|
int cnt;
|
||||||
__set_errno (ENOENT);
|
for (cnt = 0; cnt < retval; ++cnt)
|
||||||
/* Even though we have not found anything, the result is zero. */
|
if ((*groupsp)[cnt] == group)
|
||||||
retval = 0;
|
break;
|
||||||
|
|
||||||
|
if (cnt == retval)
|
||||||
|
(*groupsp)[retval++] = group;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (sock != -1)
|
if (sock != -1)
|
||||||
|
Loading…
Reference in New Issue
Block a user