summaryrefslogtreecommitdiff
path: root/server/db/sysdb.h
AgeCommit message (Collapse)AuthorFilesLines
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.
2009-03-02first version of LOCAL pam backendSumit Bose1-0/+1
2009-02-28Expose some more functions needed by the testsSimo Sorce1-1/+12
2009-02-28Convert sync calls in sysdb to async, transaction dependent, calls.Simo Sorce1-51/+58
2009-02-26Serialize access to sysdb and also exposes ldb transactions.Simo Sorce1-13/+1
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.
2009-02-26Rebase the code to use talloc, tdb, tevent, ldb as externalSimo Sorce1-8/+8
dependencies based on the latest samba code. Convert all references to the old events library to use the renamed tevent library.
2009-02-20Reorganize sysdb a bit,Simo Sorce1-36/+51
rename _posix_ function into _legacy_ Add support for the posix legacy mode where memberships are stored in memberUId and not in member/memberof pairs. Do not build sysdb as a library
2009-02-13Always pass teh database path explicitly, so that test cases can useSimo Sorce1-3/+4
throw away databases Check version and init main db if empty
2009-02-12- make all functions supposed to get input in posix formatSimo Sorce1-50/+47
use the same namespace (sysdb_posix_) - no need to explicitly start a transaction if only one operation is performed using a synchronous interface - split _add_remove_ functions into separate functions, don't let ldap madness creep into out interfaces
2009-02-12Added sysdb_remove_group_posix and sysdb_remove_group_posix_by_gidStephen Gallagher1-0/+8
Fixed a few small bugs in sysdb_[store|remove]_account_posix. The string "uid=" needed to be replaced with SYSDB_PW_NAME, and the search scope in sysdb_remove_account_posix_by_uid needed to be LDB_SCOPE_ONELEVEL, not LDB_SCOPE_BASE. Added associated unit tests. Modified the unit test structure so that it is called as a single suite, rather than a User and Group suite, since there is too much overlap.
2009-02-12Add support for removing members from groups. Updated convenience functions ↵Stephen Gallagher1-16/+27
for adding/removing user accounts and POSIX groups to the groups. Also modified the add/remove member functions to be a single interface taking a flag for add or removal, since the code only differs by one LDB flag. Added associated unit tests.
2009-02-12Add sysdb_add_group_to_posix_group, refactored sysdb_add_acct_to_posix_group ↵Stephen Gallagher1-0/+11
to now use sysdb_add_member_to_posix_group along with sysdb_add_member_to_posix_group. Added new unit tests to sysdb-tests.c for groups of groups.
2009-02-12Adding sysdb_add_acct_to_posix_group and associated unit testsStephen Gallagher1-2/+12
2009-02-12Adding sysdb_store_group_posix with unit testStephen Gallagher1-3/+8
2009-01-12Regroup database rleated functions under db andSimo Sorce1-0/+148
rename everything with the sysdb suffix.