PERFORCE change 35937 for review

Robert Watson rwatson at FreeBSD.org
Mon Aug 11 20:01:05 GMT 2003


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

Change 35937 by rwatson at rwatson_tislabs on 2003/08/11 13:00:06

	Add mac_test and mac_stub cases for two MAC-branch specific
	entry points: mpo_check_proc_wait() and
	mpo_update_mbuf_from_cipso().

Affected files ...

.. //depot/projects/trustedbsd/mac/sys/security/mac_stub/mac_stub.c#2 edit
.. //depot/projects/trustedbsd/mac/sys/security/mac_test/mac_test.c#110 edit

Differences ...

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

@@ -416,6 +416,14 @@
 
 }
 
+static int
+stub_update_mbuf_from_cipso(struct mbuf *m, struct label *mlabel,
+    struct ifnet *ifnet, struct label *ifnetlabel, char *cp, int *code)
+{
+
+	return (0);
+}
+
 /*
  * Labeling event operations: processes.
  */
@@ -636,6 +644,13 @@
 }
 
 static int
+stub_check_proc_wait(struct ucred *cred, struct proc *proc)
+{
+
+	return (0);
+}
+
+static int
 stub_check_socket_bind(struct ucred *cred, struct socket *socket,
     struct label *socketlabel, struct sockaddr *sockaddr)
 {
@@ -1074,6 +1089,7 @@
 	.mpo_reflect_mbuf_tcp = stub_reflect_mbuf_tcp,
 	.mpo_relabel_ifnet = stub_relabel_ifnet,
 	.mpo_update_ipq = stub_update_ipq,
+	.mpo_update_mbuf_from_cipso = stub_update_mbuf_from_cipso,
 	.mpo_create_cred = stub_create_cred,
 	.mpo_execve_transition = stub_execve_transition,
 	.mpo_execve_will_transition = stub_execve_will_transition,
@@ -1103,6 +1119,7 @@
 	.mpo_check_proc_debug = stub_check_proc_debug,
 	.mpo_check_proc_sched = stub_check_proc_sched,
 	.mpo_check_proc_signal = stub_check_proc_signal,
+	.mpo_check_proc_wait = stub_check_proc_wait,
 	.mpo_check_socket_bind = stub_check_socket_bind,
 	.mpo_check_socket_connect = stub_check_socket_connect,
 	.mpo_check_socket_deliver = stub_check_socket_deliver,

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

@@ -932,6 +932,17 @@
 	ASSERT_IPQ_LABEL(ipqlabel);
 }
 
+static int
+mac_test_update_mbuf_from_cipso(struct mbuf *m, struct label *mlabel,
+    struct ifnet *ifnet, struct label *ifnetlabel, char *cp, int *code)
+{
+
+	ASSERT_MBUF_LABEL(mlabel);
+	ASSERT_IFNET_LABEL(ifnetlabel);
+
+	return (0);
+}
+
 /*
  * Labeling event operations: processes.
  */
@@ -1252,6 +1263,16 @@
 }
 
 static int
+mac_test_check_proc_wait(struct ucred *cred, struct proc *proc)
+{
+
+	ASSERT_CRED_LABEL(&cred->cr_label);
+	ASSERT_CRED_LABEL(&proc->p_ucred->cr_label);
+
+	return (0);
+}
+
+static int
 mac_test_check_socket_bind(struct ucred *cred, struct socket *socket,
     struct label *socketlabel, struct sockaddr *sockaddr)
 {
@@ -1843,6 +1864,7 @@
 	.mpo_reflect_mbuf_icmp = mac_test_reflect_mbuf_tcp,
 	.mpo_relabel_ifnet = mac_test_relabel_ifnet,
 	.mpo_update_ipq = mac_test_update_ipq,
+	.mpo_update_mbuf_from_cipso = mac_test_update_mbuf_from_cipso,
 	.mpo_create_cred = mac_test_create_cred,
 	.mpo_execve_transition = mac_test_execve_transition,
 	.mpo_execve_will_transition = mac_test_execve_will_transition,
@@ -1872,6 +1894,7 @@
 	.mpo_check_proc_debug = mac_test_check_proc_debug,
 	.mpo_check_proc_sched = mac_test_check_proc_sched,
 	.mpo_check_proc_signal = mac_test_check_proc_signal,
+	.mpo_check_proc_wait = mac_test_check_proc_wait,
 	.mpo_check_socket_bind = mac_test_check_socket_bind,
 	.mpo_check_socket_connect = mac_test_check_socket_connect,
 	.mpo_check_socket_deliver = mac_test_check_socket_deliver,
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