PERFORCE change 32235 for review

Robert Watson rwatson at FreeBSD.org
Sat May 31 22:27:36 GMT 2003


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

Change 32235 by rwatson at rwatson_tislabs on 2003/05/31 15:27:22

	Interpreter label may be null for exec.
	file_cred may be null for read, stat under various
	circumstances (linker loads, lstat, etc).  write may
	also be in this category for core dumps.

Affected files ...

.. //depot/projects/trustedbsd/mac/sys/security/mac_test/mac_test.c#104 edit

Differences ...

==== //depot/projects/trustedbsd/mac/sys/security/mac_test/mac_test.c#104 (text+ko) ====

@@ -967,7 +967,9 @@
 
 	ASSERT_CRED_LABEL(&old->cr_label);
 	ASSERT_VNODE_LABEL(filelabel);
-	ASSERT_VNODE_LABEL(interpvnodelabel);
+	if (interpvnodelabel != NULL) {
+		ASSERT_VNODE_LABEL(interpvnodelabel);
+	}
 	if (execlabel != NULL) {
 		ASSERT_CRED_LABEL(execlabel);
 	}
@@ -1565,7 +1567,9 @@
 {
 
 	ASSERT_CRED_LABEL(&active_cred->cr_label);
-	ASSERT_CRED_LABEL(&file_cred->cr_label);
+	if (file_cred != NULL) {
+		ASSERT_CRED_LABEL(&file_cred->cr_label);
+	}
 	ASSERT_VNODE_LABEL(label);
 
 	return (0);
@@ -1717,7 +1721,9 @@
 {
 
 	ASSERT_CRED_LABEL(&active_cred->cr_label);
-	ASSERT_CRED_LABEL(&file_cred->cr_label);
+	if (file_cred != NULL) {
+		ASSERT_CRED_LABEL(&file_cred->cr_label);
+	}
 	ASSERT_VNODE_LABEL(label);
 
 	return (0);
To Unsubscribe: send mail to majordomo at trustedbsd.org
with "unsubscribe trustedbsd-cvs" in the body of the message



More information about the trustedbsd-cvs mailing list