aboutsummaryrefslogtreecommitdiff
path: root/sys/sys/domain.h
diff options
context:
space:
mode:
authorJilles Tjoelker <jilles@FreeBSD.org>2013-03-19 20:58:17 +0000
committerJilles Tjoelker <jilles@FreeBSD.org>2013-03-19 20:58:17 +0000
commitc2e3c52e0d10026daec4e18f1d5c8ac55839f985 (patch)
tree71ad20dc1a5c91d4fc411e2e04d96225b53fd904 /sys/sys/domain.h
parentf0db652cf6db5c1216e460b3434aa61d483fadaa (diff)
downloadsrc-c2e3c52e0d10026daec4e18f1d5c8ac55839f985.tar.gz
src-c2e3c52e0d10026daec4e18f1d5c8ac55839f985.zip
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
Notes
Notes: svn path=/head/; revision=248534
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 2563cb6e05c2..30e42491b15a 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;