summaryrefslogtreecommitdiffstats
path: root/server/responder
Commit message (Collapse)AuthorAgeFilesLines
* Serialize requests vs backends.Simo Sorce2009-04-091-544/+702
| | | | | | | This way we do not waste resources starting searching for users/groups in multiple backends when the first one has the answer. Also prevents possible race conditions where a user named the same way is found in multiple backends and the wrong one is returned.
* Change the way we retrieve domainsSimo Sorce2009-04-087-234/+105
| | | | | | | | | | | | | To be able to correctly filter out duplicate names when multiple non-fully qualified domains are in use we need to be able to specify the domains order. This is now accomplished by the configuration paramets 'domains' in the config/domains entry. 'domains' is a comma separated list of domain names. This paramter allows also to have disbaled domains in the configuration without requiring to completely delete them. The domains list is now kept in a linked list of sss_domain_info objects. The first domain is also the "default" domain.
* Clean up warnings in SSSDStephen Gallagher2009-04-073-11/+10
|
* Unify name parsing and reposnder headersSimo Sorce2009-04-0712-243/+328
| | | | | | Use common sss_parse_name function in all responders Simplify responder headers by combining common,cmd,dp in one header and add name parse structure as part of the common responder context.
* Use info in the domain entry to determine action.Simo Sorce2009-04-071-1/+12
| | | | | This way LOCAL domains backed by files works as expected too. Tested with nss_files + pam_unix
* Add way to use files as a proxy backend fro LOCALSimo Sorce2009-04-011-28/+91
| | | | | | | | | | | | 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)
* Add a more flexible way to parse and filter names.Simo Sorce2009-04-015-280/+885
| | | | | | | | | | A new nss_parse_name function uses pcre to parse names, this makes it possible, in future, to make the filter user configurable. Add a new filter mechanism to filter out users that uses the negative cache by setting a permanet negative entry. Rework the entry points where the negative cache is checked for.
* Fix copy&paste errorSimo Sorce2009-03-271-1/+1
|
* Fix potential segfault if dp_ctx is still NULL.Simo Sorce2009-03-272-2/+18
| | | | | | | May happen at startup if, for some reason dp is very slow to start and we receive a request before a reconnection is rescheduled in the responder dp reconnection code. This shouldn't happen normally so make it clear with a debug statement.
* Make nsssrv use the common responder functionsSimo Sorce2009-03-2710-734/+221
| | | | | Make nss_ctx a private pointer of the common resp_ctx Use sss_process_init and remove all duplicate functions from nsssrv.c
* Fix uninitailized pointer and cut&paste errorSimo Sorce2009-03-271-1/+5
| | | | | | | The structure we copy the domain pointerr on is not zero when allocated. We need to zero it ourselves or we get segfaults later on. A cut&paste error caused us to call the wrong getpw function.
* Enable autoreconnection to the Data Provider in PAMStephen Gallagher2009-03-263-4/+67
|
* Refactor nss_ctx to resp_ctx in respondersStephen Gallagher2009-03-267-109/+109
|
* Fix buildSimo Sorce2009-03-242-1/+4
| | | | forgot to commit a few changes
* Retrieve some options from confdbSimo Sorce2009-03-203-11/+46
| | | | This fixes some old 'Fixme's :)
* Enhance server_setupSimo Sorce2009-03-203-2/+4
| | | | | | | Now it can load from scratch default configuration that is valid for all daemons. First thing, make it possible for each daemon/provider to set its own debug level in its configuration entry.
* added response type PAM_ENV_ITEM and integrated response data into dbus messagesSumit Bose2009-03-202-19/+98
|
* use pam_data as main data structure for dbus communicationSumit Bose2009-03-193-27/+85
|
* Fix getgrent and getpwent callsSimo Sorce2009-03-181-2/+6
| | | | | | When I converted from using just the domain name to passing down the info structure I goofed how to test if we were willing to attach the local domain to the user/group names or not.
* Implement Negative cache for NSSSimo Sorce2009-03-135-3/+570
| | | | | | | As for positive caches, negative caches are implement for all queries except enumerations. Also set the correct requires in sssd.spec as we now depend directly on tdb as well.
* remove an unnecessary call to confdbSumit Bose2009-03-111-8/+4
|
* Fix returning user with missing optional attributes.Simo Sorce2009-03-101-5/+8
| | | | | | | | | 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.
* added generic PAM return messages and a false login delaySumit Bose2009-03-106-65/+151
|
* Treat uids and gids as 32 bit numbers not 64Simo Sorce2009-03-101-23/+21
| | | | | | In the nss communication protocol we were treating uids and gids as 64 bit values, but uids and gids are really u32 values, change the protocol to reflect the real size.
* Always pass sss_domain_info to sysdb functions.Simo Sorce2009-03-092-30/+18
|
* Do not duplicate attribute names macros.Simo Sorce2009-03-091-2/+2
| | | | Also shorten names oh other user attributes.
* use fixed paths to sockets to make sure clients and server are using the sameSumit Bose2009-03-096-59/+76
|
* Fix reporting non-default users.Simo Sorce2009-03-062-301/+314
| | | | | 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-052-17/+17
| | | | Also unify SYSDB_PW_NAME and SYSDB_GR_NAME in SYSDB_NAME and make it "name"
* Implement GetCachedUsers in the InfoPipeStephen Gallagher2009-03-051-2/+2
| | | | | | | | | | | | | 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.
* added password reset by rootSumit Bose2009-03-051-0/+5
|
* added a privileged pipeSumit Bose2009-03-056-8/+137
|
* Add enumeration backout period.Simo Sorce2009-03-043-2/+39
| | | | | | | | | If an enumeration has been requested recently enough, force the nss responder to read from the cache and not go out to each backend and do slow network operations. This greatly improves performances if enumerations are used often. Currently the balcout period is harcoded to 2 min, we will need to make it a configurable option.
* Simplify some aspects of pam_LOCAL_domainSimo Sorce2009-03-043-138/+87
| | | | | | | | | | Use only one context (the local request) for all functions. Use new helper function in sysdb to set numbers as sysdb_attrs values. Do not use pam_status to report internal errors, use an error variable and check it only when we finally reply. Use sysdb_error_to_errno() to convert and ldb error to errno. Do not free every single buffer allocated, they are all appended to the local request and will be automatically freed once the request is finished.
* replaced pure ldb calls with sysdb callsSumit Bose2009-03-033-120/+309
|
* first version of LOCAL pam backendSumit Bose2009-03-025-2/+354
|
* Fix confdb issues.Simo Sorce2009-02-281-5/+5
| | | | | | | | | | | Avoid uninitialized memory messages in valgrind (in _btreemap_get_keys). Do not free memory we just stored in the btree (in confdb_get_domains_list). Streamline confdb_get_domains() and remove extra calls when we already have all the information handy. Do not store basedn in domain info, the base dn is always calculated out of the domain name. Remove the "provider" attribute, it was really used only to distinguish between LOCAL and other domains, directly check for LOCAL as a special case instead.
* Refactor creation of domain_map into confdbStephen Gallagher2009-02-274-168/+31
| | | | | | | | | | | | | | | | | The NSS provider, the Data Provider backends and the InfoPipe all need access to the domain map provided by the confdb. Instead of reimplimenting it in multiple places, it is now provided in a pair of helper functions from the confdb. confdb_get_domains() returns a domain map by reference. Always returns the most up-to-date set of domains from the confdb. confdb_get_domains_list() returns an array of strings of all the domain names. Always returns the most up-to-date set of domains from the confdb. This patch also modifies the btreemap_get_keys() function to better handle memory and report allocation failures.
* Serialize access to sysdb and also exposes ldb transactions.Simo Sorce2009-02-262-30/+53
| | | | | | 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-269-59/+59
| | | | | | dependencies based on the latest samba code. Convert all references to the old events library to use the renamed tevent library.
* Add PAM responderSumit Bose2009-02-2417-0/+5087
Also move responders under server/responder with shared code in server/responder/common Signed-off-by: Simo Sorce <ssorce@redhat.com>