aboutsummaryrefslogtreecommitdiff
path: root/sys/miscfs/procfs/procfs_fpregs.c
diff options
context:
space:
mode:
authorRobert Watson <rwatson@FreeBSD.org>2000-08-30 04:49:09 +0000
committerRobert Watson <rwatson@FreeBSD.org>2000-08-30 04:49:09 +0000
commit387d2c036bf02cf3a23705cc496577acdb829517 (patch)
tree78428c175dc964a36c8008000a09c7a1e0cef19f /sys/miscfs/procfs/procfs_fpregs.c
parentc6fac29aff1f46a559899511e376d18b16f9c09d (diff)
downloadsrc-387d2c036bf02cf3a23705cc496577acdb829517.tar.gz
src-387d2c036bf02cf3a23705cc496577acdb829517.zip
o Centralize inter-process access control, introducing:
int p_can(p1, p2, operation, privused) which allows specification of subject process, object process, inter-process operation, and an optional call-by-reference privused flag, allowing the caller to determine if privilege was required for the call to succeed. This allows jail, kern.ps_showallprocs and regular credential-based interaction checks to occur in one block of code. Possible operations are P_CAN_SEE, P_CAN_SCHED, P_CAN_KILL, and P_CAN_DEBUG. p_can currently breaks out as a wrapper to a series of static function checks in kern_prot, which should not be invoked directly. o Commented out capabilities entries are included for some checks. o Update most inter-process authorization to make use of p_can() instead of manual checks, PRISON_CHECK(), P_TRESPASS(), and kern.ps_showallprocs. o Modify suser{,_xxx} to use const arguments, as it no longer modifies process flags due to the disabling of ASU. o Modify some checks/errors in procfs so that ENOENT is returned instead of ESRCH, further improving concealment of processes that should not be visible to other processes. Also introduce new access checks to improve hiding of processes for procfs_lookup(), procfs_getattr(), procfs_readdir(). Correct a bug reported by bp concerning not handling the CREATE case in procfs_lookup(). Remove volatile flag in procfs that caused apparently spurious qualifier warnigns (approved by bde). o Add comment noting that ktrace() has not been updated, as its access control checks are different from ptrace(), whereas they should probably be the same. Further discussion should happen on this topic. Reviewed by: bde, green, phk, freebsd-security, others Approved by: bde Obtained from: TrustedBSD Project
Notes
Notes: svn path=/head/; revision=65237
Diffstat (limited to 'sys/miscfs/procfs/procfs_fpregs.c')
-rw-r--r--sys/miscfs/procfs/procfs_fpregs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/miscfs/procfs/procfs_fpregs.c b/sys/miscfs/procfs/procfs_fpregs.c
index 353b52bcac82..69dd527f6e8f 100644
--- a/sys/miscfs/procfs/procfs_fpregs.c
+++ b/sys/miscfs/procfs/procfs_fpregs.c
@@ -59,7 +59,7 @@ procfs_dofpregs(curp, p, pfs, uio)
char *kv;
int kl;
- if (p_trespass(curp, p))
+ if (p_can(curp, p, P_CAN_DEBUG, NULL))
return EPERM;
kl = sizeof(r);
kv = (char *) &r;