summaryrefslogtreecommitdiffstats
path: root/server/util/btreemap.c
Commit message (Collapse)AuthorAgeFilesLines
* Remove unused btreemap codeStephen Gallagher2009-10-061-216/+0
| | | | | We have converted to using dhash in place of btreemap everywhere in the code.
* Do not steal memory in btreemaps.Simo Sorce2009-03-021-4/+7
| | | | | Just make sure that the memory passed in is either static or allocated on the same memory context that is parent of the btreemap.
* Implement GetUserAttributes in the InfoPipeStephen Gallagher2009-03-021-1/+3
| | | | | | | | | | | | | | | | | | This patch adds support for requesting user data in the sysdb via the InfoPipe. It currently has support for reading defined entries of integral, floating-point or string types. Tasks remaining: 1) Implement call to the provider when cache is out of date 2) Support byte arrays for userpic and similar I modified sysdb_search_ctx in sysdb_search.c to accept an array of attributes to pass into the LDB search. I also made one additional related fix: the btreemap now sorts in the correct order. Previously I had accidentally transposed the two values for sorting, so the map would always have been in exact reverse order.
* Fix confdb issues.Simo Sorce2009-02-281-9/+4
| | | | | | | | | | | Avoid uninitialized memory messages in valgrind (in _btreemap_get_keys). Do not free memory we just stored in the btree (in confdb_get_domains_list). Streamline confdb_get_domains() and remove extra calls when we already have all the information handy. Do not store basedn in domain info, the base dn is always calculated out of the domain name. Remove the "provider" attribute, it was really used only to distinguish between LOCAL and other domains, directly check for LOCAL as a special case instead.
* Refactor creation of domain_map into confdbStephen Gallagher2009-02-271-8/+38
| | | | | | | | | | | | | | | | | The NSS provider, the Data Provider backends and the InfoPipe all need access to the domain map provided by the confdb. Instead of reimplimenting it in multiple places, it is now provided in a pair of helper functions from the confdb. confdb_get_domains() returns a domain map by reference. Always returns the most up-to-date set of domains from the confdb. confdb_get_domains_list() returns an array of strings of all the domain names. Always returns the most up-to-date set of domains from the confdb. This patch also modifies the btreemap_get_keys() function to better handle memory and report allocation failures.
* Rebase the code to use talloc, tdb, tevent, ldb as externalSimo Sorce2009-02-261-0/+1
| | | | | | dependencies based on the latest samba code. Convert all references to the old events library to use the renamed tevent library.
* Enhancements and bugfixes to util/btreemap.c 1) Remove useless and unused ↵Stephen Gallagher2009-02-161-18/+28
| | | | btreemap_new() 2) Fix potentially serious memory allocation error. btreemap now requires a TALLOC_CTX to be passed in for assignment to the top node of the tree. Previously it was creating a new root TALLOC_CTX 3) Add new function btreemap_get_keys that will return a sorted array (newly allocated using talloc_realloc()) of keys (const void *) 4) Change the btreemap to use (const void *) keys instead of (void *)
* Minor change to btreemap to use an enum for the return codes of ↵Stephen Gallagher2009-01-091-16/+16
| | | | btreemap_search_key.
* btreemap.c and btreemap.h seem to be missing from an earlier commit. Adding ↵Stephen Gallagher2008-11-191-0/+175
them.