From owner-p4-projects@FreeBSD.ORG Fri Aug 4 18:01:00 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 13DAE16A4FC; Fri, 4 Aug 2006 18:01:00 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C88FC16A4F8 for ; Fri, 4 Aug 2006 18:00:59 +0000 (UTC) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id E70B643D6A for ; Fri, 4 Aug 2006 18:00:57 +0000 (GMT) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id k74I0vYH020152 for ; Fri, 4 Aug 2006 18:00:57 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k74I0vwM020149 for perforce@freebsd.org; Fri, 4 Aug 2006 18:00:57 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Date: Fri, 4 Aug 2006 18:00:57 GMT Message-Id: <200608041800.k74I0vwM020149@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to bb+lists.freebsd.perforce@cyrus.watson.org using -f From: Robert Watson To: Perforce Change Reviews Cc: Subject: PERFORCE change 103183 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Aug 2006 18:01:00 -0000 http://perforce.freebsd.org/chv.cgi?CH=103183 Change 103183 by rwatson@rwatson_zoo on 2006/08/04 18:00:28 Remove HEADER_VERSION, which is a poorly named define for a public header file. Add new version constants, and allocate a specific constant for OpenBSM, as well as list some constants used by other implementations. Affected files ... .. //depot/projects/trustedbsd/openbsm/bsm/audit_record.h#22 edit .. //depot/projects/trustedbsd/openbsm/libbsm/bsm_token.c#50 edit Differences ... ==== //depot/projects/trustedbsd/openbsm/bsm/audit_record.h#22 (text+ko) ==== @@ -30,7 +30,7 @@ * * @APPLE_BSD_LICENSE_HEADER_END@ * - * $P4: //depot/projects/trustedbsd/openbsm/bsm/audit_record.h#21 $ + * $P4: //depot/projects/trustedbsd/openbsm/bsm/audit_record.h#22 $ */ #ifndef _BSM_AUDIT_RECORD_H_ @@ -199,9 +199,19 @@ #define PAD_NOTATTR 0x4000 /* nonattributable event */ #define PAD_FAILURE 0x8000 /* fail audit event */ +#define BSM_MAX_GROUPS 16 -#define BSM_MAX_GROUPS 16 -#define HEADER_VERSION 1 +/* + * A number of BSM versions are floating around and defined. Here are + * constants for them. OpenBSM uses the same token types, etc, used in the + * Solaris BSM version, but has a separate version number in order to + * identify a potentially different event identifier name space. + */ +#define BSM_HEADER_VERSION_OLDDARWIN 1 /* In retrospect, a mistake. */ +#define BSM_HEADER_VERSION_SOLARIS 2 +#define BSM_HEADER_VERSION_TSOL25 3 +#define BSM_HEADER_VERSION_TSOL 4 +#define BSM_HEADER_VERSION_OPENBSM 10 /* * BSM define is AUT_TRAILER_MAGIC; Apple BSM define is TRAILER_PAD_MAGIC; we ==== //depot/projects/trustedbsd/openbsm/libbsm/bsm_token.c#50 (text+ko) ==== @@ -30,7 +30,7 @@ * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - * $P4: //depot/projects/trustedbsd/openbsm/libbsm/bsm_token.c#49 $ + * $P4: //depot/projects/trustedbsd/openbsm/libbsm/bsm_token.c#50 $ */ #include @@ -1155,7 +1155,7 @@ ADD_U_CHAR(dptr, AUT_HEADER32); ADD_U_INT32(dptr, rec_size); - ADD_U_CHAR(dptr, HEADER_VERSION); + ADD_U_CHAR(dptr, BSM_HEADER_VERSION_OPENBSM); ADD_U_INT16(dptr, e_type); ADD_U_INT16(dptr, e_mod);