- * Determine if u1 "can see" the subject specified by u2, according to the * 'see_other_uids' policy. * Returns: 0 for permitted, ESRCH otherwise * Locks: none * References: *u1 and *u2 must not change during the call * u1 may equal u2, in which case only one reference is required */
| 1346 | * u1 may equal u2, in which case only one reference is required |
| 1347 | */ |
| 1348 | int |
| 1349 | cr_canseeotheruids(struct ucred *u1, struct ucred *u2) |
| 1350 | { |
| 1351 | |
| 1352 | if (!see_other_uids && u1->cr_ruid != u2->cr_ruid) { |
| 1353 | if (priv_check_cred(u1, PRIV_SEEOTHERUIDS) != 0) |
| 1354 | return (ESRCH); |
| 1355 | } |
| 1356 | return (0); |
| 1357 | } |
| 1358 | |
| 1359 | /* |
| 1360 | * 'see_other_gids' determines whether or not visibility of processes |
no test coverage detected