Deleted Added
full compact
mac_biba.c (160243) mac_biba.c (161026)
1/*-
2 * Copyright (c) 1999-2002 Robert N. M. Watson
3 * Copyright (c) 2001-2005 McAfee, Inc.
4 * All rights reserved.
5 *
6 * This software was developed by Robert Watson for the TrustedBSD Project.
7 *
8 * This software was developed for the FreeBSD Project in part by McAfee

--- 17 unchanged lines hidden (view full) ---

26 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
27 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
28 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
29 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
30 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
31 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
32 * SUCH DAMAGE.
33 *
1/*-
2 * Copyright (c) 1999-2002 Robert N. M. Watson
3 * Copyright (c) 2001-2005 McAfee, Inc.
4 * All rights reserved.
5 *
6 * This software was developed by Robert Watson for the TrustedBSD Project.
7 *
8 * This software was developed for the FreeBSD Project in part by McAfee

--- 17 unchanged lines hidden (view full) ---

26 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
27 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
28 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
29 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
30 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
31 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
32 * SUCH DAMAGE.
33 *
34 * $FreeBSD: head/sys/security/mac_biba/mac_biba.c 160243 2006-07-10 19:13:32Z csjp $
34 * $FreeBSD: head/sys/security/mac_biba/mac_biba.c 161026 2006-08-06 16:56:15Z rwatson $
35 */
36
37/*
38 * Developed by the TrustedBSD Project.
39 * Biba fixed label mandatory integrity policy.
40 */
41
42#include <sys/types.h>

--- 2971 unchanged lines hidden (view full) ---

3014 obj = SLOT(label);
3015
3016 if (!mac_biba_dominate_effective(subj, obj))
3017 return (EACCES);
3018
3019 return (0);
3020}
3021
35 */
36
37/*
38 * Developed by the TrustedBSD Project.
39 * Biba fixed label mandatory integrity policy.
40 */
41
42#include <sys/types.h>

--- 2971 unchanged lines hidden (view full) ---

3014 obj = SLOT(label);
3015
3016 if (!mac_biba_dominate_effective(subj, obj))
3017 return (EACCES);
3018
3019 return (0);
3020}
3021
3022static int
3022static void
3023mac_biba_associate_nfsd_label(struct ucred *cred)
3024{
3025 struct mac_biba *label;
3026
3027 label = SLOT(cred->cr_label);
3028 mac_biba_set_effective(label, MAC_BIBA_TYPE_LOW, 0, NULL);
3029 mac_biba_set_range(label, MAC_BIBA_TYPE_LOW, 0, NULL,
3030 MAC_BIBA_TYPE_HIGH, 0, NULL);
3023mac_biba_associate_nfsd_label(struct ucred *cred)
3024{
3025 struct mac_biba *label;
3026
3027 label = SLOT(cred->cr_label);
3028 mac_biba_set_effective(label, MAC_BIBA_TYPE_LOW, 0, NULL);
3029 mac_biba_set_range(label, MAC_BIBA_TYPE_LOW, 0, NULL,
3030 MAC_BIBA_TYPE_HIGH, 0, NULL);
3031 return (0);
3032}
3033
3034static struct mac_policy_ops mac_biba_ops =
3035{
3036 .mpo_init = mac_biba_init,
3037 .mpo_init_bpfdesc_label = mac_biba_init_label,
3038 .mpo_init_cred_label = mac_biba_init_label,
3039 .mpo_init_devfsdirent_label = mac_biba_init_label,

--- 178 unchanged lines hidden ---
3031}
3032
3033static struct mac_policy_ops mac_biba_ops =
3034{
3035 .mpo_init = mac_biba_init,
3036 .mpo_init_bpfdesc_label = mac_biba_init_label,
3037 .mpo_init_cred_label = mac_biba_init_label,
3038 .mpo_init_devfsdirent_label = mac_biba_init_label,

--- 178 unchanged lines hidden ---