PERFORCE change 41400 for review

Robert Watson rwatson at FreeBSD.org
Tue Nov 4 17:02:27 PST 2003


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

Change 41400 by rwatson at rwatson_paprika on 2003/11/04 17:02:13

	Slide trustedbsd_sebsd to the head of trustedbsd_mac:
	
	Add mac_support.4.
	Clean up unnecessary error-checking of malloc return values in
	    uipc_sem.c.
	Sync mac_internal.h to version in main FreeBSD tree.

Affected files ...

.. //depot/projects/trustedbsd/sebsd/share/man/man4/Makefile#6 integrate
.. //depot/projects/trustedbsd/sebsd/share/man/man4/mac.4#3 integrate
.. //depot/projects/trustedbsd/sebsd/share/man/man4/mac_support.4#1 branch
.. //depot/projects/trustedbsd/sebsd/sys/kern/uipc_sem.c#7 integrate
.. //depot/projects/trustedbsd/sebsd/sys/security/mac/mac_internal.h#5 integrate

Differences ...

==== //depot/projects/trustedbsd/sebsd/share/man/man4/Makefile#6 (text+ko) ====

@@ -128,6 +128,7 @@
 	mac_partition.4 \
 	mac_portacl.4 \
 	mac_seeotheruids.4 \
+	mac_support.4 \
 	mac_stub.4 \
 	mac_test.4 \
 	mouse.4 \

==== //depot/projects/trustedbsd/sebsd/share/man/man4/mac.4#3 (text+ko) ====

@@ -48,6 +48,9 @@
 they cannot override traditional
 .Ux
 security provisions such as file permissions and superuser checks.
+Support (and non-support) for a variety of kernel features is documented
+in
+.Xr mac_support 4 .
 .Pp
 Currently, the following MAC policy modules are shipped with
 .Fx :
@@ -247,6 +250,7 @@
 .Xr mac_partition 4 ,
 .Xr mac_portacl 4 ,
 .Xr mac_seeotheruids 4 ,
+.Xr max_support 4 ,
 .Xr mac_test 4 ,
 .Xr login.conf 5 ,
 .Xr maclabel 7 ,

==== //depot/projects/trustedbsd/sebsd/sys/kern/uipc_sem.c#7 (text+ko) ====

@@ -1,6 +1,6 @@
 /*
  * Copyright (c) 2002 Alfred Perlstein <alfred at FreeBSD.org>
- * Copyright (c) 2001, 2002, 2003 Networks Associates Technology, Inc.
+ * Copyright (c) 2003 Networks Associates Technology, Inc.
  * All rights reserved.
  *
  * This software was developed for the FreeBSD Project in part by Network
@@ -227,8 +227,7 @@
 	/* XXX Use p31b_getcfg(CTL_P1003_1B_SEM_VALUE_MAX) instead? */
 	if (value > SEM_VALUE_MAX)
 		return (EINVAL);
-	if( (ret = malloc(sizeof(*ret), M_SEM, M_WAITOK | M_ZERO)) == NULL)
-		return (ENOMEM);
+	ret = malloc(sizeof(*ret), M_SEM, M_WAITOK | M_ZERO);
 	if (name != NULL) {
 		len = strlen(name);
 		if (len > SEM_MAX_NAMELEN) {
@@ -240,10 +239,7 @@
 			free(ret, M_SEM);
 			return (EINVAL);
 		}
-		if( (ret->ks_name = malloc(len + 1, M_SEM, M_WAITOK)) == NULL){
-			free(ret, M_SEM);
-			return (ENOMEM);
-		}
+		ret->ks_name = malloc(len + 1, M_SEM, M_WAITOK);
 		strcpy(ret->ks_name, name);
 	} else {
 		ret->ks_name = NULL;
@@ -598,8 +594,7 @@
 
 	mtx_assert(&sem_lock, MA_NOTOWNED);
 	mtx_assert(&ks->ks_mtx, MA_NOTOWNED);
-	if( (ku = malloc(sizeof(*ku), M_SEM, M_WAITOK | M_ZERO)) == NULL)
-		return;
+	ku = malloc(sizeof(*ku), M_SEM, M_WAITOK | M_ZERO);
 	ku->ku_pid = p->p_pid;
 	mtx_lock(&sem_lock);
 	k = sem_getuser(p, ks);

==== //depot/projects/trustedbsd/sebsd/sys/security/mac/mac_internal.h#5 (text+ko) ====

@@ -32,6 +32,8 @@
  * 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: src/sys/security/mac/mac_internal.h,v 1.103 2003/10/25 15:28:20 rwatson Exp $
  */
 
 /*
@@ -48,6 +50,7 @@
  * MAC Framework global types and typedefs.
  */
 LIST_HEAD(mac_policy_list_head, mac_policy_conf);
+MALLOC_DECLARE(M_MACTEMP);
 
 /*
  * MAC Framework global variables.
@@ -63,11 +66,6 @@
 #endif
 
 /*
- * MAC Framework global types and constants.
- */
-MALLOC_DECLARE(M_MACTEMP);
-
-/*
  * MAC Framework object/access counter primitives, conditionally
  * compiled.
  */


More information about the p4-projects mailing list