aboutsummaryrefslogtreecommitdiff
path: root/sys/kern/uipc_usrreq.c
diff options
context:
space:
mode:
authorAlex Richardson <arichardson@FreeBSD.org>2021-03-18 20:52:20 +0000
committerAlex Richardson <arichardson@FreeBSD.org>2021-03-18 20:52:20 +0000
commit6ceacebdf5221133943ab3b6b56751c8b51c3e2b (patch)
treebd950b0b7224234420dedd1d04a4b322c3d9d732 /sys/kern/uipc_usrreq.c
parentc853c53d024a3cc950854dfaade7f50303c5a022 (diff)
downloadsrc-6ceacebdf5221133943ab3b6b56751c8b51c3e2b.tar.gz
src-6ceacebdf5221133943ab3b6b56751c8b51c3e2b.zip
Unbreak MSG_CMSG_CLOEXEC
MSG_CMSG_CLOEXEC has not been working since 2015 (SVN r284380) because _finstall expects O_CLOEXEC and not UF_EXCLOSE as the flags argument. This was probably not noticed because we don't have a test for this flag so this commit adds one. I found this problem because one of the libwayland tests was failing. Fixes: ea31808c3b07 ("fd: move out actual fp installation to _finstall") MFC after: 3 days Reviewed By: mjg, kib Differential Revision: https://reviews.freebsd.org/D29328
Diffstat (limited to 'sys/kern/uipc_usrreq.c')
-rw-r--r--sys/kern/uipc_usrreq.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/kern/uipc_usrreq.c b/sys/kern/uipc_usrreq.c
index ca23ccbdb05e..4466ae8822cd 100644
--- a/sys/kern/uipc_usrreq.c
+++ b/sys/kern/uipc_usrreq.c
@@ -2067,7 +2067,7 @@ unp_externalize(struct mbuf *control, struct mbuf **controlp, int flags)
}
for (i = 0; i < newfds; i++, fdp++) {
_finstall(fdesc, fdep[i]->fde_file, *fdp,
- (flags & MSG_CMSG_CLOEXEC) != 0 ? UF_EXCLOSE : 0,
+ (flags & MSG_CMSG_CLOEXEC) != 0 ? O_CLOEXEC : 0,
&fdep[i]->fde_caps);
unp_externalize_fp(fdep[i]->fde_file);
}