| 2159 | } |
| 2160 | |
| 2161 | static int |
| 2162 | lomac_system_check_swapoff(struct ucred *cred, struct vnode *vp, |
| 2163 | struct label *vplabel) |
| 2164 | { |
| 2165 | struct mac_lomac *subj; |
| 2166 | |
| 2167 | if (!lomac_enabled) |
| 2168 | return (0); |
| 2169 | |
| 2170 | subj = SLOT(cred->cr_label); |
| 2171 | |
| 2172 | if (lomac_subject_privileged(subj)) |
| 2173 | return (EPERM); |
| 2174 | |
| 2175 | return (0); |
| 2176 | } |
| 2177 | |
| 2178 | static int |
| 2179 | lomac_system_check_swapon(struct ucred *cred, struct vnode *vp, |
nothing calls this directly
no test coverage detected