diff options
-rw-r--r-- | sys/alpha/osf1/osf1_mount.c | 6 | ||||
-rw-r--r-- | sys/compat/linux/linux_file.c | 2 | ||||
-rw-r--r-- | sys/compat/linux/linux_stats.c | 7 | ||||
-rw-r--r-- | sys/dev/drm/drm_fops.h | 4 | ||||
-rw-r--r-- | sys/dev/raidframe/rf_threadstuff.h | 2 | ||||
-rw-r--r-- | sys/net/if.c | 4 | ||||
-rw-r--r-- | sys/netncp/ncp_conn.c | 2 | ||||
-rw-r--r-- | sys/sparc64/sparc64/mem.c | 2 | ||||
-rw-r--r-- | sys/ufs/ffs/ffs_snapshot.c | 2 | ||||
-rw-r--r-- | sys/ufs/ffs/ffs_vfsops.c | 2 |
10 files changed, 16 insertions, 17 deletions
diff --git a/sys/alpha/osf1/osf1_mount.c b/sys/alpha/osf1/osf1_mount.c index 9205f99..913bdcc 100644 --- a/sys/alpha/osf1/osf1_mount.c +++ b/sys/alpha/osf1/osf1_mount.c @@ -134,7 +134,7 @@ osf1_statfs(td, uap) sp = &mp->mnt_stat; vrele(nd.ni_vp); #ifdef MAC - error = mac_check_mount_stat(td->td_proc->p_ucred, mp); + error = mac_check_mount_stat(td->td_ucred, mp); if (error) return (error); #endif @@ -161,7 +161,7 @@ osf1_fstatfs(td, uap) return (error); mp = ((struct vnode *)fp->f_data)->v_mount; #ifdef MAC - error = mac_check_mount_stat(td->td_proc->p_ucred, mp); + error = mac_check_mount_stat(td->td_ucred, mp); if (error) { fdrop(fp, td); return (error); @@ -198,7 +198,7 @@ osf1_getfsstat(td, uap) nmp = TAILQ_NEXT(mp, mnt_list); if (osf_sfsp && count < maxcount) { #ifdef MAC - error = mac_check_mount_stat(td->td_proc->p_ucred, mp); + error = mac_check_mount_stat(td->td_ucred, mp); if (error) continue; #endif diff --git a/sys/compat/linux/linux_file.c b/sys/compat/linux/linux_file.c index 1831361..2eea67b 100644 --- a/sys/compat/linux/linux_file.c +++ b/sys/compat/linux/linux_file.c @@ -320,7 +320,7 @@ again: /* * Do directory search MAC check using non-cached credentials. */ - if ((error = mac_check_vnode_readdir(td->td_proc->p_ucred, vp))) + if ((error = mac_check_vnode_readdir(td->td_ucred, vp))) goto out; #endif /* MAC */ if ((error = VOP_READDIR(vp, &auio, fp->f_cred, &eofflag, &ncookies, diff --git a/sys/compat/linux/linux_stats.c b/sys/compat/linux/linux_stats.c index 07a962b..eab5ad5 100644 --- a/sys/compat/linux/linux_stats.c +++ b/sys/compat/linux/linux_stats.c @@ -251,7 +251,7 @@ linux_statfs(struct thread *td, struct linux_statfs_args *args) bsd_statfs = &mp->mnt_stat; vrele(ndp->ni_vp); #ifdef MAC - error = mac_check_mount_stat(td->td_proc->p_ucred, mp); + error = mac_check_mount_stat(td->td_ucred, mp); if (error) return (error); #endif @@ -290,7 +290,7 @@ linux_fstatfs(struct thread *td, struct linux_fstatfs_args *args) return error; mp = ((struct vnode *)fp->f_data)->v_mount; #ifdef MAC - error = mac_check_mount_stat(td->td_proc->p_ucred, mp); + error = mac_check_mount_stat(td->td_ucred, mp); if (error) { fdrop(fp, td); return (error); @@ -358,8 +358,7 @@ linux_ustat(struct thread *td, struct linux_ustat_args *args) if (vp->v_mount == NULL) return (EINVAL); #ifdef MAC - error = mac_check_mount_stat(td->td_proc->p_ucred, - vp->v_mount); + error = mac_check_mount_stat(td->td_ucred, vp->v_mount); if (error) return (error); #endif diff --git a/sys/dev/drm/drm_fops.h b/sys/dev/drm/drm_fops.h index 136f4d6..b76d336 100644 --- a/sys/dev/drm/drm_fops.h +++ b/sys/dev/drm/drm_fops.h @@ -37,7 +37,7 @@ drm_file_t *DRM(find_file_by_proc)(drm_device_t *dev, DRM_STRUCTPROC *p) { #if __FreeBSD_version >= 500021 - uid_t uid = p->td_proc->p_ucred->cr_svuid; + uid_t uid = p->td_ucred->cr_svuid; pid_t pid = p->td_proc->p_pid; #else uid_t uid = p->p_cred->p_svuid; @@ -75,7 +75,7 @@ int DRM(open_helper)(dev_t kdev, int flags, int fmt, DRM_STRUCTPROC *p, priv = (drm_file_t *) DRM(alloc)(sizeof(*priv), DRM_MEM_FILES); bzero(priv, sizeof(*priv)); #if __FreeBSD_version >= 500000 - priv->uid = p->td_proc->p_ucred->cr_svuid; + priv->uid = p->td_ucred->cr_svuid; priv->pid = p->td_proc->p_pid; #else priv->uid = p->p_cred->p_svuid; diff --git a/sys/dev/raidframe/rf_threadstuff.h b/sys/dev/raidframe/rf_threadstuff.h index f7e81ff..a3560cc 100644 --- a/sys/dev/raidframe/rf_threadstuff.h +++ b/sys/dev/raidframe/rf_threadstuff.h @@ -78,7 +78,7 @@ typedef void *RF_ThreadArg_t; static __inline struct ucred * rf_getucred(RF_Thread_t td) { - return (((struct thread *)td)->td_proc->p_ucred); + return (((struct thread *)td)->td_ucred); } #endif diff --git a/sys/net/if.c b/sys/net/if.c index 774b29f..93620c7 100644 --- a/sys/net/if.c +++ b/sys/net/if.c @@ -1267,7 +1267,7 @@ ifhwioctl(u_long cmd, struct ifnet *ifp, caddr_t data, struct thread *td) #ifdef MAC case SIOCGIFMAC: - error = mac_ioctl_ifnet_get(td->td_proc->p_ucred, ifr, ifp); + error = mac_ioctl_ifnet_get(td->td_ucred, ifr, ifp); break; #endif @@ -1326,7 +1326,7 @@ ifhwioctl(u_long cmd, struct ifnet *ifp, caddr_t data, struct thread *td) #ifdef MAC case SIOCSIFMAC: - error = mac_ioctl_ifnet_set(td->td_proc->p_ucred, ifr, ifp); + error = mac_ioctl_ifnet_set(td->td_ucred, ifr, ifp); break; #endif diff --git a/sys/netncp/ncp_conn.c b/sys/netncp/ncp_conn.c index d7111ec..cc95462 100644 --- a/sys/netncp/ncp_conn.c +++ b/sys/netncp/ncp_conn.c @@ -642,7 +642,7 @@ ncp_sysctl_connstat(SYSCTL_HANDLER_ARGS) int error; struct ncp_conn_stat ncs; struct ncp_conn *ncp; -/* struct ucred *cred = req->p->p_ucred;*/ +/* struct ucred *cred = req->td->td_ucred;*/ error = 0; sysctl_wire_old_buffer(req, 0); diff --git a/sys/sparc64/sparc64/mem.c b/sys/sparc64/sparc64/mem.c index b838b96..904d6fe 100644 --- a/sys/sparc64/sparc64/mem.c +++ b/sys/sparc64/sparc64/mem.c @@ -108,7 +108,7 @@ mmopen(dev_t dev, int flags, int fmt, struct thread *td) case 0: case 1: if (flags & FWRITE) { - error = securelevel_gt(td->td_proc->p_ucred, 0); + error = securelevel_gt(td->td_ucred, 0); if (error != 0) return (error); } diff --git a/sys/ufs/ffs/ffs_snapshot.c b/sys/ufs/ffs/ffs_snapshot.c index 58ddfd2..442d99a 100644 --- a/sys/ufs/ffs/ffs_snapshot.c +++ b/sys/ufs/ffs/ffs_snapshot.c @@ -412,7 +412,7 @@ loop: mp_fixme("Unlocked GETATTR."); if (vrefcnt(xvp) == 0 || xvp->v_type == VNON || (VTOI(xvp)->i_flags & SF_SNAPSHOT) || - (VOP_GETATTR(xvp, &vat, td->td_proc->p_ucred, td) == 0 && + (VOP_GETATTR(xvp, &vat, td->td_ucred, td) == 0 && vat.va_nlink > 0)) { mtx_lock(&mntvnode_mtx); continue; diff --git a/sys/ufs/ffs/ffs_vfsops.c b/sys/ufs/ffs/ffs_vfsops.c index fe22521..b77b88d 100644 --- a/sys/ufs/ffs/ffs_vfsops.c +++ b/sys/ufs/ffs/ffs_vfsops.c @@ -199,7 +199,7 @@ ffs_mount(mp, path, data, ndp, td) * Flush any dirty data. */ if ((error = VFS_SYNC(mp, MNT_WAIT, - td->td_proc->p_ucred, td)) != 0) { + td->td_ucred, td)) != 0) { vn_finished_write(mp); return (error); } |