mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-21 20:40:05 +00:00
Handle nscd negtimeout==0
This commit is contained in:
parent
6d4d8e8eef
commit
445b4a53ea
@ -1,3 +1,11 @@
|
||||
2011-07-01 Thorsten Kukuk <kukuk@suse.de>
|
||||
|
||||
* nscd/pwdcache.c (cache_addpw): Handle zero negtimeout.
|
||||
* nscd/initgrcache.c (addinitgroupsX): Likewise.
|
||||
* nscd/hstcache.c (cache_addhst): Likewise.
|
||||
* nscd/grpcache.c (cache_addgr): Likewise.
|
||||
* nscd/aicache.c (addhstaiX): Likewise
|
||||
|
||||
2011-07-01 Andreas Schwab <schwab@redhat.com>
|
||||
|
||||
* nis/nss_compat/compat-pwd.c (getpwent_next_nss_netgr): Query NIS
|
||||
|
@ -511,9 +511,15 @@ next_nip:
|
||||
if (fd != -1)
|
||||
TEMP_FAILURE_RETRY (send (fd, ¬found, total, MSG_NOSIGNAL));
|
||||
|
||||
dataset = mempool_alloc (db, sizeof (struct dataset) + req->key_len, 1);
|
||||
/* If we cannot permanently store the result, so be it. */
|
||||
if (dataset != NULL)
|
||||
if (db->negtimeout == 0)
|
||||
{
|
||||
/* Mark the old entry as obsolete. */
|
||||
if (dh != NULL)
|
||||
dh->usable = false;
|
||||
dataset = NULL;
|
||||
}
|
||||
else if ((dataset = mempool_alloc (db, sizeof (struct dataset) + req->key_len, 1)) != NULL)
|
||||
{
|
||||
dataset->head.allocsize = sizeof (struct dataset) + req->key_len;
|
||||
dataset->head.recsize = total;
|
||||
|
@ -118,10 +118,14 @@ cache_addgr (struct database_dyn *db, int fd, request_header *req,
|
||||
written = TEMP_FAILURE_RETRY (send (fd, ¬found, total,
|
||||
MSG_NOSIGNAL));
|
||||
|
||||
dataset = mempool_alloc (db, sizeof (struct dataset) + req->key_len,
|
||||
1);
|
||||
/* If we cannot permanently store the result, so be it. */
|
||||
if (dataset != NULL)
|
||||
if (db->negtimeout == 0)
|
||||
{
|
||||
/* Mark the old entry as obsolete. */
|
||||
if (dh != NULL)
|
||||
dh->usable = false;
|
||||
}
|
||||
else if ((dataset = mempool_alloc (db, sizeof (struct dataset) + req->key_len, 1)) != NULL)
|
||||
{
|
||||
dataset->head.allocsize = sizeof (struct dataset) + req->key_len;
|
||||
dataset->head.recsize = total;
|
||||
|
@ -141,10 +141,14 @@ cache_addhst (struct database_dyn *db, int fd, request_header *req,
|
||||
MSG_NOSIGNAL)) != total)
|
||||
all_written = false;
|
||||
|
||||
dataset = mempool_alloc (db, sizeof (struct dataset) + req->key_len,
|
||||
1);
|
||||
/* If we cannot permanently store the result, so be it. */
|
||||
if (dataset != NULL)
|
||||
if (db->negtimeout == 0)
|
||||
{
|
||||
/* Mark the old entry as obsolete. */
|
||||
if (dh != NULL)
|
||||
dh->usable = false;
|
||||
}
|
||||
else if ((dataset = mempool_alloc (db, sizeof (struct dataset) + req->key_len, 1)) != NULL)
|
||||
{
|
||||
dataset->head.allocsize = sizeof (struct dataset) + req->key_len;
|
||||
dataset->head.recsize = total;
|
||||
|
@ -202,10 +202,14 @@ addinitgroupsX (struct database_dyn *db, int fd, request_header *req,
|
||||
written = TEMP_FAILURE_RETRY (send (fd, ¬found, total,
|
||||
MSG_NOSIGNAL));
|
||||
|
||||
dataset = mempool_alloc (db, sizeof (struct dataset) + req->key_len,
|
||||
1);
|
||||
/* If we cannot permanently store the result, so be it. */
|
||||
if (dataset != NULL)
|
||||
if (db->negtimeout == 0)
|
||||
{
|
||||
/* Mark the old entry as obsolete. */
|
||||
if (dh != NULL)
|
||||
dh->usable = false;
|
||||
}
|
||||
else if ((dataset = mempool_alloc (db, sizeof (struct dataset) + req->key_len, 1)) != NULL)
|
||||
{
|
||||
dataset->head.allocsize = sizeof (struct dataset) + req->key_len;
|
||||
dataset->head.recsize = total;
|
||||
|
@ -124,10 +124,14 @@ cache_addpw (struct database_dyn *db, int fd, request_header *req,
|
||||
written = TEMP_FAILURE_RETRY (send (fd, ¬found, total,
|
||||
MSG_NOSIGNAL));
|
||||
|
||||
dataset = mempool_alloc (db, sizeof (struct dataset) + req->key_len,
|
||||
1);
|
||||
/* If we cannot permanently store the result, so be it. */
|
||||
if (dataset != NULL)
|
||||
if (db->negtimeout == 0)
|
||||
{
|
||||
/* Mark the old entry as obsolete. */
|
||||
if (dh != NULL)
|
||||
dh->usable = false;
|
||||
}
|
||||
else if ((dataset = mempool_alloc (db, sizeof (struct dataset) + req->key_len, 1)) != NULL)
|
||||
{
|
||||
dataset->head.allocsize = sizeof (struct dataset) + req->key_len;
|
||||
dataset->head.recsize = total;
|
||||
|
Loading…
Reference in New Issue
Block a user