From owner-p4-projects@FreeBSD.ORG Thu Jul 8 18:05:20 2004 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 6980E16A4CE; Thu, 8 Jul 2004 18:05:20 +0000 (GMT) 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 25A5516A4CF for ; Thu, 8 Jul 2004 18:05:20 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 58F6243D31 for ; Thu, 8 Jul 2004 18:05:17 +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.12.11/8.12.11) with ESMTP id i68I5H4V022405 for ; Thu, 8 Jul 2004 18:05:17 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.11/8.12.11/Submit) id i68I5GgS022402 for perforce@freebsd.org; Thu, 8 Jul 2004 18:05:16 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Date: Thu, 8 Jul 2004 18:05:16 GMT Message-Id: <200407081805.i68I5GgS022402@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 Subject: PERFORCE change 56789 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Jul 2004 18:05:21 -0000 http://perforce.freebsd.org/chv.cgi?CH=56789 Change 56789 by rwatson@rwatson_tislabs on 2004/07/08 18:04:24 Reduce differences to add System V IPC MAC labeling and access control against CVS: don't introduce msg_msg.h, instead place the global definition of 'struct msg' in '#ifdef _KERNEL' of msg.h. Still not ideal name space wise, but is likely sufficient. Affected files ... .. //depot/projects/trustedbsd/mac/sys/kern/sysv_msg.c#19 edit .. //depot/projects/trustedbsd/mac/sys/security/mac/mac_sysv_msg.c#6 edit .. //depot/projects/trustedbsd/mac/sys/security/mac_biba/mac_biba.c#243 edit .. //depot/projects/trustedbsd/mac/sys/security/mac_lomac/mac_lomac.c#85 edit .. //depot/projects/trustedbsd/mac/sys/security/mac_mls/mac_mls.c#197 edit .. //depot/projects/trustedbsd/mac/sys/security/mac_stub/mac_stub.c#21 edit .. //depot/projects/trustedbsd/mac/sys/security/mac_test/mac_test.c#133 edit .. //depot/projects/trustedbsd/mac/sys/sys/msg.h#8 edit .. //depot/projects/trustedbsd/mac/sys/sys/msg_msg.h#4 delete Differences ... ==== //depot/projects/trustedbsd/mac/sys/kern/sysv_msg.c#19 (text+ko) ==== @@ -29,6 +29,7 @@ #include #include #include +#include #include #include #include @@ -36,10 +37,6 @@ #include #include #include -#ifdef MAC -#include -#include -#endif static MALLOC_DEFINE(M_MSG, "msg", "SVID compatible message queues"); @@ -66,19 +63,6 @@ (sy_call_t *)msgsnd, (sy_call_t *)msgrcv }; -#ifndef MAC -/* For the MAC framework, struct moved to the header file sys/msg_msg.h */ -struct msg { - struct msg *msg_next; /* next msg in the chain */ - long msg_type; /* type of this message */ - /* >0 -> type of this message */ - /* 0 -> free header */ - u_short msg_ts; /* size of this message */ - short msg_spot; /* location of start of msg in buffer */ -}; -#endif - - #ifndef MSGSSZ #define MSGSSZ 8 /* Each segment must be 2^N long */ #endif ==== //depot/projects/trustedbsd/mac/sys/security/mac/mac_sysv_msg.c#6 (text+ko) ==== @@ -48,7 +48,6 @@ #include #include #include -#include #include ==== //depot/projects/trustedbsd/mac/sys/security/mac_biba/mac_biba.c#243 (text+ko) ==== @@ -61,7 +61,6 @@ #include #include #include -#include #include #include ==== //depot/projects/trustedbsd/mac/sys/security/mac_lomac/mac_lomac.c#85 (text+ko) ==== @@ -61,7 +61,6 @@ #include #include #include -#include #include #include ==== //depot/projects/trustedbsd/mac/sys/security/mac_mls/mac_mls.c#197 (text+ko) ==== @@ -61,7 +61,6 @@ #include #include #include -#include #include #include ==== //depot/projects/trustedbsd/mac/sys/security/mac_stub/mac_stub.c#21 (text+ko) ==== @@ -60,7 +60,6 @@ #include #include #include -#include #include #include ==== //depot/projects/trustedbsd/mac/sys/security/mac_test/mac_test.c#133 (text+ko) ==== @@ -58,7 +58,6 @@ #include #include #include -#include #include #include ==== //depot/projects/trustedbsd/mac/sys/sys/msg.h#8 (text+ko) ==== @@ -101,6 +101,20 @@ #ifdef _KERNEL /* + * Pull out the msg structure from kern/sysv_msg.c. This file is used + * throughout the MAC framework. + */ +struct msg { + struct msg *msg_next; /* next msg in the chain */ + long msg_type; /* type of this message */ + /* >0 -> type of this message */ + /* 0 -> free header */ + u_short msg_ts; /* size of this message */ + short msg_spot; /* location of start of msg in buffer */ + struct label *label; /* MAC Framework label */ +}; + +/* * Based on the configuration parameters described in an SVR2 (yes, two) * config(1m) man page. *