PERFORCE change 100740 for review

Robert Watson rwatson at FreeBSD.org
Thu Jul 6 12:51:48 UTC 2006


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

Change 100740 by rwatson at rwatson_zoo on 2006/07/06 12:51:34

	Rename.

Affected files ...

.. //depot/projects/trustedbsd/mac2/sys/kern/kern_mbuf.c#3 edit
.. //depot/projects/trustedbsd/mac2/sys/kern/kern_prot.c#3 edit
.. //depot/projects/trustedbsd/mac2/sys/kern/kern_shutdown.c#3 edit
.. //depot/projects/trustedbsd/mac2/sys/kern/kern_sysctl.c#3 edit
.. //depot/projects/trustedbsd/mac2/sys/kern/kern_time.c#3 edit
.. //depot/projects/trustedbsd/mac2/sys/kern/link_elf.c#3 edit
.. //depot/projects/trustedbsd/mac2/sys/kern/sys_pipe.c#3 edit
.. //depot/projects/trustedbsd/mac2/sys/kern/sys_socket.c#3 edit

Differences ...

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

@@ -328,7 +328,7 @@
 		SLIST_INIT(&m->m_pkthdr.tags);
 #ifdef MAC
 		/* If the label init fails, fail the alloc */
-		error = mac_init_mbuf(m, how);
+		error = mac_mbuf_init(m, how);
 		if (error)
 			return (error);
 #endif
@@ -526,7 +526,7 @@
 		SLIST_INIT(&m->m_pkthdr.tags);
 #ifdef MAC
 		/* If the label init fails, fail the alloc */
-		error = mac_init_mbuf(m, how);
+		error = mac_mbuf_init(m, how);
 		if (error)
 			return (error);
 #endif

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

@@ -505,7 +505,7 @@
 	oldcred = p->p_ucred;
 
 #ifdef MAC
-	error = mac_check_proc_setuid(p, oldcred, uid);
+	error = mac_proc_check_setuid(p, oldcred, uid);
 	if (error)
 		goto fail;
 #endif
@@ -619,7 +619,7 @@
 	oldcred = p->p_ucred;
 
 #ifdef MAC
-	error = mac_check_proc_seteuid(p, oldcred, euid);
+	error = mac_proc_check_seteuid(p, oldcred, euid);
 	if (error)
 		goto fail;
 #endif
@@ -675,7 +675,7 @@
 	oldcred = p->p_ucred;
 
 #ifdef MAC
-	error = mac_check_proc_setgid(p, oldcred, gid);
+	error = mac_proc_check_setgid(p, oldcred, gid);
 	if (error)
 		goto fail;
 #endif
@@ -776,7 +776,7 @@
 	oldcred = p->p_ucred;
 
 #ifdef MAC
-	error = mac_check_proc_setegid(p, oldcred, egid);
+	error = mac_proc_check_setegid(p, oldcred, egid);
 	if (error)
 		goto fail;
 #endif
@@ -835,7 +835,7 @@
 	oldcred = p->p_ucred;
 
 #ifdef MAC
