| 1835 | } |
| 1836 | |
| 1837 | static int |
| 1838 | lomac_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 | |
| 1857 | static int |
| 1858 | lomac_proc_check_sched(struct ucred *cred, struct proc *p) |
nothing calls this directly
no test coverage detected