summaryrefslogtreecommitdiffstats
path: root/server/db/sysdb.h
Commit message (Collapse)AuthorAgeFilesLines
* added prototype for sysdb_set_cached_passwordSumit Bose2009-05-191-0/+6
|
* Move actual password caching into sysdbSimo Sorce2009-05-181-1/+0
| | | | Convert auth modules to do the caching themselves
* Fixes for porting SSSD to Debian-based platformsStephen Gallagher2009-05-041-1/+0
|
* Use different attribute for cached passwordsSimo Sorce2009-04-271-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).
* Always pass full domain infoSimo Sorce2009-04-131-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.
* Add way to use files as a proxy backend fro LOCALSimo Sorce2009-04-011-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)
* Fix returning user with missing optional attributes.Simo Sorce2009-03-101-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.
* If a domain is MPG enabled return users a groupsSimo Sorce2009-03-101-0/+4
| | | | Turn user entries to Magic Private Groups when groups are quesried.
* Always pass sss_domain_info to sysdb functions.Simo Sorce2009-03-091-16/+8
|
* Move MPG checks within sysdb.Simo Sorce2009-03-091-10/+15
| | | | | This allows to perform checks and modifications in one transaction. Uses configuration stored in confdb to determins if a domain uses MPGs.
* Do not duplicate attribute names macros.Simo Sorce2009-03-091-21/+18
| | | | Also shorten names oh other user attributes.
* Implement SetGroupGID in the InfoPipeStephen Gallagher2009-03-091-0/+5
|
* Implement CreateUser in InfoPipeStephen Gallagher2009-03-061-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().
* Fix reporting non-default users.Simo Sorce2009-03-061-0/+4
| | | | | We need to add the domain when users are not part of the default domain, otherwise name conflicts may happen.
* Remove _PW_ and _GR_ from SYSDB_ definesSimo Sorce2009-03-051-27/+24
| | | | Also unify SYSDB_PW_NAME and SYSDB_GR_NAME in SYSDB_NAME and make it "name"
* Implement GetCachedUsers in the InfoPipeStephen Gallagher2009-03-051-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.
* Add functions to add regular users and groupsSimo Sorce2009-03-051-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.
* Add internal min/max/next id management fucntionsSimo Sorce2009-03-041-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.
* Improve sysdbSimo Sorce2009-03-041-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.
* Provide sysdb_set_user_attr() functions.Simo Sorce2009-03-031-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.
* Implement GetUserAttributes in the InfoPipeStephen Gallagher2009-03-021-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.
* first version of LOCAL pam backendSumit Bose2009-03-021-0/+1
|
* Expose some more functions needed by the testsSimo Sorce2009-02-281-1/+12
|
* Convert sync calls in sysdb to async, transaction dependent, calls.Simo Sorce2009-02-281-51/+58
|
* Serialize access to sysdb and also exposes ldb transactions.Simo Sorce2009-02-261-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.
* Rebase the code to use talloc, tdb, tevent, ldb as externalSimo Sorce2009-02-261-8/+8
| | | | | | dependencies based on the latest samba code. Convert all references to the old events library to use the renamed tevent library.
* Reorganize sysdb a bit,Simo Sorce2009-02-201-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
* Always pass teh database path explicitly, so that test cases can useSimo Sorce2009-02-131-3/+4
| | | | | throw away databases Check version and init main db if empty
* - make all functions supposed to get input in posix formatSimo Sorce2009-02-121-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
* Added sysdb_remove_group_posix and sysdb_remove_group_posix_by_gidStephen Gallagher2009-02-121-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.
* Add support for removing members from groups. Updated convenience functions ↵Stephen Gallagher2009-02-121-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.
* Add sysdb_add_group_to_posix_group, refactored sysdb_add_acct_to_posix_group ↵Stephen Gallagher2009-02-121-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.
* Adding sysdb_add_acct_to_posix_group and associated unit testsStephen Gallagher2009-02-121-2/+12
|
* Adding sysdb_store_group_posix with unit testStephen Gallagher2009-02-121-3/+8
|
* Regroup database rleated functions under db andSimo Sorce2009-01-121-0/+148
rename everything with the sysdb suffix.