PERFORCE change 105373 for review
Todd Miller
millert at FreeBSD.org
Wed Aug 30 21:34:49 UTC 2006
http://perforce.freebsd.org/chv.cgi?CH=105373
Change 105373 by millert at millert_g4tower on 2006/08/30 21:33:36
The label on a label handle is a task label, not a port
label so call the appropriate entry point. There are some
mismatches we can't fix yet due to non-existent entrypoints
so just note those with an XXX for now. In practice this
doesn't cause problems since policies use the same label
structure for ports and tasks. We really need task label
internalize, external and copy entrypoints or we should
just collapse port and task labels into a single label type.
Affected files ...
.. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/osfmk/ipc/ipc_labelh.c#4 edit
Differences ...
==== //depot/projects/trustedbsd/sedarwin8/darwin/xnu/osfmk/ipc/ipc_labelh.c#4 (text+ko) ====
@@ -90,13 +90,14 @@
struct label inl;
kern_return_t kr;
- mac_port_init_label(&inl);
+ mac_task_init_label(&inl);
+ /* XXX - should be mac_task_internalize_label */
if (mac_port_internalize_label(&inl, labelstr))
return (KERN_INVALID_ARGUMENT);
kr = labelh_new_user(space, &inl, namep);
if (kr != KERN_SUCCESS) {
- mac_port_destroy_label(&inl);
+ mac_task_destroy_label(&inl);
return (kr);
}
@@ -139,7 +140,8 @@
lh = labelh_new();
ip_lock(lh->lh_port);
- mac_port_init_label(&lh->lh_label);
+ mac_task_init_label(&lh->lh_label);
+ /* XXX - should be mac_task_copy_label */
mac_port_copy_label(&old->lh_label, &lh->lh_label);
ip_unlock(lh->lh_port);
return (lh);
@@ -202,6 +204,6 @@
{
ipc_labelh_t lh = (ipc_labelh_t) port->ip_kobject;
- mac_port_destroy_label(&lh->lh_label);
+ mac_task_destroy_label(&lh->lh_label);
zfree(ipc_labelh_zone, (vm_offset_t)lh);
}
More information about the trustedbsd-cvs
mailing list