summaryrefslogtreecommitdiff
path: root/server/db/sysdb.h
AgeCommit message (Collapse)AuthorFilesLines
2009-11-20Optimize sysdb_enumgrentSimo Sorce1-3/+7
This brings down the time needed to enumerate my group database from 2.4 seconds to 0.15 seconds.
2009-11-20Improve handling of ccache filesSumit Bose1-0/+1
- save current ccache file to sysdb - use the saved ccache file if the user has running processes - create an empty ccache if offline - return enviroment variables if offline
2009-11-18Change initgroups code to use and check the cacheSimo Sorce1-22/+11
We were previously always ending up contacting the backend because we had no way to know if an initgroups call for the same user had ever been called. Add attribute to hold this information and rely on backends to update it. If they don't we fallback to the previous behvior of asking the backend.
2009-11-10Refactor delete functions and add a fewSimo Sorce1-18/+37
Refactor user/group delete functions so that they can be used without a transaction (they autostart an operation). Add user and group search function where a subfilter can be specified.
2009-11-07added access module of IPA providerSumit Bose1-0/+4
2009-11-06Always set last update and expire timeSimo Sorce1-2/+4
modifications to existing users/groups were setting metadata, but creation was not. Fixes #259
2009-11-06Make available method to quickly retrive stringSimo Sorce1-0/+3
sysdb_attrs has a lot of methods to add them but very little to get information out. Start adding a way to retrieve a single valued attribute as a string.
2009-11-04Add sysdb_attrs_replace_name to sysdb API.Sumit Bose1-0/+3
2009-11-03Rename sdap_id_map to sdap_attr_mapSimo Sorce1-0/+3
Also start adding some infrastructure to use the USN counter when available. In particular add a place to add generic attrs mapping, ie attributes that are neither user nor group specific.
2009-11-02add sysdb_delete_recursive request to sysdb APISumit Bose1-0/+10
2009-10-29Allow sysdb_search_entry request to return more than one resultSumit Bose1-1/+2
2009-10-29added a ASQ search API for sysdbSumit Bose1-0/+12
2009-10-27Move responsibility for entry expiration timeoutSimo Sorce1-8/+12
The providers are now responsible for determining how long a cached entry is considered valid. The default is the same as before (600s)
2009-10-22Add support for offline auth cache timeoutStephen Gallagher1-0/+1
This adds a new option (offline_credentials_expiration) to the [PAM] section of the sssd.conf If the user does not perform an online authentication within the timeout (in days), they will be denied auth once the timeout passes.
2009-10-22add store/search/delete interface for custom sysdb objectsSumit Bose1-0/+35
2009-09-11Complete the removal of "legacy" option.Simo Sorce1-1/+5
The code was still dependent on it for the ldap driver. Changed the driver code to depend on the schema type. Fix defaults for user and groups trees. ATM if you use the rfc2307bis schema you have to put users and groups in 2 separate trees (what people does by default anyway. If this limitation will turn to be too hard, we will change this later.
2009-09-08Split database in multiple filesSimo Sorce1-2/+16
The special persistent local database retains the original name. All other backends now have their own cache-NAME.ldb file.
2009-08-28Speed-up enumerations.Simo Sorce1-1/+5
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-27Remove redunant function and always pass attrs.Simo Sorce1-15/+4
2009-08-27Always save using member/memberOfSimo Sorce1-6/+8
First pass to remove the legacy option and make it just a property of the provider
2009-08-21store additional LDAP attributesSumit Bose1-0/+13
If available the original DN and the user principle will be stored in sysdb.
2009-08-05Consolidate tevent helpersJakub Hrozek1-26/+0
2009-07-31Add ignore_not_found parameter to sysdb delete functionsJakub Hrozek1-3/+6
Also add tests
2009-07-08Implement the ldap identity module.Simo Sorce1-7/+15
This uses and exapands the async helpers.
2009-07-08Unify password caching ops in sysdbSimo Sorce1-7/+20
2009-07-08Add async helper functionsSimo Sorce1-0/+7
These functions use the tevent_req async model, where a pair of _send/_recv functions pilot requests, with additional helpers like _done functions, and where needed multiple stage helpers.
2009-07-08Expose sysdb function to parse sysdb_attrsSimo Sorce1-0/+2
2009-07-03Rework transaction code to use tevent_reqSimo Sorce1-106/+265
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-21/+21
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-05-19added prototype for sysdb_set_cached_passwordSumit Bose1-0/+6
2009-05-18Move actual password caching into sysdbSimo Sorce1-1/+0
Convert auth modules to do the caching themselves
2009-05-04Fixes for porting SSSD to Debian-based platformsStephen Gallagher1-1/+0
2009-04-27Use different attribute for cached passwordsSimo Sorce1-0/+2
This fixes a bug with legacy backends where the cached password would be cleared on a user update. Using a different attribute we make sure a userPassword coming from the remote backend does not interfere with a cachedPassword (and vice versa).
2009-04-13Always pass full domain infoSimo Sorce1-7/+9
Change sysdb to always passwd sss_domain_info, not just the domain name. This way domain specific options can always be honored at the db level.
2009-04-01Add way to use files as a proxy backend fro LOCALSimo Sorce1-2/+3
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-10Fix returning user with missing optional attributes.Simo Sorce1-2/+2
Gecos, homedir and shell are optional, fix the responder not to refuse to return the user completely if they are missing, replace an empty homedir with "/". Also fix fullname vs gecos, and always return gecos for NSS data. On user creation set gecos to the same value as the user Full Name, to help populate the gecos field with data that makes sense.
2009-03-10If a domain is MPG enabled return users a groupsSimo Sorce1-0/+4
Turn user entries to Magic Private Groups when groups are quesried.
2009-03-09Always pass sss_domain_info to sysdb functions.Simo Sorce1-16/+8
2009-03-09Move MPG checks within sysdb.Simo Sorce1-10/+15
This allows to perform checks and modifications in one transaction. Uses configuration stored in confdb to determins if a domain uses MPGs.
2009-03-09Do not duplicate attribute names macros.Simo Sorce1-21/+18
Also shorten names oh other user attributes.
2009-03-09Implement SetGroupGID in the InfoPipeStephen Gallagher1-0/+5
2009-03-06Implement CreateUser in InfoPipeStephen Gallagher1-1/+1
Changed the order of the arguments to CreateUser in the Introspection XML to match the other functions (domain belongs second on the list) A few other minor fixes as well: Fixed a typo in SYSDB_GETCACHED_FILTER and sysdb_transaction_end(). Added missing error handling in infp_do_user_set_uid().
2009-03-06Fix reporting non-default users.Simo Sorce1-0/+4
We need to add the domain when users are not part of the default domain, otherwise name conflicts may happen.
2009-03-05Remove _PW_ and _GR_ from SYSDB_ definesSimo Sorce1-27/+24
Also unify SYSDB_PW_NAME and SYSDB_GR_NAME in SYSDB_NAME and make it "name"
2009-03-05Implement GetCachedUsers in the InfoPipeStephen Gallagher1-0/+3
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-05Add functions to add regular users and groupsSimo Sorce1-0/+13
Calulates next id automatically if uid/gid are not specified. Fixes to sysdb_get_next_available_id. Add tests to create users and groups through the new functions.
2009-03-04Add internal min/max/next id management fucntionsSimo Sorce1-1/+8
Retrieve minID and maxID from domain configuration so that lower and upper bounds can be set per domain. Add function that keeps track of the next available id, increments and returns it on requests, avoiding collisions with existing ids.
2009-03-04Improve sysdbSimo Sorce1-25/+51
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-1/+21
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-02Implement GetUserAttributes in the InfoPipeStephen Gallagher1-0/+31
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.