From owner-cvs-all@FreeBSD.ORG Tue Feb 6 14:19:25 2007 Return-Path: X-Original-To: cvs-all@FreeBSD.org Delivered-To: cvs-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 7B2BA16A406; Tue, 6 Feb 2007 14:19:25 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [69.147.83.41]) by mx1.freebsd.org (Postfix) with ESMTP id 6973B13C4A8; Tue, 6 Feb 2007 14:19:25 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id l16EJPWS074887; Tue, 6 Feb 2007 14:19:25 GMT (envelope-from rwatson@repoman.freebsd.org) Received: (from rwatson@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id l16EJP6r074886; Tue, 6 Feb 2007 14:19:25 GMT (envelope-from rwatson) Message-Id: <200702061419.l16EJP6r074886@repoman.freebsd.org> From: Robert Watson Date: Tue, 6 Feb 2007 14:19:25 +0000 (UTC) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Cc: Subject: cvs commit: src/sys/sys _label.h src/sys/security/mac mac_framework.h mac_internal.h mac_label.c mac_policy.h src/sys/security/mac_biba mac_biba.c src/sys/security/mac_lomac mac_lomac.c src/sys/security/mac_mls mac_mls.c ... X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Feb 2007 14:19:25 -0000 rwatson 2007-02-06 14:19:25 UTC FreeBSD src repository Modified files: sys/security/mac mac_framework.h mac_internal.h mac_label.c mac_policy.h sys/security/mac_biba mac_biba.c sys/security/mac_lomac mac_lomac.c sys/security/mac_mls mac_mls.c sys/security/mac_partition mac_partition.c sys/security/mac_test mac_test.c Removed files: sys/sys _label.h Log: Introduce accessor functions mac_label_get() and mac_label_set() to replace LABEL_TO_SLOT() macro used by policy modules to query and set label data in struct label. Instead of using a union, store an intptr_t, simplifying the API. Update policies: in most cases this required only small tweaks to current wrapper macros. In two cases, a single wrapper macros had to be split into separate get and set macros. Move struct label definition from _label.h to mac_internal.h and remove _label.h. With this change, policies may now treat struct label * as opaque, allowing us to change the layout of struct label without breaking the policy module ABI. For example, we could make the maximum number of policies with labels modifiable at boot-time rather than just at compile-time. Obtained from: TrustedBSD Project Revision Changes Path 1.78 +1 -2 src/sys/security/mac/mac_framework.h 1.121 +18 -1 src/sys/security/mac/mac_internal.h 1.8 +24 -0 src/sys/security/mac/mac_label.c 1.86 +3 -7 src/sys/security/mac/mac_policy.h 1.99 +3 -3 src/sys/security/mac_biba/mac_biba.c 1.45 +4 -4 src/sys/security/mac_lomac/mac_lomac.c 1.82 +2 -2 src/sys/security/mac_mls/mac_mls.c 1.15 +11 -10 src/sys/security/mac_partition/mac_partition.c 1.67 +41 -40 src/sys/security/mac_test/mac_test.c 1.8 +0 -65 src/sys/sys/_label.h (dead)