summaryrefslogtreecommitdiff
path: root/server/util/btreemap.c
AgeCommit message (Collapse)AuthorFilesLines
2009-10-06Remove unused btreemap codeStephen Gallagher1-216/+0
We have converted to using dhash in place of btreemap everywhere in the code.
2009-03-02Do not steal memory in btreemaps.Simo Sorce1-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.
2009-03-02Implement GetUserAttributes in the InfoPipeStephen Gallagher1-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.
2009-02-28Fix confdb issues.Simo Sorce1-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.
2009-02-27Refactor creation of domain_map into confdbStephen Gallagher1-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.
2009-02-26Rebase the code to use talloc, tdb, tevent, ldb as externalSimo Sorce1-0/+1
dependencies based on the latest samba code. Convert all references to the old events library to use the renamed tevent library.
2009-02-16Enhancements and bugfixes to util/btreemap.c 1) Remove useless and unused ↵Stephen Gallagher1-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 *)
2009-01-09Minor change to btreemap to use an enum for the return codes of ↵Stephen Gallagher1-16/+16
btreemap_search_key.
2008-11-19btreemap.c and btreemap.h seem to be missing from an earlier commit. Adding ↵Stephen Gallagher1-0/+175
them.