2004-09-04  Ulrich Drepper  <drepper@redhat.com>

	* nscd/pwdcache.c (cache_addpw): Use correct key length in
	cache_add calls.
	* nscd/grpcache.c (cache_addgr): Likewise.
This commit is contained in:
Ulrich Drepper 2004-09-05 07:02:13 +00:00
parent 3d73c4ba9c
commit 03e157d849
2 changed files with 9 additions and 3 deletions

View File

@ -1,3 +1,9 @@
2004-09-04 Ulrich Drepper <drepper@redhat.com>
* nscd/pwdcache.c (cache_addpw): Use correct key length in
cache_add calls.
* nscd/grpcache.c (cache_addgr): Likewise.
2004-09-03 Alfred M. Szmidt <ams@kemisten.nu> 2004-09-03 Alfred M. Szmidt <ams@kemisten.nu>
* sysdeps/mach/hurd/i386/tls.h (THREAD_DTV): Changed type of _DTV * sysdeps/mach/hurd/i386/tls.h (THREAD_DTV): Changed type of _DTV

View File

@ -302,8 +302,8 @@ cache_addpw (struct database_dyn *db, int fd, request_header *req,
/* If the request was by UID, add that entry first. */ /* If the request was by UID, add that entry first. */
if (req->type != GETPWBYNAME) if (req->type != GETPWBYNAME)
{ {
if (cache_add (GETPWBYUID, cp, n, &dataset->head, true, db, if (cache_add (GETPWBYUID, cp, key_offset, &dataset->head, true,
owner) < 0) db, owner) < 0)
{ {
/* Could not allocate memory. Make sure the data gets /* Could not allocate memory. Make sure the data gets
discarded. */ discarded. */
@ -332,7 +332,7 @@ cache_addpw (struct database_dyn *db, int fd, request_header *req,
db, owner) == 0, 1)) db, owner) == 0, 1))
{ {
if (req->type == GETPWBYNAME) if (req->type == GETPWBYNAME)
(void) cache_add (GETPWBYUID, cp, n, &dataset->head, (void) cache_add (GETPWBYUID, cp, key_offset, &dataset->head,
req->type != GETPWBYNAME, db, owner); req->type != GETPWBYNAME, db, owner);
} }
else if (first) else if (first)