aboutsummaryrefslogtreecommitdiff
path: root/sys/kern/p1003_1b.c
diff options
context:
space:
mode:
authorRobert Watson <rwatson@FreeBSD.org>2001-07-05 17:10:46 +0000
committerRobert Watson <rwatson@FreeBSD.org>2001-07-05 17:10:46 +0000
commita0f75161f939e6bc72757d6a0db657a7b245bbf2 (patch)
tree12e1eac2ac7b907cb9e647b6cd5c337073cd615c /sys/kern/p1003_1b.c
parent0b848380bb7ca163535c2003a15cc5b409bb248b (diff)
o Replace calls to p_can(..., P_CAN_xxx) with calls to p_canxxx().
The p_can(...) construct was a premature (and, it turns out, awkward) abstraction. The individual calls to p_canxxx() better reflect differences between the inter-process authorization checks, such as differing checks based on the type of signal. This has a side effect of improving code readability. o Replace direct credential authorization checks in ktrace() with invocation of p_candebug(), while maintaining the special case check of KTR_ROOT. This allows ktrace() to "play more nicely" with new mandatory access control schemes, as well as making its authorization checks consistent with other "debugging class" checks. o Eliminate "privused" construct for p_can*() calls which allowed the caller to determine if privilege was required for successful evaluation of the access control check. This primitive is currently unused, and as such, serves only to complicate the API. Approved by: ({procfs,linprocfs} changes) des Obtained from: TrustedBSD Project
Notes
Notes: svn path=/head/; revision=79335
Diffstat (limited to 'sys/kern/p1003_1b.c')
-rw-r--r--sys/kern/p1003_1b.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/sys/kern/p1003_1b.c b/sys/kern/p1003_1b.c
index 5b9bee025a1d..1c356e3b4531 100644
--- a/sys/kern/p1003_1b.c
+++ b/sys/kern/p1003_1b.c
@@ -122,7 +122,7 @@ int sched_setparam(struct proc *p,
return (ESRCH);
}
- e = p_can(p, targetp, P_CAN_SCHED, NULL);
+ e = p_cansched(p, targetp);
PROC_UNLOCK(targetp);
if (e)
return (e);
@@ -148,7 +148,7 @@ int sched_getparam(struct proc *p,
return (ESRCH);
}
- e = p_can(p, targetp, P_CAN_SEE, NULL);
+ e = p_cansee(p, targetp);
PROC_UNLOCK(targetp);
if (e)
return (e);
@@ -180,7 +180,7 @@ int sched_setscheduler(struct proc *p,
return (ESRCH);
}
- e = p_can(p, targetp, P_CAN_SCHED, NULL);
+ e = p_cansched(p, targetp);
PROC_UNLOCK(targetp);
if (e)
return (e);
@@ -205,7 +205,7 @@ int sched_getscheduler(struct proc *p,
return (ESRCH);
}
- e = p_can(p, targetp, P_CAN_SEE, NULL);
+ e = p_cansee(p, targetp);
PROC_UNLOCK(targetp);
if (e)
return (e);
@@ -246,7 +246,7 @@ int sched_rr_get_interval(struct proc *p,
return (ESRCH);
}
- e = p_can(p, targetp, P_CAN_SEE, NULL);
+ e = p_cansee(p, targetp);
PROC_UNLOCK(targetp);
if (e)
return (e);