summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_linker.c
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2002-02-27 18:32:23 +0000
committerjhb <jhb@FreeBSD.org>2002-02-27 18:32:23 +0000
commit3706cd350927f08fa8742cce9448c9ba8e4d6b2c (patch)
treede74317436bc6bf8211535e1dbda3f6762d05582 /sys/kern/kern_linker.c
parentec01b5bdbc40025303ba133be03a747c8dc62a2c (diff)
downloadFreeBSD-src-3706cd350927f08fa8742cce9448c9ba8e4d6b2c.zip
FreeBSD-src-3706cd350927f08fa8742cce9448c9ba8e4d6b2c.tar.gz
Simple p_ucred -> td_ucred changes to start using the per-thread ucred
reference.
Diffstat (limited to 'sys/kern/kern_linker.c')
-rw-r--r--sys/kern/kern_linker.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/sys/kern/kern_linker.c b/sys/kern/kern_linker.c
index 5baccd6..338c3f3 100644
--- a/sys/kern/kern_linker.c
+++ b/sys/kern/kern_linker.c
@@ -708,7 +708,7 @@ kldload(struct thread *td, struct kldload_args *uap)
mtx_lock(&Giant);
- if ((error = suser_xxx(td->td_proc->p_ucred, NULL, 0)) != 0)
+ if ((error = suser_xxx(td->td_ucred, NULL, 0)) != 0)
goto out;
pathname = malloc(MAXPATHLEN, M_TEMP, M_WAITOK);
@@ -755,7 +755,7 @@ kldunload(struct thread *td, struct kldunload_args *uap)
mtx_lock(&Giant);
- if ((error = suser_xxx(td->td_proc->p_ucred, NULL, 0)) != 0)
+ if ((error = suser_xxx(td->td_ucred, NULL, 0)) != 0)
goto out;
lf = linker_find_file_by_id(SCARG(uap, fileid));
@@ -1371,10 +1371,9 @@ linker_lookup_file(const char *path, int pathlen, const char *name,
NDFREE(&nd, NDF_ONLY_PNBUF);
type = nd.ni_vp->v_type;
if (vap)
- VOP_GETATTR(nd.ni_vp, vap,
- td->td_proc->p_ucred, td);
+ VOP_GETATTR(nd.ni_vp, vap, td->td_ucred, td);
VOP_UNLOCK(nd.ni_vp, 0, td);
- vn_close(nd.ni_vp, FREAD, td->td_proc->p_ucred, td);
+ vn_close(nd.ni_vp, FREAD, td->td_ucred, td);
if (type == VREG)
return (result);
}
@@ -1399,7 +1398,7 @@ linker_hints_lookup(const char *path, int pathlen, const char *modname,
int modnamelen, struct mod_depend *verinfo)
{
struct thread *td = curthread; /* XXX */
- struct ucred *cred = td ? td->td_proc->p_ucred : NULL;
+ struct ucred *cred = td ? td->td_ucred : NULL;
struct nameidata nd;
struct vattr vattr, mattr;
u_char *hints = NULL;
OpenPOWER on IntegriCloud