- * Determine if td "can see" the subject specified by p. * Returns: 0 for permitted, an errno value otherwise * Locks: Sufficient locks to protect p->p_ucred must be held. td really * should be curthread. * References: td and p must be valid for the lifetime of the call */
| 1460 | * References: td and p must be valid for the lifetime of the call |
| 1461 | */ |
| 1462 | int |
| 1463 | p_cansee(struct thread *td, struct proc *p) |
| 1464 | { |
| 1465 | |
| 1466 | /* Wrap cr_cansee() for all functionality. */ |
| 1467 | KASSERT(td == curthread, ("%s: td not curthread", __func__)); |
| 1468 | PROC_LOCK_ASSERT(p, MA_OWNED); |
| 1469 | return (cr_cansee(td->td_ucred, p->p_ucred)); |
| 1470 | } |
| 1471 | |
| 1472 | /* |
| 1473 | * 'conservative_signals' prevents the delivery of a broad class of |
no test coverage detected