PERFORCE change 100730 for review

Robert Watson rwatson at FreeBSD.org
Thu Jul 6 12:03:21 UTC 2006


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

Change 100730 by rwatson at rwatson_zoo on 2006/07/06 11:55:09

	Rename.

Affected files ...

.. //depot/projects/trustedbsd/mac2/sys/kern/uipc_socket.c#3 edit
.. //depot/projects/trustedbsd/mac2/sys/kern/uipc_socket2.c#3 edit
.. //depot/projects/trustedbsd/mac2/sys/kern/uipc_syscalls.c#3 edit

Differences ...

==== //depot/projects/trustedbsd/mac2/sys/kern/uipc_socket.c#3 (text+ko) ====

@@ -251,7 +251,7 @@
 	if (so == NULL)
 		return (NULL);
 #ifdef MAC
-	if (mac_init_socket(so, mflags) != 0) {
+	if (mac_socket_init(so, mflags) != 0) {
 		uma_zfree(socket_zone, so);
 		return (NULL);
 	}
@@ -288,7 +288,7 @@
 		do_setopt_accept_filter(so, NULL);
 #endif
 #ifdef MAC
-	mac_destroy_socket(so);
+	mac_socket_destroy(so);
 #endif
 	crfree(so->so_cred);
 	SOCKBUF_LOCK_DESTROY(&so->so_snd);
@@ -344,7 +344,7 @@
 	so->so_cred = crhold(cred);
 	so->so_proto = prp;
 #ifdef MAC
-	mac_create_socket(cred, so);
+	mac_socket_create(cred, so);
 #endif
 	knlist_init(&so->so_rcv.sb_sel.si_note, SOCKBUF_MTX(&so->so_rcv),
 	    NULL, NULL, NULL);
@@ -411,7 +411,7 @@
 	so->so_cred = crhold(head->so_cred);
 #ifdef MAC
 	SOCK_LOCK(head);
-	mac_create_socket_from_socket(head, so);
+	mac_socket_accept(head, so);
 	SOCK_UNLOCK(head);
 #endif
 	knlist_init(&so->so_rcv.sb_sel.si_note, SOCKBUF_MTX(&so->so_rcv),
@@ -2074,8 +2074,8 @@
 			    sizeof extmac);
 			if (error)
 				goto bad;
-			error = mac_setsockopt_label(sopt->sopt_td->td_ucred,
-			    so, &extmac);
+			error = mac_socket_setsockopt_label(
+			    sopt->sopt_td->td_ucred, so, &extmac);
 #else
 			error = EOPNOTSUPP;
 #endif
@@ -2227,8 +2227,8 @@
 			    sizeof(extmac));
 			if (error)
 				return (error);
-			error = mac_getsockopt_label(sopt->sopt_td->td_ucred,
-			    so, &extmac);
+			error = mac_socket_getsockopt_label(
+			    sopt->sopt_td->td_ucred, so, &extmac);
 			if (error)
 				return (error);
 			error = sooptcopyout(sopt, &extmac, sizeof extmac);
@@ -2243,7 +2243,7 @@
 			    sizeof(extmac));
 			if (error)
 				return (error);
-			error = mac_getsockopt_peerlabel(
+			error = mac_socket_getsockopt_peerlabel(
 			    sopt->sopt_td->td_ucred, so, &extmac);
 			if (error)
 				return (error);

==== //depot/projects/trustedbsd/mac2/sys/kern/uipc_socket2.c#3 (text+ko) ====

@@ -43,7 +43,7 @@
 #include <sys/file.h>	/* for maxfiles */
 #include <sys/kernel.h>
 #include <sys/lock.h>
-#include <sys/mac_framework.h>
+#include <sys/mac_framework.h>		/* XXXRW: Why is this needed? */
 #include <sys/malloc.h>
 #include <sys/mbuf.h>
 #include <sys/mutex.h>

==== //depot/projects/trustedbsd/mac2/sys/kern/uipc_syscalls.c#3 (text+ko) ====

@@ -161,7 +161,7 @@
 	int fd, error;
 
 #ifdef MAC
-	error = mac_check_socket_create(td->td_ucred, uap->domain, uap->type,
+	error = mac_socket_check_create(td->td_ucred, uap->domain, uap->type,
 	    uap->protocol);
 	if (error)
 		return (error);
@@ -229,7 +229,7 @@
 	so = fp->f_data;
 #ifdef MAC
 	SOCK_LOCK(so);
-	error = mac_check_socket_bind(td->td_ucred, so, sa);
+	error = mac_socket_check_bind(td->td_ucred, so, sa);
 	SOCK_UNLOCK(so);
 	if (error)
 		goto done1;
@@ -267,7 +267,7 @@
 		so = fp->f_data;
 #ifdef MAC
 		SOCK_LOCK(so);
-		error = mac_check_socket_listen(td->td_ucred, so);
+		error = mac_socket_check_listen(td->td_ucred, so);
 		SOCK_UNLOCK(so);
 		if (error)
 			goto done;
@@ -326,7 +326,7 @@
 	}
 #ifdef MAC
 	SOCK_LOCK(head);
-	error = mac_check_socket_accept(td->td_ucred, head);
+	error = mac_socket_check_accept(td->td_ucred, head);
 	SOCK_UNLOCK(head);
 	if (error != 0)
 		goto done;
@@ -531,7 +531,7 @@
 	}
 #ifdef MAC
 	SOCK_LOCK(so);
-	error = mac_check_socket_connect(td->td_ucred, so, sa);
+	error = mac_socket_check_connect(td->td_ucred, so, sa);
 	SOCK_UNLOCK(so);
 	if (error)
 		goto bad;
@@ -591,7 +591,7 @@
 
 #ifdef MAC
 	/* We might want to have a separate check for socket pairs. */
-	error = mac_check_socket_create(td->td_ucred, uap->domain, uap->type,
+	error = mac_socket_check_create(td->td_ucred, uap->domain, uap->type,
 	    uap->protocol);
 	if (error)
 		return (error);
@@ -747,7 +747,7 @@
 
 #ifdef MAC
 	SOCK_LOCK(so);
-	error = mac_check_socket_send(td->td_ucred, so);
+	error = mac_socket_check_send(td->td_ucred, so);
 	SOCK_UNLOCK(so);
 	if (error)
 		goto bad;
@@ -961,7 +961,7 @@
 
 #ifdef MAC
 	SOCK_LOCK(so);
-	error = mac_check_socket_receive(td->td_ucred, so);
+	error = mac_socket_check_receive(td->td_ucred, so);
 	SOCK_UNLOCK(so);
 	if (error) {
 		fdrop(fp, td);
@@ -1863,7 +1863,7 @@
 
 #ifdef MAC
 	SOCK_LOCK(so);
-	error = mac_check_socket_send(td->td_ucred, so);
+	error = mac_socket_check_send(td->td_ucred, so);
 	SOCK_UNLOCK(so);
 	if (error)
 		goto done;


More information about the trustedbsd-cvs mailing list