summaryrefslogtreecommitdiff
path: root/server/db/sysdb_search.c
AgeCommit message (Collapse)AuthorFilesLines
2009-11-20Optimize sysdb_enumgrentSimo Sorce1-329/+18
This brings down the time needed to enumerate my group database from 2.4 seconds to 0.15 seconds.
2009-10-09Remove magicPrivateGroups optionSimo Sorce1-5/+5
In sssd only local is a native mpg domain, and it is forced. All other providers will have to unroll mpg users into a user/group pair of entries in the db. This allows the provider to automatically establish if the remote server provides mpg users w/o possibily conflicting manual configurations on the client trying to force an mpg behavior where none is provided.
2009-08-28Speed-up enumerations.Simo Sorce1-1/+162
This patch reduces the time needed to enumerate groups of a midsized domain from 12 seconds to 4.4 Optimizes enumerations by doing only 2 ldb searches and some ordering instead of a number of searches proportional to the number of groups
2009-08-27Always save using member/memberOfSimo Sorce1-62/+1
First pass to remove the legacy option and make it just a property of the provider
2009-07-03Rework transaction code to use tevent_reqSimo Sorce1-17/+105
This is part of a set of patches to rewrite sysdb to a hopefully better API, that will also let use use tevent_req async style calls to manipulate our cache.
2009-07-03Rename sysdb_req to sysdb_handle.Simo Sorce1-10/+10
This sysdb_req has always really been a transaction handle and not a request. This is part of a set of patches to rewrite transaction support in sysdb to a hopefully better API, that will also let use use tevent_req async style to manipulate our cache.
2009-04-01Add way to use files as a proxy backend fro LOCALSimo Sorce1-1/+1
Makes LOCAL a normal backend removing some special handling. Fix/Add id range filtering and name filtering Filters uid=0 and gid=0 in the proxy backend as 0 is invalid within sysdb and was causing getxxent calls to fail completely. Fix nss_ncache_check_xxx calls to avoid dirtying the 'ret' variable and causing some unwanted failures. Change sysdb to always return the uid number when searching member entries so that id range filtering can be perfomed also in group searhes (does not work with legacy backends)
2009-03-10If a domain is MPG enabled return users a groupsSimo Sorce1-15/+69
Turn user entries to Magic Private Groups when groups are quesried.
2009-03-10Fix bugs in functions dealing with groupsSimo Sorce1-0/+6
Fix infinite loop within initgr functions. Fix min length check copy&paste error, was filtering valid groups if the name was short enough and the group had no members.
2009-03-09Always pass sss_domain_info to sysdb functions.Simo Sorce1-41/+27
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.