From owner-p4-projects@FreeBSD.ORG Sun Jun 29 20:20:06 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id A632037B404; Sun, 29 Jun 2003 20:20:05 -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 15E9F37B401 for ; Sun, 29 Jun 2003 20:20:05 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 851D644028 for ; Sun, 29 Jun 2003 20:20:04 -0700 (PDT) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id h5U3K40U094576 for ; Sun, 29 Jun 2003 20:20:04 -0700 (PDT) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h5U3K4n3094573 for perforce@freebsd.org; Sun, 29 Jun 2003 20:20:04 -0700 (PDT) Date: Sun, 29 Jun 2003 20:20:04 -0700 (PDT) Message-Id: <200306300320.h5U3K4n3094573@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to bb+lists.freebsd.perforce@cyrus.watson.org using -f From: Robert Watson To: Perforce Change Reviews Subject: PERFORCE change 33870 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Jun 2003 03:20:06 -0000 http://perforce.freebsd.org/chv.cgi?CH=33870 Change 33870 by rwatson@rwatson_powerbook on 2003/06/29 20:19:29 #if 0 references to userret; not ready for that yet. Switch curthread to curproc generally; this has unfortunate semantics, but is probably right for all the VOP's. We might be able to switch some references back using current_act() at some point. Affected files ... .. //depot/projects/trustedbsd/sedarwin/apsl/xnu/bsd/kern/kern_mac.c#11 edit .. //depot/projects/trustedbsd/sedarwin/apsl/xnu/bsd/sys/mac.h#3 edit Differences ... ==== //depot/projects/trustedbsd/sedarwin/apsl/xnu/bsd/kern/kern_mac.c#11 (text+ko) ==== @@ -1388,12 +1388,14 @@ MAC_PERFORM(create_proc1, cred); } +#if 0 void -mac_thread_userret(struct thread *td) +mac_thread_userret(struct uthread *td) { MAC_PERFORM(thread_userret, td); } +#endif /* * When a new process is created, its label must be initialized. Generally, @@ -1457,7 +1459,7 @@ ASSERT_VOP_LOCKED(dvp, "mac_create_vnode_extattr"); ASSERT_VOP_LOCKED(vp, "mac_create_vnode_extattr"); - error = VOP_OPENEXTATTR(vp, cred, curthread); + error = VOP_OPENEXTATTR(vp, cred, curproc); if (error == EOPNOTSUPP) { /* XXX: Optionally abort if transactions not supported. */ if (ea_warn_once == 0) { @@ -1472,11 +1474,11 @@ dvp, &dvp->v_label, vp, &vp->v_label, cnp); if (error) { - VOP_CLOSEEXTATTR(vp, 0, NOCRED, curthread); + VOP_CLOSEEXTATTR(vp, 0, NOCRED, curproc); return (error); } - error = VOP_CLOSEEXTATTR(vp, 1, NOCRED, curthread); + error = VOP_CLOSEEXTATTR(vp, 1, NOCRED, curproc); if (error == EOPNOTSUPP) error = 0; /* XXX */ @@ -1492,7 +1494,7 @@ ASSERT_VOP_LOCKED(vp, "mac_setlabel_vnode_extattr"); - error = VOP_OPENEXTATTR(vp, cred, curthread); + error = VOP_OPENEXTATTR(vp, cred, curproc); if (error == EOPNOTSUPP) { /* XXX: Optionally abort if transactions not supported. */ if (ea_warn_once == 0) { @@ -1506,11 +1508,11 @@ MAC_CHECK(setlabel_vnode_extattr, cred, vp, &vp->v_label, intlabel); if (error) { - VOP_CLOSEEXTATTR(vp, 0, NOCRED, curthread); + VOP_CLOSEEXTATTR(vp, 0, NOCRED, curproc); return (error); } - error = VOP_CLOSEEXTATTR(vp, 1, NOCRED, curthread); + error = VOP_CLOSEEXTATTR(vp, 1, NOCRED, curproc); if (error == EOPNOTSUPP) error = 0; /* XXX */ @@ -3363,11 +3365,11 @@ * assume VOP_SETLABEL() will do it, because we might implement * that as part of vop_stdsetlabel_ea(). */ - error = VOP_ACCESS(vp, VADMIN, cred, curthread); + error = VOP_ACCESS(vp, VADMIN, cred, curproc); if (error) return (error); - error = VOP_SETLABEL(vp, intlabel, cred, curthread); + error = VOP_SETLABEL(vp, intlabel, cred, curproc); if (error) return (error); ==== //depot/projects/trustedbsd/sedarwin/apsl/xnu/bsd/sys/mac.h#3 (text+ko) ==== @@ -230,7 +230,9 @@ struct label *interpvnodelabel, struct image_params *imgp); void mac_create_proc0(struct ucred *cred); void mac_create_proc1(struct ucred *cred); +#if 0 void mac_thread_userret(struct uthread *td); +#endif /* Access control checks. */ int mac_check_bpfdesc_receive(struct bpf_d *bpf_d, struct ifnet *ifnet);