diff options
author | nn35248 <none@none> | 2006-09-11 22:51:59 -0700 |
---|---|---|
committer | nn35248 <none@none> | 2006-09-11 22:51:59 -0700 |
commit | 9acbbeaf2a1ffe5c14b244867d427714fab43c5c (patch) | |
tree | d1ecd54896325c19a463220e9cbc50864874fc82 /usr/src/uts/common/sys/socketvar.h | |
parent | da51466dc253d7c98dda4956059042bd0c476328 (diff) | |
download | illumos-joyent-9acbbeaf2a1ffe5c14b244867d427714fab43c5c.tar.gz |
PSARC/2005/471 BrandZ: Support for non-native zones
6374606 ::nm -D without an object may not work on processes in zones
6409350 BrandZ project integration into Solaris
6455289 pthread_setschedparam() should return EPERM rather than panic libc
6455591 setpriority(3C) gets errno wrong for deficient privileges failure
6458178 fifofs doesn't support lofs mounts of fifos
6460380 Attempted open() of a symlink with the O_NOFOLLOW flag set returns EINVAL, not ELOOP
6463857 renice(1) errors erroneously
--HG--
rename : usr/src/lib/libzonecfg/zones/SUNWblank.xml => usr/src/lib/brand/native/zone/SUNWblank.xml
rename : usr/src/lib/libzonecfg/zones/SUNWdefault.xml => usr/src/lib/brand/native/zone/SUNWdefault.xml
Diffstat (limited to 'usr/src/uts/common/sys/socketvar.h')
-rw-r--r-- | usr/src/uts/common/sys/socketvar.h | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/usr/src/uts/common/sys/socketvar.h b/usr/src/uts/common/sys/socketvar.h index d00220f2a9..39112e6c97 100644 --- a/usr/src/uts/common/sys/socketvar.h +++ b/usr/src/uts/common/sys/socketvar.h @@ -544,11 +544,21 @@ struct sonodeops { (((len) + _CMSG_HDR_ALIGNMENT - 1) & ~(_CMSG_HDR_ALIGNMENT - 1)) /* - * Used in parsing msg_control + * Macros that operate on struct cmsghdr. + * Used in parsing msg_control. + * The CMSG_VALID macro does not assume that the last option buffer is padded. */ #define CMSG_NEXT(cmsg) \ (struct cmsghdr *)((uintptr_t)(cmsg) + \ ROUNDUP_cmsglen((cmsg)->cmsg_len)) +#define CMSG_CONTENT(cmsg) (&((cmsg)[1])) +#define CMSG_CONTENTLEN(cmsg) ((cmsg)->cmsg_len - sizeof (struct cmsghdr)) +#define CMSG_VALID(cmsg, start, end) \ + (ISALIGNED_cmsghdr(cmsg) && \ + ((uintptr_t)(cmsg) >= (uintptr_t)(start)) && \ + ((uintptr_t)(cmsg) < (uintptr_t)(end)) && \ + ((ssize_t)(cmsg)->cmsg_len >= sizeof (struct cmsghdr)) && \ + ((uintptr_t)(cmsg) + (cmsg)->cmsg_len <= (uintptr_t)(end))) /* * Maximum size of any argument that is copied in (addresses, options, |