MCPcopy Create free account
hub / github.com/F-Stack/f-stack / lomac_vnode_check_create

Function lomac_vnode_check_create

freebsd/security/mac_lomac/mac_lomac.c:2333–2352  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2331}
2332
2333static int
2334lomac_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
2354static int
2355lomac_vnode_check_deleteacl(struct ucred *cred, struct vnode *vp,

Callers

nothing calls this directly

Calls 2

lomac_subject_dominateFunction · 0.85
lomac_dominate_elementFunction · 0.85

Tested by

no test coverage detected