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

Function lomac_pipe_check_read

freebsd/security/mac_lomac/mac_lomac.c:1539–1555  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1537}
1538
1539static int
1540lomac_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
1557static int
1558lomac_pipe_check_relabel(struct ucred *cred, struct pipepair *pp,

Callers

nothing calls this directly

Calls 2

lomac_dominate_singleFunction · 0.85
maybe_demoteFunction · 0.85

Tested by

no test coverage detected