PERFORCE change 15985 for review
Robert Watson
rwatson at freebsd.org
Thu Aug 15 00:08:51 GMT 2002
http://people.freebsd.org/~peter/p4db/chv.cgi?CH=15985
Change 15985 by rwatson at 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 at trustedbsd.org
with "unsubscribe trustedbsd-cvs" in the body of the message
More information about the trustedbsd-cvs
mailing list