From: Ulrich Drepper Date: Sat, 21 Jul 2007 17:24:43 +0000 (+0000) Subject: * nscd/nscd_helper.c (get_mapping): Use MSG_CMSG_CLOEXEC for X-Git-Tag: upstream/2.30~14865 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=dde0763af5353f4646e57e9eb788768aca072a3e;p=external%2Fglibc.git * nscd/nscd_helper.c (get_mapping): Use MSG_CMSG_CLOEXEC for descriptor received from nscd. --- diff --git a/ChangeLog b/ChangeLog index f02d7dd..838ccf0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2007-07-21 Ulrich Drepper + * nscd/nscd_helper.c (get_mapping): Use MSG_CMSG_CLOEXEC for + descriptor received from nscd. + * sysdeps/unix/sysv/linux/bits/socket.h: Define MSG_CMSG_CLOEXEC. * sysdeps/unix/sysv/linux/i386/bits/fcntl.h: Define O_CLOEXEC. diff --git a/nscd/nscd_helper.c b/nscd/nscd_helper.c index 79644a4..50146a0 100644 --- a/nscd/nscd_helper.c +++ b/nscd/nscd_helper.c @@ -265,7 +265,11 @@ get_mapping (request_type type, const char *key, if (wait_on_socket (sock) <= 0) goto out_close2; - if (__builtin_expect (TEMP_FAILURE_RETRY (__recvmsg (sock, &msg, 0)) +# ifndef MSG_CMSG_CLOEXEC +# define MSG_CMSG_CLOEXEC 0 +# endif + if (__builtin_expect (TEMP_FAILURE_RETRY (__recvmsg (sock, &msg, + MSG_CMSG_CLOEXEC)) != keylen, 0)) goto out_close2;