-	error = mac_check_proc_setgroups(p, oldcred, ngrp,
+	error = mac_proc_check_setgroups(p, oldcred, ngrp,
 	    tempcred->cr_groups);
 	if (error)
 		goto fail;
@@ -907,7 +907,7 @@
 	oldcred = p->p_ucred;
 
 #ifdef MAC
-	error = mac_check_proc_setreuid(p, oldcred, ruid, euid);
+	error = mac_proc_check_setreuid(p, oldcred, ruid, euid);
 	if (error)
 		goto fail;
 #endif
@@ -975,7 +975,7 @@
 	oldcred = p->p_ucred;
 
 #ifdef MAC
-	error = mac_check_proc_setregid(p, oldcred, rgid, egid);
+	error = mac_proc_check_setregid(p, oldcred, rgid, egid);
 	if (error)
 		goto fail;
 #endif
@@ -1050,7 +1050,7 @@
 	oldcred = p->p_ucred;
 
 #ifdef MAC
-	error = mac_check_proc_setresuid(p, oldcred, ruid, euid, suid);
+	error = mac_proc_check_setresuid(p, oldcred, ruid, euid, suid);
 	if (error)
 		goto fail;
 #endif
@@ -1131,7 +1131,7 @@
 	oldcred = p->p_ucred;
 
 #ifdef MAC
-	error = mac_check_proc_setresgid(p, oldcred, rgid, egid, sgid);
+	error = mac_proc_check_setresgid(p, oldcred, rgid, egid, sgid);
 	if (error)
 		goto fail;
 #endif
@@ -1481,7 +1481,7 @@
 	if ((error = prison_check(u1, u2)))
 		return (error);
 #ifdef MAC
-	if ((error = mac_check_cred_visible(u1, u2)))
+	if ((error = mac_cred_check_visible(u1, u2)))
 		return (error);
 #endif
 	if ((error = cr_seeotheruids(u1, u2)))
@@ -1542,7 +1542,7 @@
 	if (error)
 		return (error);
 #ifdef MAC
-	if ((error = mac_check_proc_signal(cred, proc, signum)))
+	if ((error = mac_proc_check_signal(cred, proc, signum)))
 		return (error);
 #endif
 	if ((error = cr_seeotheruids(cred, proc->p_ucred)))
@@ -1661,7 +1661,7 @@
 	if ((error = prison_check(td->td_ucred, p->p_ucred)))
 		return (error);
 #ifdef MAC
-	if ((error = mac_check_proc_sched(td->td_ucred, p)))
+	if ((error = mac_proc_check_sched(td->td_ucred, p)))
 		return (error);
 #endif
 	if ((error = cr_seeotheruids(td->td_ucred, p->p_ucred)))
@@ -1724,7 +1724,7 @@
 	if ((error = prison_check(td->td_ucred, p->p_ucred)))
 		return (error);
 #ifdef MAC
-	if ((error = mac_check_proc_debug(td->td_ucred, p)))
+	if ((error = mac_proc_check_debug(td->td_ucred, p)))
 		return (error);
 #endif
 	if ((error = cr_seeotheruids(td->td_ucred, p->p_ucred)))
@@ -1805,7 +1805,7 @@
 		return (ENOENT);
 #ifdef MAC
 	SOCK_LOCK(so);
-	error = mac_check_socket_visible(cred, so);
+	error = mac_socket_check_visible(cred, so);
 	SOCK_UNLOCK(so);
 	if (error)
 		return (error);
@@ -1837,7 +1837,7 @@
 	if ((error = prison_check(td->td_ucred, p->p_ucred)))
 		return (error);
 #ifdef MAC
-	if ((error = mac_check_proc_wait(td->td_ucred, p)))
+	if ((error = mac_proc_check_wait(td->td_ucred, p)))
 		return (error);
 #endif
 #if 0
@@ -1861,7 +1861,7 @@
 	MALLOC(cr, struct ucred *, sizeof(*cr), M_CRED, M_WAITOK | M_ZERO);
 	refcount_init(&cr->cr_ref, 1);
 #ifdef MAC
-	mac_init_cred(cr);
+	mac_cred_init(cr);
 #endif
 	return (cr);
 }
@@ -1905,7 +1905,7 @@
 		if (jailed(cr))
 			prison_free(cr->cr_prison);
 #ifdef MAC
-		mac_destroy_cred(cr);
+		mac_cred_destroy(cr);
 #endif
 		FREE(cr, M_CRED);
 	}
@@ -1939,7 +1939,7 @@
 	if (jailed(dest))
 		prison_hold(dest->cr_prison);
 #ifdef MAC
-	mac_copy_cred(src, dest);
+	mac_cred_copy(src, dest);
 #endif
 }
 

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

@@ -160,7 +160,7 @@
 
 	error = 0;
 #ifdef MAC
-	error = mac_check_system_reboot(td->td_ucred, uap->opt);
+	error = mac_system_check_reboot(td->td_ucred, uap->opt);
 #endif
 	if (error == 0)
 		error = suser(td);

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

@@ -1273,7 +1273,7 @@
 		arg2 = oid->oid_arg2;
 	}
 #ifdef MAC
