PERFORCE change 104076 for review

Todd Miller millert at FreeBSD.org
Tue Aug 15 18:01:04 UTC 2006


http://perforce.freebsd.org/chv.cgi?CH=104076

Change 104076 by millert at millert_macbook on 2006/08/15 18:00:26

	Use BSD-stye bit types in sebsd headers.
	Add commented out fscreate and exec sids in task_security_struct
	for future use/reference.

Affected files ...

.. //depot/projects/trustedbsd/sedarwin8/policies/sedarwin/sedarwin/sebsd_labels.h#2 edit
.. //depot/projects/trustedbsd/sedarwin8/policies/sedarwin/sedarwin/sebsd_syscalls.h#2 edit

Differences ...

==== //depot/projects/trustedbsd/sedarwin8/policies/sedarwin/sedarwin/sebsd_labels.h#2 (text+ko) ====

@@ -1,5 +1,6 @@
 /*-
  * Copyright (c) 2002 Networks Associates Technology, Inc.
+ * Copyright (c) 2005-2006 SPARTA, Inc.
  * All rights reserved.
  *
  * This software was developed for the FreeBSD Project by NAI Labs, the
@@ -7,6 +8,9 @@
  * DARPA/SPAWAR contract N66001-01-C-8035 ("CBOSS"), as part of the DARPA
  * CHATS research program.
  *
+ * This software was enhanced by SPARTA ISSO under SPAWAR contract
+ * N66001-04-C-6019 ("SEFOS").
+ *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
  * are met:
@@ -42,32 +46,36 @@
 #include <sedarwin/avc/avc.h>
 
 struct task_security_struct {
-	u32 osid;
-	u32 sid;
+	u_int32_t osid;
+	u_int32_t sid;
+#if 0
+	u_int32_t exec_sid;        /* exec SID */
+	u_int32_t create_sid;      /* fscreate SID */
+#endif
 };
 
 struct file_security_struct {
-	u32 sid;
+	u_int32_t sid;
 };
 
 struct vnode_security_struct {
-	u32 task_sid;
-	u32 sid;
-	u16 sclass;
+	u_int32_t task_sid;
+	u_int32_t sid;
+	u_int16_t sclass;
 };
 
 struct network_security_struct {
-	u32 sid;
-	u32 task_sid;
+	u_int32_t sid;
+	u_int32_t task_sid;
 };
 
 struct ipc_security_struct {
-	u32 sid;
-	u16 sclass;
+	u_int32_t sid;
+	u_int16_t sclass;
 };
 
 struct mount_security_struct {
-	u32 sid;              /* SID of file system */
+	u_int32_t sid;			/* SID of file system */
 #ifndef __FreeBSD__
 	struct psidtab *psidtab;        /* persistent SID mapping */
 #endif
@@ -82,6 +90,6 @@
 };
 
 struct mount_fs_security_struct {
-	u32 sid;              /* default object SID of file system */
+	u_int32_t sid;			/* default object SID of file system */
 };
 #endif /* _SYS_SECURITY_SEBSD_LABELS_H */

==== //depot/projects/trustedbsd/sedarwin8/policies/sedarwin/sedarwin/sebsd_syscalls.h#2 (text+ko) ====

@@ -1,3 +1,43 @@
+/*-
+ * Copyright (c) 2002 Networks Associates Technology, Inc.
+ * Copyright (c) 2005-2006 SPARTA, Inc.
+ * All rights reserved.
+ *
+ * This software was developed for the FreeBSD Project by NAI Labs, the
+ * Security Research Division of Network Associates, Inc. under
+ * DARPA/SPAWAR contract N66001-01-C-8035 ("CBOSS"), as part of the DARPA
+ * CHATS research program.
+ *
+ * This software was enhanced by SPARTA ISSO under SPAWAR contract
+ * N66001-04-C-6019 ("SEFOS").
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. The names of the authors may not be used to endorse or promote
+ *    products derived from this software without specific prior written
+ *    permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * $FreeBSD$
+ */
+
 #ifndef _SEBSD_SYSCALLS_H_
 #define	_SEBSD_SYSCALLS_H_
 
@@ -17,19 +57,19 @@
 
 /* Structure definitions for compute_av call. */
 struct security_query {
-	char	*scontext;
-	char	*tcontext;
-	u16	 tclass;
-	u32	 requested;
+	char		*scontext;
+	char		*tcontext;
+	u_int16_t	 tclass;
+	u_int32_t	 requested;
 };
 
 struct security_response {
-	u32	 allowed;
-	u32	 decided;
-	u32	 auditallow;
-	u32	 auditdeny;
-	u32	 notify;
-	u32	 seqno;
+	u_int32_t	 allowed;
+	u_int32_t	 decided;
+	u_int32_t	 auditallow;
+	u_int32_t	 auditdeny;
+	u_int32_t	 notify;
+	u_int32_t	 seqno;
 };
 
 struct sebsd_get_bools {


More information about the trustedbsd-cvs mailing list