projects
/
kopensolaris-gnu
/
glibc.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Replace lll_private_futex_* (*) with lll_futex_* (*, LLL_PRIVATE).
[kopensolaris-gnu/glibc.git]
/
nscd
/
nscd_helper.c
diff --git
a/nscd/nscd_helper.c
b/nscd/nscd_helper.c
index
1f56ccf
..
50146a0
100644
(file)
--- a/
nscd/nscd_helper.c
+++ b/
nscd/nscd_helper.c
@@
-265,15
+265,20
@@
get_mapping (request_type type, const char *key,
if (wait_on_socket (sock) <= 0)
goto out_close2;
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;
!= keylen, 0))
goto out_close2;
- mapfd = *(int *) CMSG_DATA (cmsg);
+ if (__builtin_expect (CMSG_FIRSTHDR (&msg) == NULL
+ || (CMSG_FIRSTHDR (&msg)->cmsg_len
+ != CMSG_LEN (sizeof (int))), 0))
+ goto out_close2;
- if (__builtin_expect (CMSG_FIRSTHDR (&msg)->cmsg_len
- != CMSG_LEN (sizeof (int)), 0))
- goto out_close;
+ mapfd = *(int *) CMSG_DATA (cmsg);
struct stat64 st;
if (__builtin_expect (strcmp (resdata, key) != 0, 0)
struct stat64 st;
if (__builtin_expect (strcmp (resdata, key) != 0, 0)