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

Function lomac_kld_check_load

freebsd/security/mac_lomac/mac_lomac.c:1414–1433  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1412}
1413
1414static int
1415lomac_kld_check_load(struct ucred *cred, struct vnode *vp,
1416 struct label *vplabel)
1417{
1418 struct mac_lomac *subj, *obj;
1419
1420 if (!lomac_enabled)
1421 return (0);
1422
1423 subj = SLOT(cred->cr_label);
1424 obj = SLOT(vplabel);
1425
1426 if (lomac_subject_privileged(subj))
1427 return (EPERM);
1428
1429 if (!lomac_high_single(obj))
1430 return (EACCES);
1431
1432 return (0);
1433}
1434
1435static void
1436lomac_mount_create(struct ucred *cred, struct mount *mp,

Callers

nothing calls this directly

Calls 2

lomac_subject_privilegedFunction · 0.85
lomac_high_singleFunction · 0.85

Tested by

no test coverage detected