summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_linker.c
diff options
context:
space:
mode:
authorrwatson <rwatson@FreeBSD.org>2001-11-01 20:56:57 +0000
committerrwatson <rwatson@FreeBSD.org>2001-11-01 20:56:57 +0000
commitc532c3bf88b0296935bf9293accb407de43e240c (patch)
treed29ed0901454dffcc55e4c0606aef0cd915d84eb /sys/kern/kern_linker.c
parent49a98043879675541ed4fda938748b3b157c8479 (diff)
downloadFreeBSD-src-c532c3bf88b0296935bf9293accb407de43e240c.zip
FreeBSD-src-c532c3bf88b0296935bf9293accb407de43e240c.tar.gz
o Move suser() calls in kern/ to using suser_xxx() with an explicit
credential selection, rather than reference via a thread or process pointer. This is part of a gradual migration to suser() accepting a struct ucred instead of a struct proc, simplifying the reference and locking semantics of suser(). Obtained from: TrustedBSD Project
Diffstat (limited to 'sys/kern/kern_linker.c')
-rw-r--r--sys/kern/kern_linker.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/kern/kern_linker.c b/sys/kern/kern_linker.c
index 7c2b59d..fd12eaa 100644
--- a/sys/kern/kern_linker.c
+++ b/sys/kern/kern_linker.c
@@ -697,7 +697,7 @@ kldload(struct thread* td, struct kldload_args* uap)
mtx_lock(&Giant);
- if ((error = suser_td(td)) != 0)
+ if ((error = suser_xxx(td->td_proc->p_ucred, NULL, 0)) != 0)
goto out;
pathname = malloc(MAXPATHLEN, M_TEMP, M_WAITOK);
@@ -743,7 +743,7 @@ kldunload(struct thread* td, struct kldunload_args* uap)
mtx_lock(&Giant);
- if ((error = suser_td(td)) != 0)
+ if ((error = suser_xxx(td->td_proc->p_ucred, NULL, 0)) != 0)
goto out;
lf = linker_find_file_by_id(SCARG(uap, fileid));
OpenPOWER on IntegriCloud