| 2331 | } |
| 2332 | |
| 2333 | static int |
| 2334 | lomac_vnode_check_create(struct ucred *cred, struct vnode *dvp, |
| 2335 | struct label *dvplabel, struct componentname *cnp, struct vattr *vap) |
| 2336 | { |
| 2337 | struct mac_lomac *subj, *obj; |
| 2338 | |
| 2339 | if (!lomac_enabled) |
| 2340 | return (0); |
| 2341 | |
| 2342 | subj = SLOT(cred->cr_label); |
| 2343 | obj = SLOT(dvplabel); |
| 2344 | |
| 2345 | if (!lomac_subject_dominate(subj, obj)) |
| 2346 | return (EACCES); |
| 2347 | if (obj->ml_flags & MAC_LOMAC_FLAG_AUX && |
| 2348 | !lomac_dominate_element(&subj->ml_single, &obj->ml_auxsingle)) |
| 2349 | return (EACCES); |
| 2350 | |
| 2351 | return (0); |
| 2352 | } |
| 2353 | |
| 2354 | static int |
| 2355 | lomac_vnode_check_deleteacl(struct ucred *cred, struct vnode *vp, |
nothing calls this directly
no test coverage detected