| 1855 | } |
| 1856 | |
| 1857 | static int |
| 1858 | lomac_proc_check_sched(struct ucred *cred, struct proc *p) |
| 1859 | { |
| 1860 | struct mac_lomac *subj, *obj; |
| 1861 | |
| 1862 | if (!lomac_enabled) |
| 1863 | return (0); |
| 1864 | |
| 1865 | subj = SLOT(cred->cr_label); |
| 1866 | obj = SLOT(p->p_ucred->cr_label); |
| 1867 | |
| 1868 | /* XXX: range checks */ |
| 1869 | if (!lomac_dominate_single(obj, subj)) |
| 1870 | return (ESRCH); |
| 1871 | if (!lomac_subject_dominate(subj, obj)) |
| 1872 | return (EACCES); |
| 1873 | |
| 1874 | return (0); |
| 1875 | } |
| 1876 | |
| 1877 | static int |
| 1878 | lomac_proc_check_signal(struct ucred *cred, struct proc *p, int signum) |
nothing calls this directly
no test coverage detected