PERFORCE change 125539 for review

Zhouyi ZHOU zhouzhouyi at FreeBSD.org
Tue Aug 21 23:28:05 PDT 2007


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

Change 125539 by zhouzhouyi at zhouzhouyi_mactest on 2007/08/22 06:27:59

	Test case for sysvshm for biba also

Affected files ...

.. //depot/projects/soc2007/zhouzhouyi_mactest_soc/regression/mactest/shmtest.c#3 edit
.. //depot/projects/soc2007/zhouzhouyi_mactest_soc/regression/mactest/tests/sysvshm/00.t#2 edit

Differences ...

==== //depot/projects/soc2007/zhouzhouyi_mactest_soc/regression/mactest/shmtest.c#3 (text+ko) ====

@@ -377,7 +377,7 @@
 	if ((shm_buf = shmat(shmid, NULL, SHM_RDONLY)) == (void *) -1)
 		err(1, "receiver: shmat");
 
-	*(char *)shm_buf = 1; /*can't write*/
+//	*(char *)shm_buf = 1; /*can't write*/
 	if (strcmp((const char *)shm_buf, m_str) != 0)
 		err(1, "receiver: data isn't correct");
 

==== //depot/projects/soc2007/zhouzhouyi_mactest_soc/regression/mactest/tests/sysvshm/00.t#2 (text+ko) ====

@@ -7,7 +7,7 @@
 dir=`dirname $0`
 . ${dir}/../misc.sh
 
-echo "1..1"
+echo "1..2"
 
 
 #turn off all the switches
@@ -34,18 +34,24 @@
 #############################################################
     t=`sysctl security.mac.mls.enabled=1`
     echo "enforcing mac/mls!"
+    t=`sysctl security.mac.biba.enabled=1`
+    echo "enforcing mac/biba!"
     t=`sysctl security.mac.mls.revocation_enabled=1`
+    t=`sysctl security.mac.biba.revocation_enabled=1`
     echo "enabling revoking"
-#case 1: check mls no read low
+#case 1: check mls no read high
     bizarretestexpect ${shmtest} "" "" -c "mls/5" -s "mls/5" \
 	-r "mls/9" -f ${mactest_conf} 
-#case 2:
+#case 2: check biba no read low
+    bizarretestexpect ${shmtest} "" "" -c "biba/5" -s "biba/5" \
+	-r "biba/3" -f ${mactest_conf} 
 
 
 #cleanup:
     t=`sysctl security.mac.mls.enabled=0`
     echo "disabling mac/mls!"
-
+    t=`sysctl security.mac.biba.enabled=0`
+    echo "disabling mac/biba!"
 
     rm ${mactest_conf}
 fi


More information about the p4-projects mailing list