Deleted Added
full compact
34c34
< * $FreeBSD: head/sys/security/mac_biba/mac_biba.c 106416 2002-11-04 17:36:47Z rwatson $
---
> * $FreeBSD: head/sys/security/mac_biba/mac_biba.c 106418 2002-11-04 17:50:52Z rwatson $
1869a1870,1913
> mac_biba_check_system_acct(struct ucred *cred, struct vnode *vp,
> struct label *label)
> {
> struct mac_biba *subj, *obj;
> int error;
>
> if (!mac_biba_enabled)
> return (0);
>
> subj = SLOT(&cred->cr_label);
>
> error = mac_biba_subject_privileged(subj);
> if (error)
> return (error);
>
> if (label == NULL)
> return (0);
>
> obj = SLOT(label);
> if (!mac_biba_high_single(obj))
> return (EACCES);
>
> return (0);
> }
>
> static int
> mac_biba_check_system_settime(struct ucred *cred)
> {
> struct mac_biba *subj;
> int error;
>
> if (!mac_biba_enabled)
> return (0);
>
> subj = SLOT(&cred->cr_label);
>
> error = mac_biba_subject_privileged(subj);
> if (error)
> return (error);
>
> return (0);
> }
>
> static int
2608a2653,2654
> .mpo_check_system_acct = mac_biba_check_system_acct,
> .mpo_check_system_settime = mac_biba_check_system_settime,