diff options
Diffstat (limited to 'sys/compat')
-rw-r--r-- | sys/compat/linux/linux_file.c | 2 | ||||
-rw-r--r-- | sys/compat/linux/linux_getcwd.c | 8 | ||||
-rw-r--r-- | sys/compat/linux/linux_misc.c | 6 | ||||
-rw-r--r-- | sys/compat/linux/linux_uid16.c | 6 | ||||
-rw-r--r-- | sys/compat/linux/linux_util.c | 4 | ||||
-rw-r--r-- | sys/compat/pecoff/imgact_pecoff.c | 4 | ||||
-rw-r--r-- | sys/compat/svr4/svr4_fcntl.c | 6 | ||||
-rw-r--r-- | sys/compat/svr4/svr4_misc.c | 4 | ||||
-rw-r--r-- | sys/compat/svr4/svr4_sysvec.c | 5 |
9 files changed, 22 insertions, 23 deletions
diff --git a/sys/compat/linux/linux_file.c b/sys/compat/linux/linux_file.c index dd4f219..0d9273e 100644 --- a/sys/compat/linux/linux_file.c +++ b/sys/compat/linux/linux_file.c @@ -285,7 +285,7 @@ getdents_common(struct thread *td, struct linux_getdents64_args *args, return (EINVAL); } - if ((error = VOP_GETATTR(vp, &va, td->td_proc->p_ucred, td))) { + if ((error = VOP_GETATTR(vp, &va, td->td_ucred, td))) { fdrop(fp, td); return (error); } diff --git a/sys/compat/linux/linux_getcwd.c b/sys/compat/linux/linux_getcwd.c index 509cdec..2a09fd3 100644 --- a/sys/compat/linux/linux_getcwd.c +++ b/sys/compat/linux/linux_getcwd.c @@ -132,7 +132,7 @@ linux_getcwd_scandir(lvpp, uvpp, bpp, bufp, td) * current directory is still locked. */ if (bufp != NULL) { - error = VOP_GETATTR(lvp, &va, td->td_proc->p_ucred, td); + error = VOP_GETATTR(lvp, &va, td->td_ucred, td); if (error) { vput(lvp); *lvpp = NULL; @@ -148,7 +148,7 @@ linux_getcwd_scandir(lvpp, uvpp, bpp, bufp, td) cn.cn_nameiop = LOOKUP; cn.cn_flags = ISLASTCN | ISDOTDOT | RDONLY; cn.cn_thread = td; - cn.cn_cred = td->td_proc->p_ucred; + cn.cn_cred = td->td_ucred; cn.cn_pnbuf = NULL; cn.cn_nameptr = ".."; cn.cn_namelen = 2; @@ -200,7 +200,7 @@ unionread: eofflag = 0; - error = VOP_READDIR(uvp, &uio, td->td_proc->p_ucred, &eofflag, 0, 0); + error = VOP_READDIR(uvp, &uio, td->td_ucred, &eofflag, 0, 0); off = uio.uio_offset; @@ -335,7 +335,7 @@ linux_getcwd_common (lvp, rvp, bpp, bufp, limit, flags, td) * whether or not caller cares. */ if (flags & GETCWD_CHECK_ACCESS) { - error = VOP_ACCESS(lvp, perms, td->td_proc->p_ucred, td); + error = VOP_ACCESS(lvp, perms, td->td_ucred, td); if (error) goto out; perms = VEXEC|VREAD; diff --git a/sys/compat/linux/linux_misc.c b/sys/compat/linux/linux_misc.c index 031c406..68f99fb 100644 --- a/sys/compat/linux/linux_misc.c +++ b/sys/compat/linux/linux_misc.c @@ -284,7 +284,7 @@ linux_uselib(struct thread *td, struct linux_uselib_args *args) } /* Executable? */ - error = VOP_GETATTR(vp, &attr, td->td_proc->p_ucred, td); + error = VOP_GETATTR(vp, &attr, td->td_ucred, td); if (error) goto cleanup; @@ -301,11 +301,11 @@ linux_uselib(struct thread *td, struct linux_uselib_args *args) } /* Can we access it? */ - error = VOP_ACCESS(vp, VEXEC, td->td_proc->p_ucred, td); + error = VOP_ACCESS(vp, VEXEC, td->td_ucred, td); if (error) goto cleanup; - error = VOP_OPEN(vp, FREAD, td->td_proc->p_ucred, td); + error = VOP_OPEN(vp, FREAD, td->td_ucred, td); if (error) goto cleanup; diff --git a/sys/compat/linux/linux_uid16.c b/sys/compat/linux/linux_uid16.c index dcb61a7..f768bae 100644 --- a/sys/compat/linux/linux_uid16.c +++ b/sys/compat/linux/linux_uid16.c @@ -152,7 +152,7 @@ linux_getgroups16(struct thread *td, struct linux_getgroups16_args *args) printf(ARGS(getgroups16, "%d, *"), args->gidsetsize); #endif - cred = td->td_proc->p_ucred; + cred = td->td_ucred; bsd_gidset = cred->cr_groups; bsd_gidsetsz = cred->cr_ngroups - 1; @@ -200,7 +200,7 @@ int linux_getgid16(struct thread *td, struct linux_getgid16_args *args) { - td->td_retval[0] = td->td_proc->p_ucred->cr_rgid; + td->td_retval[0] = td->td_ucred->cr_rgid; return (0); } @@ -208,7 +208,7 @@ int linux_getuid16(struct thread *td, struct linux_getuid16_args *args) { - td->td_retval[0] = td->td_proc->p_ucred->cr_ruid; + td->td_retval[0] = td->td_ucred->cr_ruid; return (0); } diff --git a/sys/compat/linux/linux_util.c b/sys/compat/linux/linux_util.c index c30d0f4..4949a45 100644 --- a/sys/compat/linux/linux_util.c +++ b/sys/compat/linux/linux_util.c @@ -140,11 +140,11 @@ linux_emul_find(td, sgp, path, pbuf, cflag) return error; } - if ((error = VOP_GETATTR(nd.ni_vp, &vat, td->td_proc->p_ucred, td)) != 0) { + if ((error = VOP_GETATTR(nd.ni_vp, &vat, td->td_ucred, td)) != 0) { goto bad; } - if ((error = VOP_GETATTR(ndroot.ni_vp, &vatroot, td->td_proc->p_ucred, td)) + if ((error = VOP_GETATTR(ndroot.ni_vp, &vatroot, td->td_ucred, td)) != 0) { goto bad; } diff --git a/sys/compat/pecoff/imgact_pecoff.c b/sys/compat/pecoff/imgact_pecoff.c index ac608f5..f3acb99 100644 --- a/sys/compat/pecoff/imgact_pecoff.c +++ b/sys/compat/pecoff/imgact_pecoff.c @@ -163,7 +163,7 @@ static int pecoff_coredump(register struct thread * td, register struct vnode * vp, off_t limit) { - register struct ucred *cred = td->td_proc->p_ucred; + register struct ucred *cred = td->td_ucred; register struct vmspace *vm = td->td_proc->p_vmspace; int error; #ifdef PECOFF_DEBUG @@ -607,7 +607,7 @@ pecoff_read_from(td, vp, pos, buf, siz) size_t resid; error = vn_rdwr(UIO_READ, vp, buf, siz, pos, - UIO_SYSSPACE, IO_NODELOCKED, td->td_proc->p_ucred, + UIO_SYSSPACE, IO_NODELOCKED, td->td_ucred, &resid, td); if (error) return error; diff --git a/sys/compat/svr4/svr4_fcntl.c b/sys/compat/svr4/svr4_fcntl.c index 12c956c..394b1d5 100644 --- a/sys/compat/svr4/svr4_fcntl.c +++ b/sys/compat/svr4/svr4_fcntl.c @@ -260,10 +260,10 @@ fd_revoke(td, fd) goto out; } - if ((error = VOP_GETATTR(vp, &vattr, td->td_proc->p_ucred, td)) != 0) + if ((error = VOP_GETATTR(vp, &vattr, td->td_ucred, td)) != 0) goto out; - if (td->td_proc->p_ucred->cr_uid != vattr.va_uid && + if (td->td_ucred->cr_uid != vattr.va_uid && (error = suser_td(td)) != 0) goto out; @@ -306,7 +306,7 @@ fd_truncate(td, fd, flp) return ESPIPE; } - if ((error = VOP_GETATTR(vp, &vattr, td->td_proc->p_ucred, td)) != 0) { + if ((error = VOP_GETATTR(vp, &vattr, td->td_ucred, td)) != 0) { fdrop(fp, td); return error; } diff --git a/sys/compat/svr4/svr4_misc.c b/sys/compat/svr4/svr4_misc.c index 9dcfa7f..40a12c6 100644 --- a/sys/compat/svr4/svr4_misc.c +++ b/sys/compat/svr4/svr4_misc.c @@ -275,7 +275,7 @@ svr4_sys_getdents64(td, uap) return (EINVAL); } - if ((error = VOP_GETATTR(vp, &va, td->td_proc->p_ucred, td))) { + if ((error = VOP_GETATTR(vp, &va, td->td_ucred, td))) { fdrop(fp, td); return error; } @@ -616,7 +616,7 @@ svr4_sys_fchroot(td, uap) if (vp->v_type != VDIR) error = ENOTDIR; else - error = VOP_ACCESS(vp, VEXEC, td->td_proc->p_ucred, td); + error = VOP_ACCESS(vp, VEXEC, td->td_ucred, td); VOP_UNLOCK(vp, 0, td); if (error) { fdrop(fp, td); diff --git a/sys/compat/svr4/svr4_sysvec.c b/sys/compat/svr4/svr4_sysvec.c index 39aa904..5292a8c 100644 --- a/sys/compat/svr4/svr4_sysvec.c +++ b/sys/compat/svr4/svr4_sysvec.c @@ -246,7 +246,6 @@ svr4_emul_find(td, sgp, prefix, path, pbuf, cflag) char **pbuf; int cflag; { - struct proc *p = td->td_proc; struct nameidata nd; struct nameidata ndroot; struct vattr vat; @@ -331,11 +330,11 @@ svr4_emul_find(td, sgp, prefix, path, pbuf, cflag) } NDFREE(&ndroot, NDF_ONLY_PNBUF); - if ((error = VOP_GETATTR(nd.ni_vp, &vat, p->p_ucred, td)) != 0) { + if ((error = VOP_GETATTR(nd.ni_vp, &vat, td->td_ucred, td)) != 0) { goto done; } - if ((error = VOP_GETATTR(ndroot.ni_vp, &vatroot, p->p_ucred, td)) + if ((error = VOP_GETATTR(ndroot.ni_vp, &vatroot, td->td_ucred, td)) != 0) { goto done; } |