-	error = mac_check_system_sysctl(req->td->td_ucred, oid, arg1, arg2,
+	error = mac_system_check_sysctl(req->td->td_ucred, oid, arg1, arg2,
 	    req);
 	if (error != 0)
 		return (error);

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

@@ -281,7 +281,7 @@
 	int error;
 
 #ifdef MAC
-	error = mac_check_system_settime(td->td_ucred);
+	error = mac_system_check_settime(td->td_ucred);
 	if (error)
 		return (error);
 #endif
@@ -499,7 +499,7 @@
 	int error;
 
 #ifdef MAC
-	error = mac_check_system_settime(td->td_ucred);
+	error = mac_system_check_settime(td->td_ucred);
 	if (error)
 		return (error);
 #endif

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

@@ -570,7 +570,7 @@
     vfslocked = NDHASGIANT(&nd);
     NDFREE(&nd, NDF_ONLY_PNBUF);
 #ifdef MAC
-    error = mac_check_kld_load(curthread->td_ucred, nd.ni_vp);
+    error = mac_kld_check_load(curthread->td_ucred, nd.ni_vp);
     if (error) {
 	firstpage = NULL;
 	goto out;

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

@@ -340,11 +340,11 @@
 #ifdef MAC
 	/*
 	 * The MAC label is shared between the connected endpoints.  As a
-	 * result mac_init_pipe() and mac_create_pipe() are called once
+	 * result mac_pipe_init() and mac_create_pipe() are called once
 	 * for the pair, and not on the endpoints.
 	 */
-	mac_init_pipe(pp);
-	mac_create_pipe(td->td_ucred, pp);
+	mac_pipe_init(pp);
+	mac_pipe_create(td->td_ucred, pp);
 #endif
 	rpipe = &pp->pp_rpipe;
 	wpipe = &pp->pp_wpipe;
@@ -593,7 +593,7 @@
 		goto unlocked_error;
 
 #ifdef MAC
-	error = mac_check_pipe_read(active_cred, rpipe->pipe_pair);
+	error = mac_pipe_check_read(active_cred, rpipe->pipe_pair);
 	if (error)
 		goto locked_error;
 #endif
@@ -1003,7 +1003,7 @@
 		return (EPIPE);
 	}
 #ifdef MAC
-	error = mac_check_pipe_write(active_cred, wpipe->pipe_pair);
+	error = mac_pipe_check_write(active_cred, wpipe->pipe_pair);
 	if (error) {
 		pipeunlock(wpipe);
 		PIPE_UNLOCK(rpipe);
@@ -1268,7 +1268,7 @@
 	PIPE_LOCK(mpipe);
 
 #ifdef MAC
-	error = mac_check_pipe_ioctl(active_cred, mpipe->pipe_pair, cmd, data);
+	error = mac_pipe_check_ioctl(active_cred, mpipe->pipe_pair, cmd, data);
 	if (error) {
 		PIPE_UNLOCK(mpipe);
 		return (error);
@@ -1342,7 +1342,7 @@
 	wpipe = rpipe->pipe_peer;
 	PIPE_LOCK(rpipe);
 #ifdef MAC
-	error = mac_check_pipe_poll(active_cred, rpipe->pipe_pair);
+	error = mac_pipe_check_poll(active_cred, rpipe->pipe_pair);
 	if (error)
 		goto locked_error;
 #endif
@@ -1398,7 +1398,7 @@
 	int error;
 
 	PIPE_LOCK(pipe);
-	error = mac_check_pipe_stat(active_cred, pipe->pipe_pair);
+	error = mac_pipe_check_stat(active_cred, pipe->pipe_pair);
 	PIPE_UNLOCK(pipe);
 	if (error)
 		return (error);
@@ -1527,7 +1527,7 @@
 	if (ppipe->pipe_present == 0) {
 		PIPE_UNLOCK(cpipe);
 #ifdef MAC
-		mac_destroy_pipe(pp);
+		mac_pipe_destroy(pp);
 #endif
 		uma_zfree(pipe_zone, cpipe->pipe_pair);
 	} else

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

@@ -81,7 +81,7 @@
 	NET_LOCK_GIANT();
 #ifdef MAC
 	SOCK_LOCK(so);
-	error = mac_check_socket_receive(active_cred, so);
+	error = mac_socket_check_receive(active_cred, so);
 	SOCK_UNLOCK(so);
 	if (error) {
 		NET_UNLOCK_GIANT();
@@ -108,7 +108,7 @@
 	NET_LOCK_GIANT();
 #ifdef MAC
 	SOCK_LOCK(so);
-	error = mac_check_socket_send(active_cred, so);
+	error = mac_socket_check_send(active_cred, so);
 	SOCK_UNLOCK(so);
 	if (error) {
 		NET_UNLOCK_GIANT();
@@ -236,7 +236,7 @@
 	NET_LOCK_GIANT();
 #ifdef MAC
 	SOCK_LOCK(so);
-	error = mac_check_socket_poll(active_cred, so);
+	error = mac_socket_check_poll(active_cred, so);
 	SOCK_UNLOCK(so);
 	if (error) {
 		NET_UNLOCK_GIANT();
@@ -265,7 +265,7 @@
 	NET_LOCK_GIANT();
 #ifdef MAC
 	SOCK_LOCK(so);
-	error = mac_check_socket_stat(active_cred, so);
+	error = mac_socket_check_stat(active_cred, so);
 	SOCK_UNLOCK(so);
 	if (error) {
 		NET_UNLOCK_GIANT();


More information about the trustedbsd-cvs mailing list