summaryrefslogtreecommitdiff
path: root/common/lib/libprop/Makefile.inc
AgeCommit message (Collapse)Author
2016-06-28The local copy of rb_tree code has been unused for quite some time. Sopgoyette
we can just remove it, and adjust callers to use the "real" rbtree function names. Addresses PR lib/44090
2012-07-27Bit-un-rot the proplib portability layer.pooka
2008-06-30Change tree op members/typedefs to rbto_compare_* from rb_compare_*matt
2008-06-03Add prop_array_util functions to proplib. This code is copied/changedhaad
prop_dictionary_util. From manual page The prop_array_util family of functions are provided to make getting and setting values in arrays more convenient in some applications. OK by mjf@ and freza@.
2007-08-16libprop is currently using a recursive parser. While this is fine forjoerg
userland, deeply nested arrays and dictionaries can easily overflow the kernel stack and thereby force a panic. Fix the internalizer and prop_object_release to use a separate call stack and alter the dictionary and array handling to not recurse on the C stack. The default stack has an inline depth of 16 elements, which should keep the overhead reasonable. This issue was found by Pavel Cahyna and Jachym Holecek. Additionally add a limit for prop_object_copyin_ioctl to prevent user programs from temporary allocating unbound amount of kernel memory. Allow malloc to fail so that tight loops of userland processes can't force panics by exhausting the kernel map. Tested with the sample exploit of Jachym, his test suite and reviewed by himself (initial patch), Christos Zoulas and Jason Thorpe.
2006-10-26- Add prop_dictionary_all_keys(). Takes a snapshot of a dictionary'sthorpej
keys and returns them in an array. This effectively allows a caller to mutate a dictionary while iterating over it (really, you iterate over the array of keys instead of the dictionary itself). - Add a slew of utility functions that make it more convenient (in some circumstances, anyway) to get/set values in a dictionary.
2006-09-09Adapt Matt Thomas's red-black tree implementation for use in proplib. Thisthorpej
has a significant code size savings over <sys/tree.h>. Also change prop_number_t to store all number objects in an r-b tree, only ever allocating one object for any given number (we can do this because numbers are immutable). This results in significant run-time memory savings.
2006-08-21Several changes to proplib:thorpej
- Arrays can now be externalized and internalized in the same way dictionaries can. - Add new "externalize to file" and "internalize from file" functions to make reading a property list from a file and writing a property list to a file more convenient. - Many assertions in the object implementations are gone. Instead, calling an accessor for one object type with a different object type as an argument will return a suitable "invalid" value. - prop_object_type() now returns a new PROP_TYPE_UNKNOWN value if called with a NULL object. - Externalized property lists now contain a reference to the Apple XML plist DTD. - Add a new prop_ingest(3) facility, which provides a convenient way to translate a dictionary into an arbitrary binary representation.
2006-07-05Add kernel and user space parts of a protocol for sending property liststhorpej
to / from the kernel using ioctls.
2006-04-27Initial commit of proplib, a library for manipulating property lists andthorpej
converting to/from an XML external representation (based on Apple XML property lists). Works in the kernel and user space.