* nscd/connections.c (servinfo): Renamed to reqinfo. Change all
users. (handle_request): Remove unnecessary tests.
This commit is contained in:
parent
1bd7902576
commit
000b027e7c
|
@ -1,5 +1,9 @@
|
||||||
2007-01-15 Ulrich Drepper <drepper@redhat.com>
|
2007-01-15 Ulrich Drepper <drepper@redhat.com>
|
||||||
|
|
||||||
|
* nscd/connections.c (servinfo): Renamed to reqinfo. Change all
|
||||||
|
users.
|
||||||
|
(handle_request): Remove unnecessary tests.
|
||||||
|
|
||||||
* nscd/cache.c (cache_add): Record the failure to add to the cache.
|
* nscd/cache.c (cache_add): Record the failure to add to the cache.
|
||||||
|
|
||||||
2007-01-15 Jakub Jelinek <jakub@redhat.com>
|
2007-01-15 Jakub Jelinek <jakub@redhat.com>
|
||||||
|
|
|
@ -185,7 +185,7 @@ static struct
|
||||||
{
|
{
|
||||||
bool data_request;
|
bool data_request;
|
||||||
struct database_dyn *db;
|
struct database_dyn *db;
|
||||||
} const servinfo[LASTREQ] =
|
} const reqinfo[LASTREQ] =
|
||||||
{
|
{
|
||||||
[GETPWBYNAME] = { true, &dbs[pwddb] },
|
[GETPWBYNAME] = { true, &dbs[pwddb] },
|
||||||
[GETPWBYUID] = { true, &dbs[pwddb] },
|
[GETPWBYUID] = { true, &dbs[pwddb] },
|
||||||
|
@ -392,7 +392,7 @@ verify_persistent_db (void *mem, struct database_pers_head *readhead, int dbnr)
|
||||||
|
|
||||||
/* Make sure the record is for this type of service. */
|
/* Make sure the record is for this type of service. */
|
||||||
if (here->type >= LASTREQ
|
if (here->type >= LASTREQ
|
||||||
|| servinfo[here->type].db != &dbs[dbnr])
|
|| reqinfo[here->type].db != &dbs[dbnr])
|
||||||
goto fail;
|
goto fail;
|
||||||
|
|
||||||
/* Validate boolean field value. */
|
/* Validate boolean field value. */
|
||||||
|
@ -940,19 +940,14 @@ cannot handle old request version %d; current version is %d"),
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Make the SELinux check before we go on to the standard checks. We
|
/* Make the SELinux check before we go on to the standard checks. */
|
||||||
need to verify that the request type is valid, since it has not
|
if (selinux_enabled && nscd_request_avc_has_perm (fd, req->type) != 0)
|
||||||
yet been checked at this point. */
|
|
||||||
if (selinux_enabled
|
|
||||||
&& __builtin_expect (req->type >= GETPWBYNAME, 1)
|
|
||||||
&& __builtin_expect (req->type < LASTREQ, 1)
|
|
||||||
&& nscd_request_avc_has_perm (fd, req->type) != 0)
|
|
||||||
return;
|
return;
|
||||||
|
|
||||||
struct database_dyn *db = servinfo[req->type].db;
|
struct database_dyn *db = reqinfo[req->type].db;
|
||||||
|
|
||||||
/* See whether we can service the request from the cache. */
|
/* See whether we can service the request from the cache. */
|
||||||
if (__builtin_expect (servinfo[req->type].data_request, true))
|
if (__builtin_expect (reqinfo[req->type].data_request, true))
|
||||||
{
|
{
|
||||||
if (__builtin_expect (debug_level, 0) > 0)
|
if (__builtin_expect (debug_level, 0) > 0)
|
||||||
{
|
{
|
||||||
|
@ -1151,7 +1146,7 @@ cannot handle old request version %d; current version is %d"),
|
||||||
case GETFDHST:
|
case GETFDHST:
|
||||||
case GETFDSERV:
|
case GETFDSERV:
|
||||||
#ifdef SCM_RIGHTS
|
#ifdef SCM_RIGHTS
|
||||||
send_ro_fd (servinfo[req->type].db, key, fd);
|
send_ro_fd (reqinfo[req->type].db, key, fd);
|
||||||
#endif
|
#endif
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue