summaryrefslogtreecommitdiffstats
path: root/sys/posix4
diff options
context:
space:
mode:
authorrwatson <rwatson@FreeBSD.org>2001-07-05 17:10:46 +0000
committerrwatson <rwatson@FreeBSD.org>2001-07-05 17:10:46 +0000
commitda1a848c61b09f2607111b298ac57fe2dcb183da (patch)
tree12e1eac2ac7b907cb9e647b6cd5c337073cd615c /sys/posix4
parentfcb893ccd5ba7f15c5e4198222a83cecc659c067 (diff)
downloadFreeBSD-src-da1a848c61b09f2607111b298ac57fe2dcb183da.zip
FreeBSD-src-da1a848c61b09f2607111b298ac57fe2dcb183da.tar.gz
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
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 5b9bee0..1c356e3 100644
--- a/sys/posix4/p1003_1b.c
+++ b/sys/posix4/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);
OpenPOWER on IntegriCloud