summaryrefslogtreecommitdiffstats
path: root/server/responder
Commit message (Collapse)AuthorAgeFilesLines
* Fix segfaultSimo Sorce2009-10-271-1/+1
| | | | | | Fix copy/paste error that picked up the wrong request structure to pass down. This was causing the talloc code that checks for the right signature to fail and abort as the 2 request structures have different state structures attacched.
* Use standard coding practice to set last loginSimo Sorce2009-10-271-90/+128
| | | | | | | | | This rewrite should also fix a segfault in the code that may happen when exiting in case of error conditions. The previous code was attaching the transaction handle to llreq structure and then calling prepare_reply() from within the request handlers which could ultimately free the preq and llreq and handle before the transaction request was actually completed by tevent.
* Add support for offline auth cache timeoutStephen Gallagher2009-10-224-3/+192
| | | | | | | | | 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.
* Add pam_ctx (similar to nss_ctx) for storing global PAM configStephen Gallagher2009-10-222-5/+25
|
* Remove two unused functions.Stephen Gallagher2009-10-152-18/+0
| | | | | | These functions were used when reconnecting to the DP after losing the connection. Since there is no DP any longer, there's no reason to have these functions.
* Fix offline authenticationSimo Sorce2009-10-151-16/+3
| | | | | | | | The way we were processing errors from the provider caused offline authentication to stop working. Previously the problem was masked by a bug in the data provider that always returned "Success" for any operation no matter what the actual return code was. when DP got removed the bug became evident.
* Remove DP processSimo Sorce2009-10-096-72/+121
| | | | | Turn the backend process into data provider servers Make Frontends (pam, nss) directly attach to the backends
* Remove unused btreemap codeStephen Gallagher2009-10-064-4/+0
| | | | | We have converted to using dhash in place of btreemap everywhere in the code.
* Make dp requests more robustSimo Sorce2009-10-051-36/+109
| | | | | | | This should fix #218 It should also prevent us from leaking memory in case the original request times out and should prevent races with the callbacks beeing freed after sdp_req is freed and thus dereferencing freed memory in the callbacks detructors.
* Fix infinite loop with empty group enumerationStephen Gallagher2009-09-291-13/+15
| | | | | | Loop control variable was not being incremented. I also converted a goto loop into a do...while loop to make it easier to follow the logic.
* Send debug messages to logfileJakub Hrozek2009-09-252-2/+6
| | | | | | | | | | | | | Introduces a new option --debug-to-files which makes SSSD output its debug information to a file instead of stderr, which is still the default. Also introduces a new confdb option debug_to_files which does the same, but can be specified per-service in the config file. The logfiles are stored in /var/log/sssd by default. Changes the initscript to log to files by default.
* Upgrade confdb to version 2Stephen Gallagher2009-09-254-30/+47
| | | | | This converts a great many configuration options to the new standard format.
* Revert "Use syslog for logging error conditions in SSSD"Stephen Gallagher2009-09-239-104/+88
| | | | | | | | This reverts commit 8c50bd085c0efe5fde354deee2c8118887aae29d. Amended: commit 1016af2b1b97ad4290ccce8fa462cc7e3c191b2e also made use of the SYSLOG_ERROR() macro, so those portions of that code also needed to be reverted.
* Use syslog for logging error conditions in SSSDJakub Hrozek2009-09-219-88/+104
| | | | | This is just a band-aid until ELAPI is fully functional and ready to use.
* make cli_pid mandatory and increase version number of pam protocolSumit Bose2009-09-141-1/+25
|
* Let the PAM client send its PIDSumit Bose2009-09-141-0/+19
| | | | | | - the client sends the PID as uint32_t and sssd will use uint32_t too - fix a possible type issue where a uint32_t is sent as int32 in internal dbus communication
* Fix getgrnam and getgrgid callsSimo Sorce2009-09-111-7/+9
| | | | | The patch that added check_cache() broke them, no results returned for any group with actual members ...
* Add copyright noticesJakub Hrozek2009-09-112-0/+42
| | | | Fixes: #138
* Add support for the EntryCacheNoWaitRefreshTimeoutStephen Gallagher2009-09-093-2/+53
| | | | | | | | This timeout specifies the lifetime of a cache entry before it is updated out-of-band. When this timeout is hit, the request will still complete from cache, but the SSSD will also go and update the cached entry in the background to extend the life of the cache entry and reduce the wait time of a future request.
* Consolidate cache lookups in the NSSStephen Gallagher2009-09-091-177/+93
| | | | | | getpwnam, getpwuid, getgrnam and getgrgid will now use a common function, check_cache, for determining whether to return a cached value or to go to the provider.
* Split database in multiple filesSimo Sorce2009-09-086-30/+227
| | | | | The special persistent local database retains the original name. All other backends now have their own cache-NAME.ldb file.
* Fix two possible uninitialized valuesSimo Sorce2009-09-081-3/+4
| | | | Make counter for used messages explicit.
* Turn enumeration into a boolean valueSimo Sorce2009-08-312-8/+4
|
* Fix group replies when using member/memberofSimo Sorce2009-08-273-197/+180
| | | | Also remove legacy memberuid support
* fix handling of filtersUsers in groupsSumit Bose2009-08-213-31/+44
| | | | | | | | - with the boolean option filterUsersInGroups it can be controlled wether filtered users appear in groups or not. - fixed an error which prevented the display of groups with filtered members - removed some tab indents
* added missing hash_create which was remove by a previous patchSumit Bose2009-08-181-5/+14
|
* Fix reconnection codeSimo Sorce2009-08-178-209/+116
| | | | | | | Remove redundant reconnection code that was interfeering with the sbus reconnection code. Consolidate include files for sbus relates operations. Make pamsrv code similar to nsssrv code.
* Refactor responder_dp.cStephen Gallagher2009-08-144-117/+117
| | | | | | Many of the functions in responder_dp.c were originally NSS- specific and were moved there from the NSS responder code. Since they are now generic to any responder, rename them to sss_dp_*
* Don't go to the backend for identical cache entry requestsStephen Gallagher2009-08-142-54/+294
| | | | | | | | | Currently, if an additional request comes in for a cache entry while that same entry is already in the process of being refreshed, we start a duplicate cache update request. This patch adds allows the cache to maintain a hash table of all in-progress requests and queue up multiple callbacks for updates in progress. Once the data is returned, all of these callbacks will fire.
* Eliminate unnecessary explicit timeout for DP account requestsStephen Gallagher2009-08-121-33/+19
| | | | | | | D-BUS handles timeouts itself and reports DBUS_ERROR_NO_REPLY if a timeout fires, so we can rely on this instead of having an explicit timeout ourselves. Furthermore, the two timeouts present a potential race condition.
* Change the why DP clients identifySimo Sorce2009-08-119-143/+69
| | | | Mirrors what we have done with the monitor.
* Change services identification mechanismSimo Sorce2009-08-114-150/+24
| | | | | | | Let services identify themselves voiluntarily as the first operation instead of polling from the monitor. Also consolidate some common functions and make them available as monitor helpers.
* Make child processes exit when parent diesJakub Hrozek2009-08-112-0/+12
| | | | | | | | The child processes call prctl() and when their parent process is killed, they are sent SIGTERM using prctl. This is currently Linux-specific, for non-Linuxes, a similar effect is achieved by catching a set of common termination signals and sending SIGTERM to the process group.
* Make socket paths a compile-time optionStephen Gallagher2009-08-112-2/+0
| | | | | | Previously, we had hardcoded the paths for the NSS, PAM and private PAM sockets to /var/lib/sss/pipes. With this patch, we will specify the sockets with --with-pipe-path.
* Simplify interfaces initializationSimo Sorce2009-08-109-100/+86
| | | | | | | Make as much as possible static, and remove use of talloc_reference and allocation/deallocation of memory when not necessary. Fix also responder use of rctx->conn, was mistakenly used for both monitor and dp connections.
* merge server and connection structuresSimo Sorce2009-08-102-4/+4
| | | | | | This reduce code duplication as it allows to use one set of watch and timeout functions, and at the same time also allow not to use a secondary structure just to unify these functions.
* Cosmetic changesSimo Sorce2009-08-107-51/+51
| | | | | Rationalize and rename connection names in preparatoin for merging of server and connection structures.
* Remove redundant memory contextsSimo Sorce2009-08-106-30/+36
| | | | Simplify code by removing stuff that is never used or redundant.
* Move parsing of names and domains into util/Jakub Hrozek2009-08-052-120/+1
|
* Address CVE-2009-2410Stephen Gallagher2009-07-291-1/+1
| | | | Fix incorrect error code return in local_handler_callback
* Raise debug level for version negotiationSimo Sorce2009-07-201-2/+2
|
* Implement resInit for monitor, NSS, PAM, DP and the backendsStephen Gallagher2009-07-202-0/+40
|
* Rework transaction code to use tevent_reqSimo Sorce2009-07-031-31/+84
| | | | | | 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.
* Rename sysdb_req to sysdb_handle.Simo Sorce2009-07-032-12/+6
| | | | | | | | | 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.
* check pending_return after dbus_connection_send_with_replySumit Bose2009-07-022-2/+2
|
* added kerberos backend with tevent_req event handlingSumit Bose2009-07-021-1/+19
|
* fix detection of authentication against LOCAL domainSumit Bose2009-06-081-3/+9
|
* Fix user enumeration bugSimo Sorce2009-05-281-4/+0
| | | | | | The previous patch to fix an enumeration bug found with group enumeration inadvertently introduced a bug with user enumeration. Yeah, almost funny!
* special-case NSS calls in PAM codeJakub Hrozek2009-05-281-2/+2
|
* Fix enumerations (bug #42)Simo Sorce2009-05-271-12/+76
| | | | | | | | | | If a backend had all its results filtered in fill_pwent or fill_grent then we would return an empty result, which means "end of results" to the client. Now we return ENOENT and let callers decide what to do. Also make sure we do not grow packets unless we are going to fill them as that's a recipe for killing the client as the size passed to sss_packet_grow is used to determine the size of the final packet.