summaryrefslogtreecommitdiffstats
path: root/sys/kern/uipc_usrreq.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/kern/uipc_usrreq.c')
-rw-r--r--sys/kern/uipc_usrreq.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/sys/kern/uipc_usrreq.c b/sys/kern/uipc_usrreq.c
index 102d156..51c7d84 100644
--- a/sys/kern/uipc_usrreq.c
+++ b/sys/kern/uipc_usrreq.c
@@ -1171,6 +1171,13 @@ unp_internalize(controlp, td)
error = EBADF;
goto out;
}
+ fp = fdescp->fd_ofiles[fd];
+ if (!(fp->f_ops->fo_flags & DFLAG_PASSABLE)) {
+ FILEDESC_UNLOCK(fdescp);
+ error = EOPNOTSUPP;
+ goto out;
+ }
+
}
/*
* Now replace the integer FDs with pointers to
OpenPOWER on IntegriCloud