From owner-p4-projects Wed Aug 14 17: 9: 2 2002 Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 0015E37B401; Wed, 14 Aug 2002 17:08:53 -0700 (PDT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9196337B400 for ; Wed, 14 Aug 2002 17:08:53 -0700 (PDT) Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4EB0943E42 for ; Wed, 14 Aug 2002 17:08:52 -0700 (PDT) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from freefall.freebsd.org (perforce@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.4/8.12.4) with ESMTP id g7F08qJU078724 for ; Wed, 14 Aug 2002 17:08:52 -0700 (PDT) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: (from perforce@localhost) by freefall.freebsd.org (8.12.4/8.12.4/Submit) id g7F08pi1078721 for perforce@freebsd.org; Wed, 14 Aug 2002 17:08:51 -0700 (PDT) Date: Wed, 14 Aug 2002 17:08:51 -0700 (PDT) Message-Id: <200208150008.g7F08pi1078721@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: perforce set sender to bb+lists.freebsd.perforce@cyrus.watson.org using -f From: Robert Watson Subject: PERFORCE change 15985 for review To: Perforce Change Reviews Sender: owner-p4-projects@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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