diff options
author | jhb <jhb@FreeBSD.org> | 2002-05-19 00:14:50 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2002-05-19 00:14:50 +0000 |
commit | b6d6774e76bd44035dc47ff6e7c3fdb44961a142 (patch) | |
tree | 0642e3c6447c397fe8442630e46788930550bb42 /sys/security/lomac | |
parent | 930f7599edae9acfd7bada4b5e71817067c0ec88 (diff) | |
download | FreeBSD-src-b6d6774e76bd44035dc47ff6e7c3fdb44961a142.zip FreeBSD-src-b6d6774e76bd44035dc47ff6e7c3fdb44961a142.tar.gz |
Change p_can{debug,see,sched,signal}()'s first argument to be a thread
pointer instead of a proc pointer and require the process pointed to
by the second argument to be locked. We now use the thread ucred reference
for the credential checks in p_can*() as a result. p_canfoo() should now
no longer need Giant.
Diffstat (limited to 'sys/security/lomac')
-rw-r--r-- | sys/security/lomac/kernel_lkm.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/sys/security/lomac/kernel_lkm.c b/sys/security/lomac/kernel_lkm.c index 0455c9c..215c3d4 100644 --- a/sys/security/lomac/kernel_lkm.c +++ b/sys/security/lomac/kernel_lkm.c @@ -83,20 +83,18 @@ static dev_t lomac_dev = NULL; int lomac_ioctl(dev_t dev, u_long cmd, caddr_t data, int fflag, struct thread *td) { struct nameidata nd; - struct proc *p; struct proc *targp; struct lomac_fioctl *fio; lomac_object_t lobj; lattr_t lattr; int error; - p = td->td_proc; switch (cmd) { case LIOGETPLEVEL: targp = pfind(*(int *)data); if (targp == NULL) return (ESRCH); - if (p_cansee(p, targp) != 0) { + if (p_cansee(td, targp) != 0) { PROC_UNLOCK(targp); return (ESRCH); } @@ -138,7 +136,7 @@ lomac_ioctl(dev_t dev, u_long cmd, caddr_t data, int fflag, struct thread *td) { case LIOPMAKELOWLEVEL: lattr.level = LOMAC_LOWEST_LEVEL; lattr.flags = 0; - set_subject_lattr(p, lattr); + set_subject_lattr(td->td_proc, lattr); return (0); default: return (ENOTTY); |