diff options
Diffstat (limited to 'sys/nfsclient')
-rw-r--r-- | sys/nfsclient/bootp_subr.c | 6 | ||||
-rw-r--r-- | sys/nfsclient/krpc_subr.c | 3 | ||||
-rw-r--r-- | sys/nfsclient/nfs_bio.c | 4 | ||||
-rw-r--r-- | sys/nfsclient/nfs_lock.c | 4 | ||||
-rw-r--r-- | sys/nfsclient/nfs_vfsops.c | 12 |
5 files changed, 13 insertions, 16 deletions
diff --git a/sys/nfsclient/bootp_subr.c b/sys/nfsclient/bootp_subr.c index 4440abd..3bae16a 100644 --- a/sys/nfsclient/bootp_subr.c +++ b/sys/nfsclient/bootp_subr.c @@ -587,8 +587,7 @@ bootpc_call(struct bootpc_globalcontext *gctx, struct thread *td) /* * Create socket and set its recieve timeout. */ - error = socreate(AF_INET, &so, SOCK_DGRAM, 0, td->td_proc->p_ucred, - td); + error = socreate(AF_INET, &so, SOCK_DGRAM, 0, td->td_ucred, td); if (error != 0) goto out; @@ -973,8 +972,7 @@ bootpc_fakeup_interface(struct bootpc_ifcontext *ifctx, struct ifaddr *ifa; struct sockaddr_dl *sdl; - error = socreate(AF_INET, &ifctx->so, SOCK_DGRAM, 0, - td->td_proc->p_ucred, td); + error = socreate(AF_INET, &ifctx->so, SOCK_DGRAM, 0, td->td_ucred, td); if (error != 0) panic("nfs_boot: socreate, error=%d", error); diff --git a/sys/nfsclient/krpc_subr.c b/sys/nfsclient/krpc_subr.c index 349cdf0..4690104 100644 --- a/sys/nfsclient/krpc_subr.c +++ b/sys/nfsclient/krpc_subr.c @@ -216,8 +216,7 @@ krpc_call(struct sockaddr_in *sa, u_int prog, u_int vers, u_int func, /* * Create socket and set its recieve timeout. */ - if ((error = socreate(AF_INET, &so, SOCK_DGRAM, 0, - td->td_proc->p_ucred, td))) + if ((error = socreate(AF_INET, &so, SOCK_DGRAM, 0, td->td_ucred, td))) goto out; tv.tv_sec = 1; diff --git a/sys/nfsclient/nfs_bio.c b/sys/nfsclient/nfs_bio.c index 1b607dc..40fac72 100644 --- a/sys/nfsclient/nfs_bio.c +++ b/sys/nfsclient/nfs_bio.c @@ -105,7 +105,7 @@ nfs_getpages(struct vop_getpages_args *ap) vp = ap->a_vp; td = curthread; /* XXX */ - cred = curthread->td_proc->p_ucred; /* XXX */ + cred = curthread->td_ucred; /* XXX */ nmp = VFSTONFS(vp->v_mount); pages = ap->a_m; count = ap->a_count; @@ -266,7 +266,7 @@ nfs_putpages(struct vop_putpages_args *ap) vp = ap->a_vp; np = VTONFS(vp); td = curthread; /* XXX */ - cred = curthread->td_proc->p_ucred; /* XXX */ + cred = curthread->td_ucred; /* XXX */ nmp = VFSTONFS(vp->v_mount); pages = ap->a_m; count = ap->a_count; diff --git a/sys/nfsclient/nfs_lock.c b/sys/nfsclient/nfs_lock.c index a239c1c..2998463 100644 --- a/sys/nfsclient/nfs_lock.c +++ b/sys/nfsclient/nfs_lock.c @@ -140,7 +140,7 @@ nfs_dolock(struct vop_advlock_args *ap) msg.lm_fh_len = NFS_ISV3(vp) ? VTONFS(vp)->n_fhsize : NFSX_V2FH; bcopy(VTONFS(vp)->n_fhp, msg.lm_fh, msg.lm_fh_len); msg.lm_nfsv3 = NFS_ISV3(vp); - msg.lm_cred = *(p->p_ucred); + msg.lm_cred = *(td->td_ucred); /* * Open the lock fifo. If for any reason we don't find the fifo, it @@ -242,7 +242,7 @@ nfslockdans(struct thread *td, struct lockd_ans *ansp) * XXX This authorization check is probably not right. */ if ((error = suser(td->td_proc)) != 0 && - td->td_proc->p_ucred->cr_svuid != 0) + td->td_ucred->cr_svuid != 0) return (error); /* the version should match, or we're out of sync */ diff --git a/sys/nfsclient/nfs_vfsops.c b/sys/nfsclient/nfs_vfsops.c index 62d412e..675cd94 100644 --- a/sys/nfsclient/nfs_vfsops.c +++ b/sys/nfsclient/nfs_vfsops.c @@ -253,13 +253,13 @@ nfs_statfs(struct mount *mp, struct statfs *sbp, struct thread *td) return (error); vp = NFSTOV(np); if (v3 && (nmp->nm_state & NFSSTA_GOTFSINFO) == 0) - (void)nfs_fsinfo(nmp, vp, td->td_proc->p_ucred, td); + (void)nfs_fsinfo(nmp, vp, td->td_ucred, td); nfsstats.rpccnt[NFSPROC_FSSTAT]++; mreq = nfsm_reqhead(vp, NFSPROC_FSSTAT, NFSX_FH(v3)); mb = mreq; bpos = mtod(mb, caddr_t); nfsm_fhtom(vp, v3); - nfsm_request(vp, NFSPROC_FSSTAT, td, td->td_proc->p_ucred); + nfsm_request(vp, NFSPROC_FSSTAT, td, td->td_ucred); if (v3) nfsm_postop_attr(vp, retattr); if (error) { @@ -420,7 +420,7 @@ nfs_mountroot(struct mount *mp, struct thread *td) * talk to the server. */ error = socreate(nd->myif.ifra_addr.sa_family, &so, SOCK_DGRAM, 0, - td->td_proc->p_ucred, td); + td->td_ucred, td); if (error) panic("nfs_mountroot: socreate(%04x): %d", nd->myif.ifra_addr.sa_family, error); @@ -559,7 +559,7 @@ nfs_mountdiskless(char *path, char *which, int mountflag, mp->mnt_flag = mountflag; nam = dup_sockaddr((struct sockaddr *)sin, 1); if ((error = mountnfs(args, mp, nam, which, path, vpp, - td->td_proc->p_ucred)) != 0) { + td->td_ucred)) != 0) { printf("nfs_mountroot: mount %s on %s: %d", path, which, error); mp->mnt_vfc->vfc_refcount--; vfs_unbusy(mp, td); @@ -787,7 +787,7 @@ nfs_mount(struct mount *mp, char *path, caddr_t data, struct nameidata *ndp, if (error) return (error); args.fh = nfh; - error = mountnfs(&args, mp, nam, path, hst, &vp, td->td_proc->p_ucred); + error = mountnfs(&args, mp, nam, path, hst, &vp, td->td_ucred); return (error); } @@ -884,7 +884,7 @@ mountnfs(struct nfs_args *argp, struct mount *mp, struct sockaddr *nam, * Get file attributes for the mountpoint. This has the side * effect of filling in (*vpp)->v_type with the correct value. */ - VOP_GETATTR(*vpp, &attrs, curthread->td_proc->p_ucred, curthread); + VOP_GETATTR(*vpp, &attrs, curthread->td_ucred, curthread); /* * Lose the lock but keep the ref. |