| 1412 | } |
| 1413 | |
| 1414 | static int |
| 1415 | lomac_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 | |
| 1435 | static void |
| 1436 | lomac_mount_create(struct ucred *cred, struct mount *mp, |
nothing calls this directly
no test coverage detected