diff options
Diffstat (limited to 'nscd')
-rw-r--r-- | nscd/connections.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/nscd/connections.c b/nscd/connections.c index 7414ef60a3..58e05018d3 100644 --- a/nscd/connections.c +++ b/nscd/connections.c @@ -391,12 +391,12 @@ cannot handle old request version %d; current version is %d"), } else { - struct ucred 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 + struct ucred caller; + socklen_t optlen = sizeof (caller); + if (getsockopt (fd, SOL_SOCKET, SO_PEERCRED, &caller, &optlen) < 0) { char buf[256]; |