mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-22 21:10:07 +00:00
Update.
2000-01-08 Ulrich Drepper <drepper@cygnus.com> * nscd/connections.c (handle_request): Handle systems without SO_PEERCRED. (nscd_run): Likewise.
This commit is contained in:
parent
9d8525f2a1
commit
cedc8559c3
@ -1,3 +1,9 @@
|
|||||||
|
2000-01-08 Ulrich Drepper <drepper@cygnus.com>
|
||||||
|
|
||||||
|
* nscd/connections.c (handle_request): Handle systems without
|
||||||
|
SO_PEERCRED.
|
||||||
|
(nscd_run): Likewise.
|
||||||
|
|
||||||
2000-01-07 Andreas Jaeger <aj@suse.de>
|
2000-01-07 Andreas Jaeger <aj@suse.de>
|
||||||
|
|
||||||
Add support for Berkeley db 3.0.x and merge db support:
|
Add support for Berkeley db 3.0.x and merge db support:
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/* Inner loops of cache daemon.
|
/* Inner loops of cache daemon.
|
||||||
Copyright (C) 1998, 1999 Free Software Foundation, Inc.
|
Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc.
|
||||||
This file is part of the GNU C Library.
|
This file is part of the GNU C Library.
|
||||||
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998.
|
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998.
|
||||||
|
|
||||||
@ -350,6 +350,9 @@ cannot handle old request version %d; current version is %d"),
|
|||||||
struct ucred caller;
|
struct ucred caller;
|
||||||
socklen_t optlen = sizeof (caller);
|
socklen_t optlen = sizeof (caller);
|
||||||
|
|
||||||
|
/* Some systems have no SO_PEERCRED implementation. They don't
|
||||||
|
care about security so we don't as well. */
|
||||||
|
#ifdef SO_PEERCRED
|
||||||
if (getsockopt (fd, SOL_SOCKET, SO_PEERCRED, &caller, &optlen) < 0)
|
if (getsockopt (fd, SOL_SOCKET, SO_PEERCRED, &caller, &optlen) < 0)
|
||||||
{
|
{
|
||||||
char buf[256];
|
char buf[256];
|
||||||
@ -359,6 +362,7 @@ cannot handle old request version %d; current version is %d"),
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
if (caller.uid == 0)
|
if (caller.uid == 0)
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
if (req->type == GETSTAT)
|
if (req->type == GETSTAT)
|
||||||
send_stats (fd, dbs);
|
send_stats (fd, dbs);
|
||||||
@ -433,6 +437,9 @@ nscd_run (void *p)
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Some systems have no SO_PEERCRED implementation. They don't
|
||||||
|
care about security so we don't as well. */
|
||||||
|
#ifdef SO_PEERCRED
|
||||||
if (secure_in_use)
|
if (secure_in_use)
|
||||||
{
|
{
|
||||||
struct ucred caller;
|
struct ucred caller;
|
||||||
@ -451,6 +458,7 @@ nscd_run (void *p)
|
|||||||
|| secure[serv2db[req.type]])
|
|| secure[serv2db[req.type]])
|
||||||
uid = caller.uid;
|
uid = caller.uid;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/* It should not be possible to crash the nscd with a silly
|
/* It should not be possible to crash the nscd with a silly
|
||||||
request (i.e., a terribly large key. We limit the size
|
request (i.e., a terribly large key. We limit the size
|
||||||
|
Loading…
Reference in New Issue
Block a user