summaryrefslogtreecommitdiffstats
path: root/sys/posix4
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2002-05-19 00:14:50 +0000
committerjhb <jhb@FreeBSD.org>2002-05-19 00:14:50 +0000
commitb6d6774e76bd44035dc47ff6e7c3fdb44961a142 (patch)
tree0642e3c6447c397fe8442630e46788930550bb42 /sys/posix4
parent930f7599edae9acfd7bada4b5e71817067c0ec88 (diff)
downloadFreeBSD-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/posix4')
-rw-r--r--sys/posix4/p1003_1b.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/sys/posix4/p1003_1b.c b/sys/posix4/p1003_1b.c
index e6bad42..9e6fdca 100644
--- a/sys/posix4/p1003_1b.c
+++ b/sys/posix4/p1003_1b.c
@@ -131,7 +131,7 @@ int sched_setparam(struct thread *td,
targettd = FIRST_THREAD_IN_PROC(targetp); /* XXXKSE */
}
- e = p_cansched(td->td_proc, targetp);
+ e = p_cansched(td, targetp);
PROC_UNLOCK(targetp);
if (e == 0) {
e = ksched_setparam(&td->td_retval[0], ksched, targettd,
@@ -167,7 +167,7 @@ int sched_getparam(struct thread *td,
targettd = FIRST_THREAD_IN_PROC(targetp); /* XXXKSE */
}
- e = p_cansee(td->td_proc, targetp);
+ e = p_cansee(td, targetp);
PROC_UNLOCK(targetp);
if (e)
goto done2;
@@ -209,7 +209,7 @@ int sched_setscheduler(struct thread *td,
targettd = FIRST_THREAD_IN_PROC(targetp); /* XXXKSE */
}
- e = p_cansched(td->td_proc, targetp);
+ e = p_cansched(td, targetp);
PROC_UNLOCK(targetp);
if (e == 0) {
e = ksched_setscheduler(&td->td_retval[0], ksched, targettd,
@@ -244,7 +244,7 @@ int sched_getscheduler(struct thread *td,
targettd = FIRST_THREAD_IN_PROC(targetp); /* XXXKSE */
}
- e = p_cansee(td->td_proc, targetp);
+ e = p_cansee(td, targetp);
PROC_UNLOCK(targetp);
if (e == 0)
e = ksched_getscheduler(&td->td_retval[0], ksched, targettd);
@@ -320,7 +320,7 @@ int sched_rr_get_interval(struct thread *td,
targettd = FIRST_THREAD_IN_PROC(targetp); /* XXXKSE */
}
- e = p_cansee(td->td_proc, targetp);
+ e = p_cansee(td, targetp);
PROC_UNLOCK(targetp);
if (e == 0) {
e = ksched_rr_get_interval(&td->td_retval[0], ksched, targettd,
OpenPOWER on IntegriCloud