PERFORCE change 109965 for review

Todd Miller millert at FreeBSD.org
Tue Nov 14 19:04:25 UTC 2006


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

Change 109965 by millert at millert_g5tower on 2006/11/14 18:54:08

	Replace call to mac_proc_check_debug() in task_for_pid()
	with mac_task_check_get_port().

Affected files ...

.. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/vm/vm_unix.c#5 edit

Differences ...

==== //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/vm/vm_unix.c#5 (text+ko) ====

@@ -407,13 +407,16 @@
 		  )
 		&& (p->p_stat != SZOMB)
 		) {
+			if (p->task != TASK_NULL) {
+				task_reference(p->task);
 #ifdef MAC
-			error = mac_proc_check_debug(kauth_cred_get(), p);
-			if (error)
-				goto noperm;
+				error = mac_task_check_get_port(kauth_cred_get(),
+				    p->task);
+				if (error) {
+					task_deallocate(p->task);
+					goto noperm;
+				}
 #endif
-			if (p->task != TASK_NULL) {
-				task_reference(p->task);
 				sright = (void *)convert_task_to_port(p->task);
 				tret = ipc_port_copyout_send(
 					sright, 


More information about the trustedbsd-cvs mailing list