summaryrefslogtreecommitdiffstats
path: root/sys/sys/domain.h
diff options
context:
space:
mode:
authorjilles <jilles@FreeBSD.org>2013-03-19 20:58:17 +0000
committerjilles <jilles@FreeBSD.org>2013-03-19 20:58:17 +0000
commitc9066bd014b20089911abc91a8c87ef738498a28 (patch)
tree71ad20dc1a5c91d4fc411e2e04d96225b53fd904 /sys/sys/domain.h
parent30ce276eca66462aa7b3385fa4f6daac2634fbcc (diff)
downloadFreeBSD-src-c9066bd014b20089911abc91a8c87ef738498a28.zip
FreeBSD-src-c9066bd014b20089911abc91a8c87ef738498a28.tar.gz
Implement SOCK_CLOEXEC, SOCK_NONBLOCK and MSG_CMSG_CLOEXEC.
This change allows creating file descriptors with close-on-exec set in some situations. SOCK_CLOEXEC and SOCK_NONBLOCK can be OR'ed in socket() and socketpair()'s type parameter, and MSG_CMSG_CLOEXEC to recvmsg() makes file descriptors (SCM_RIGHTS) atomically close-on-exec. The numerical values for SOCK_CLOEXEC and SOCK_NONBLOCK are as in NetBSD. MSG_CMSG_CLOEXEC is the first free bit for MSG_*. The SOCK_* flags are not passed to MAC because this may cause incorrect failures and can be done later via fcntl() anyway. On the other hand, audit is expected to cope with the new flags. For MSG_CMSG_CLOEXEC, unp_externalize() is extended to take a flags argument. Reviewed by: kib
Diffstat (limited to 'sys/sys/domain.h')
-rw-r--r--sys/sys/domain.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/sys/domain.h b/sys/sys/domain.h
index 2563cb6..30e4249 100644
--- a/sys/sys/domain.h
+++ b/sys/sys/domain.h
@@ -51,7 +51,7 @@ struct domain {
void (*dom_destroy) /* cleanup structures / state */
(void);
int (*dom_externalize) /* externalize access rights */
- (struct mbuf *, struct mbuf **);
+ (struct mbuf *, struct mbuf **, int);
void (*dom_dispose) /* dispose of internalized rights */
(struct mbuf *);
struct protosw *dom_protosw, *dom_protoswNPROTOSW;
OpenPOWER on IntegriCloud