Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 14 Aug 2002 17:08:51 -0700 (PDT)
From:      Robert Watson <rwatson@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 15985 for review
Message-ID:  <200208150008.g7F08pi1078721@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://people.freebsd.org/~peter/p4db/chv.cgi?CH=15985

Change 15985 by rwatson@rwatson_curry on 2002/08/14 17:08:14

	Provide a mac_get_pid() stub so that we can build a kernel
	without options MAC.
	
	Sort mac_get_pid() before mac_get_proc() for reasons of the
	alphabet.

Affected files ...

.. //depot/projects/trustedbsd/mac/sys/kern/kern_mac.c#240 edit

Differences ...

==== //depot/projects/trustedbsd/mac/sys/kern/kern_mac.c#240 (text+ko) ====

@@ -2933,22 +2933,6 @@
 	return (0);
 }
 
-/*
- * MPSAFE
- */
-int
-__mac_get_proc(struct thread *td, struct __mac_get_proc_args *uap)
-{
-	struct mac extmac;
-	int error;
-
-	error = mac_externalize(&td->td_ucred->cr_label, &extmac);
-	if (error == 0)
-		error = copyout(&extmac, SCARG(uap, mac_p), sizeof(extmac));
-
-	return (error);
-}
-
 #if 0
 395     MSTD    BSD     { int __mac_get_pid(pid_t pid,
                                 struct mac_pid_data *mpd, size_t mpdcnt) };
@@ -2998,8 +2982,26 @@
 	return (error);
 }
 
+
+
 /*
  * MPSAFE
+ */
+int
+__mac_get_proc(struct thread *td, struct __mac_get_proc_args *uap)
+{
+	struct mac extmac;
+	int error;
+
+	error = mac_externalize(&td->td_ucred->cr_label, &extmac);
+	if (error == 0)
+		error = copyout(&extmac, SCARG(uap, mac_p), sizeof(extmac));
+
+	return (error);
+}
+
+/*
+ * MPSAFE
  *
  * XXX: Needs to be re-written for proc locking.
  */
@@ -3263,6 +3265,13 @@
 #else /* !MAC */
 
 int
+mac_get_pid(struct thread *td, struct mac_get_pid_args *uap)
+{
+
+	return (ENOSYS);
+}
+
+int
 __mac_get_proc(struct thread *td, struct __mac_get_proc_args *uap)
 {
 

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe p4-projects" in the body of the message




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