PERFORCE change 105782 for review
Todd Miller
millert at FreeBSD.org
Thu Sep 7 13:51:52 UTC 2006
http://perforce.freebsd.org/chv.cgi?CH=105782
Change 105782 by millert at millert_g5tower on 2006/09/07 13:30:14
Add a keepold argument to labelh_modify() that tells it not
to free the old label handle.
Affected files ...
.. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/osfmk/ipc/ipc_labelh.c#8 edit
.. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/osfmk/ipc/ipc_labelh.h#5 edit
Differences ...
==== //depot/projects/trustedbsd/sedarwin8/darwin/xnu/osfmk/ipc/ipc_labelh.c#8 (text+ko) ====
@@ -150,7 +150,7 @@
* Returned label handle is locked.
*/
ipc_labelh_t
-labelh_modify(ipc_labelh_t old)
+labelh_modify(ipc_labelh_t old, int keepold)
{
ipc_labelh_t lh;
@@ -163,7 +163,8 @@
return (old);
lh = labelh_duplicate(old);
lh_release(old);
- lh_check_unlock(old);
+ if (!keepold)
+ lh_check_unlock(old);
lh_lock(lh);
return (lh);
}
==== //depot/projects/trustedbsd/sedarwin8/darwin/xnu/osfmk/ipc/ipc_labelh.h#5 (text+ko) ====
@@ -45,7 +45,7 @@
void labelh_destroy(ipc_port_t port);
ipc_labelh_t labelh_duplicate(ipc_labelh_t old);
-ipc_labelh_t labelh_modify(ipc_labelh_t old);
+ipc_labelh_t labelh_modify(ipc_labelh_t old, int keepold);
ipc_labelh_t labelh_new(int canblock);
kern_return_t labelh_new_user(ipc_space_t, struct label *, mach_port_name_t *);
void labelh_release(ipc_labelh_t lh);
More information about the trustedbsd-cvs
mailing list