| 3539 | } |
| 3540 | |
| 3541 | static int |
| 3542 | biba_vnode_setlabel_extattr(struct ucred *cred, struct vnode *vp, |
| 3543 | struct label *vplabel, struct label *intlabel) |
| 3544 | { |
| 3545 | struct mac_biba *source, mb_temp; |
| 3546 | size_t buflen; |
| 3547 | int error; |
| 3548 | |
| 3549 | buflen = sizeof(mb_temp); |
| 3550 | bzero(&mb_temp, buflen); |
| 3551 | |
| 3552 | source = SLOT(intlabel); |
| 3553 | if ((source->mb_flags & MAC_BIBA_FLAG_EFFECTIVE) == 0) |
| 3554 | return (0); |
| 3555 | |
| 3556 | biba_copy_effective(source, &mb_temp); |
| 3557 | |
| 3558 | error = vn_extattr_set(vp, IO_NODELOCKED, MAC_BIBA_EXTATTR_NAMESPACE, |
| 3559 | MAC_BIBA_EXTATTR_NAME, buflen, (char *) &mb_temp, curthread); |
| 3560 | return (error); |
| 3561 | } |
| 3562 | |
| 3563 | static struct mac_policy_ops mac_biba_ops = |
| 3564 | { |
nothing calls this directly
no test coverage detected