summaryrefslogtreecommitdiffstats
path: root/sys/compat/linux/linux_file.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/compat/linux/linux_file.c')
-rw-r--r--sys/compat/linux/linux_file.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/sys/compat/linux/linux_file.c b/sys/compat/linux/linux_file.c
index 0318a5c..346d178 100644
--- a/sys/compat/linux/linux_file.c
+++ b/sys/compat/linux/linux_file.c
@@ -154,6 +154,7 @@ linux_common_open(struct thread *td, int dirfd, char *path, int l_flags, int mod
SESS_LEADER(p) && !(p->p_flag & P_CONTROLT)) {
PROC_UNLOCK(p);
sx_unlock(&proctree_lock);
+ /* XXXPJD: Verify if TIOCSCTTY is allowed. */
if (fp->f_type == DTYPE_VNODE)
(void) fo_ioctl(fp, TIOCSCTTY, (caddr_t) 0,
td->td_ucred, td);
@@ -1038,11 +1039,11 @@ linux_pread(td, uap)
error = sys_pread(td, &bsd);
if (error == 0) {
- /* This seems to violate POSIX but linux does it */
- if ((error = fgetvp(td, uap->fd, CAP_READ, &vp)) != 0)
- return (error);
+ /* This seems to violate POSIX but linux does it */
+ if ((error = fgetvp(td, uap->fd, CAP_PREAD, &vp)) != 0)
+ return (error);
if (vp->v_type == VDIR) {
- vrele(vp);
+ vrele(vp);
return (EISDIR);
}
vrele(vp);
OpenPOWER on IntegriCloud