| 1537 | } |
| 1538 | |
| 1539 | static int |
| 1540 | lomac_pipe_check_read(struct ucred *cred, struct pipepair *pp, |
| 1541 | struct label *pplabel) |
| 1542 | { |
| 1543 | struct mac_lomac *subj, *obj; |
| 1544 | |
| 1545 | if (!lomac_enabled) |
| 1546 | return (0); |
| 1547 | |
| 1548 | subj = SLOT(cred->cr_label); |
| 1549 | obj = SLOT(pplabel); |
| 1550 | |
| 1551 | if (!lomac_dominate_single(obj, subj)) |
| 1552 | return (maybe_demote(subj, obj, "reading", "pipe", NULL)); |
| 1553 | |
| 1554 | return (0); |
| 1555 | } |
| 1556 | |
| 1557 | static int |
| 1558 | lomac_pipe_check_relabel(struct ucred *cred, struct pipepair *pp, |
nothing calls this directly
no test coverage detected