diff options
author | Ulrich Drepper <drepper@redhat.com> | 2007-01-14 05:26:04 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2007-01-14 05:26:04 +0000 |
commit | b21fa963c4194082792a26023f265ebe50ca5c9e (patch) | |
tree | 78c2bb40d7a4fdb8b0b9c2c424fba511613e70e8 /nscd/pwdcache.c | |
parent | 23691ab23b6e631ae0c5cf58455cca25a0058e22 (diff) | |
download | glibc-b21fa963c4194082792a26023f265ebe50ca5c9e.tar glibc-b21fa963c4194082792a26023f265ebe50ca5c9e.tar.gz glibc-b21fa963c4194082792a26023f265ebe50ca5c9e.tar.bz2 glibc-b21fa963c4194082792a26023f265ebe50ca5c9e.zip |
* nis/nss_nis/nis-service.c (_nss_nis_getservbyname_r): Correct
computation of keylen.
Diffstat (limited to 'nscd/pwdcache.c')
-rw-r--r-- | nscd/pwdcache.c | 18 |
1 files changed, 2 insertions, 16 deletions
diff --git a/nscd/pwdcache.c b/nscd/pwdcache.c index 01c223add5..0461ec91ce 100644 --- a/nscd/pwdcache.c +++ b/nscd/pwdcache.c @@ -1,5 +1,5 @@ /* Cache handling for passwd lookup. - Copyright (C) 1998-2005, 2006 Free Software Foundation, Inc. + Copyright (C) 1998-2005, 2006, 2007 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998. @@ -440,23 +440,14 @@ addpwbyX (struct database_dyn *db, int fd, request_header *req, dbg_log (_("Reloading \"%s\" in password cache!"), keystr); } -#if 0 - uid_t oldeuid = 0; - if (db->secure) - { - oldeuid = geteuid (); - pthread_seteuid_np (c_uid); - } -#endif - while (lookup (req->type, key, &resultbuf, buffer, buflen, &pwd) != 0 && (errval = errno) == ERANGE) { - char *old_buffer = buffer; errno = 0; if (__builtin_expect (buflen > 32768, 0)) { + char *old_buffer = buffer; buflen *= 2; buffer = (char *) realloc (use_malloc ? buffer : NULL, buflen); if (buffer == NULL) @@ -481,11 +472,6 @@ addpwbyX (struct database_dyn *db, int fd, request_header *req, buffer = (char *) extend_alloca (buffer, buflen, 2 * buflen); } -#if 0 - if (db->secure) - pthread_seteuid_np (oldeuid); -#endif - /* Add the entry to the cache. */ cache_addpw (db, fd, req, keystr, pwd, c_uid, he, dh, errval); |