| 2463 | } |
| 2464 | |
| 2465 | static int |
| 2466 | lomac_vnode_check_read(struct ucred *active_cred, struct ucred *file_cred, |
| 2467 | struct vnode *vp, struct label *vplabel) |
| 2468 | { |
| 2469 | struct mac_lomac *subj, *obj; |
| 2470 | |
| 2471 | if (!lomac_enabled || !revocation_enabled) |
| 2472 | return (0); |
| 2473 | |
| 2474 | subj = SLOT(active_cred->cr_label); |
| 2475 | obj = SLOT(vplabel); |
| 2476 | |
| 2477 | if (!lomac_dominate_single(obj, subj)) |
| 2478 | return (maybe_demote(subj, obj, "reading", "file", vp)); |
| 2479 | |
| 2480 | return (0); |
| 2481 | } |
| 2482 | |
| 2483 | static int |
| 2484 | lomac_vnode_check_relabel(struct ucred *cred, struct vnode *vp, |
nothing calls this directly
no test coverage detected