PERFORCE change 33870 for review
Robert Watson
rwatson at FreeBSD.org
Mon Jun 30 03:20:04 GMT 2003
http://perforce.freebsd.org/chv.cgi?CH=33870
Change 33870 by rwatson at 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);
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