version 1.37, 2001/01/22 21:31:37 |
version 1.38, 2001/06/14 20:32:43 |
Line 201 linux_sys_open(p, v, retval) |
|
Line 201 linux_sys_open(p, v, retval) |
|
*/ |
*/ |
if (!(fl & O_NOCTTY) && SESS_LEADER(p) && !(p->p_flag & P_CONTROLT)) { |
if (!(fl & O_NOCTTY) && SESS_LEADER(p) && !(p->p_flag & P_CONTROLT)) { |
struct filedesc *fdp = p->p_fd; |
struct filedesc *fdp = p->p_fd; |
struct file *fp = fdp->fd_ofiles[*retval]; |
struct file *fp; |
|
|
|
fp = fd_getfile(fdp, *retval); |
|
|
/* ignore any error, just give it a try */ |
/* ignore any error, just give it a try */ |
if (fp->f_type == DTYPE_VNODE) |
if (fp != NULL && fp->f_type == DTYPE_VNODE) |
(fp->f_ops->fo_ioctl) (fp, TIOCSCTTY, (caddr_t) 0, p); |
(fp->f_ops->fo_ioctl) (fp, TIOCSCTTY, (caddr_t) 0, p); |
} |
} |
return 0; |
return 0; |
Line 363 linux_sys_fcntl(p, v, retval) |
|
Line 365 linux_sys_fcntl(p, v, retval) |
|
* does not exist. |
* does not exist. |
*/ |
*/ |
fdp = p->p_fd; |
fdp = p->p_fd; |
if ((u_int)fd >= fdp->fd_nfiles || |
if ((fp = fd_getfile(fdp, fd)) == NULL) |
(fp = fdp->fd_ofiles[fd]) == NULL) |
|
return EBADF; |
return EBADF; |
if (fp->f_type == DTYPE_SOCKET) { |
if (fp->f_type == DTYPE_SOCKET) { |
cmd = cmd == LINUX_F_SETOWN ? F_SETOWN : F_GETOWN; |
cmd = cmd == LINUX_F_SETOWN ? F_SETOWN : F_GETOWN; |