diff options
Diffstat (limited to 'sysdeps/unix/bsd/bsd4.4/bits')
-rw-r--r-- | sysdeps/unix/bsd/bsd4.4/bits/socket.h | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/sysdeps/unix/bsd/bsd4.4/bits/socket.h b/sysdeps/unix/bsd/bsd4.4/bits/socket.h index dbd0f1e6a9..ef2a5bf86a 100644 --- a/sysdeps/unix/bsd/bsd4.4/bits/socket.h +++ b/sysdeps/unix/bsd/bsd4.4/bits/socket.h @@ -237,8 +237,8 @@ __cmsg_nxthdr (struct msghdr *__mhdr, struct cmsghdr *__cmsg) __THROW __cmsg = (struct cmsghdr *) ((unsigned char *) __cmsg + CMSG_ALIGN (__cmsg->cmsg_len)); - if ((unsigned char *) (__cmsg + 1) >= ((unsigned char *) __mhdr->msg_control - + __mhdr->msg_controllen) + if ((unsigned char *) (__cmsg + 1) > ((unsigned char *) __mhdr->msg_control + + __mhdr->msg_controllen) || ((unsigned char *) __cmsg + CMSG_ALIGN (__cmsg->cmsg_len) > ((unsigned char *) __mhdr->msg_control + __mhdr->msg_controllen))) /* No more entries. */ @@ -250,8 +250,12 @@ __cmsg_nxthdr (struct msghdr *__mhdr, struct cmsghdr *__cmsg) __THROW /* Socket level message types. */ enum { - SCM_RIGHTS = 0x01 /* Access rights. */ + SCM_RIGHTS = 0x01, /* Access rights (array of int). */ #define SCM_RIGHTS SCM_RIGHTS + SCM_TIMESTAMP = 0x02, /* Timestamp (struct timeval). */ +#define SCM_TIMESTAMP SCM_TIMESTAMP + SCM_CREDS = 0x03 /* Process creds (strcm cmsgcred). */ +#define SCM_CREDS SCM_CREDS }; |