Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 14 Nov 2006 18:54:24 GMT
From:      Todd Miller <millert@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 109965 for review
Message-ID:  <200611141854.kAEIsOn4013018@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=109965

Change 109965 by millert@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, 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200611141854.kAEIsOn4013018>