summaryrefslogtreecommitdiff
path: root/server/db/sysdb_search.c
AgeCommit message (Collapse)AuthorFilesLines
2009-03-05Remove _PW_ and _GR_ from SYSDB_ definesSimo Sorce1-1/+1
Also unify SYSDB_PW_NAME and SYSDB_GR_NAME in SYSDB_NAME and make it "name"
2009-03-05Implement GetCachedUsers in the InfoPipeStephen Gallagher1-1/+6
This function allows a caller to retrieve a list of users who have logged in on the system, specifying an optional minimum last login time to trim the list. I modified sysdb_enumpwent to accept an optional search argument. GetCachedUsers takes advantage of this argument to limit the search by the last login time. I also found and fixed a few additional low-memory conditions around D-BUS message replies.
2009-03-04Improve sysdbSimo Sorce1-6/+0
Add comments in header files to better explain interfaces and intended usage. Expose function to convert from ldb errors to errnos. Add sysdb_attrs helper to add a long integer as a value.
2009-03-03Provide sysdb_set_user_attr() functions.Simo Sorce1-2/+3
Provide also helper functions to build struct sysdb_attrs. Also fix sysdb_get_user_attr() to have a consistent interface as all other functions.
2009-03-02Unify pwd_search and user_searchSimo Sorce1-35/+11
2009-03-02Implement GetUserAttributes in the InfoPipeStephen Gallagher1-0/+61
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-28Convert sync calls in sysdb to async, transaction dependent, calls.Simo Sorce1-20/+20
2009-02-26Serialize access to sysdb and also exposes ldb transactions.Simo Sorce1-0/+731
This is necessary because in ldb only 1 transaction per context is possible and all operations (or new transactions) are nested within it. Will revisit this later when ldb will addresses the problem.