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

Function lomac_vnode_check_read

freebsd/security/mac_lomac/mac_lomac.c:2465–2481  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2463}
2464
2465static int
2466lomac_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
2483static int
2484lomac_vnode_check_relabel(struct ucred *cred, struct vnode *vp,

Callers

nothing calls this directly

Calls 2

lomac_dominate_singleFunction · 0.85
maybe_demoteFunction · 0.85

Tested by

no test coverage detected