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

Function lomac_system_check_swapoff

freebsd/security/mac_lomac/mac_lomac.c:2161–2176  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2159}
2160
2161static int
2162lomac_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
2178static int
2179lomac_system_check_swapon(struct ucred *cred, struct vnode *vp,

Callers

nothing calls this directly

Calls 1

lomac_subject_privilegedFunction · 0.85

Tested by

no test coverage detected