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

Function lomac_proc_check_debug

freebsd/security/mac_lomac/mac_lomac.c:1837–1855  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1835}
1836
1837static int
1838lomac_proc_check_debug(struct ucred *cred, struct proc *p)
1839{
1840 struct mac_lomac *subj, *obj;
1841
1842 if (!lomac_enabled)
1843 return (0);
1844
1845 subj = SLOT(cred->cr_label);
1846 obj = SLOT(p->p_ucred->cr_label);
1847
1848 /* XXX: range checks */
1849 if (!lomac_dominate_single(obj, subj))
1850 return (ESRCH);
1851 if (!lomac_subject_dominate(subj, obj))
1852 return (EACCES);
1853
1854 return (0);
1855}
1856
1857static int
1858lomac_proc_check_sched(struct ucred *cred, struct proc *p)

Callers

nothing calls this directly

Calls 2

lomac_dominate_singleFunction · 0.85
lomac_subject_dominateFunction · 0.85

Tested by

no test coverage detected