summaryrefslogtreecommitdiffstats
path: root/server/responder
Commit message (Collapse)AuthorAgeFilesLines
* Rename server/ directory to src/Stephen Gallagher2010-02-1816-7801/+0
| | | | Also update BUILD.txt
* Eliminate separate build tree for sss_clientStephen Gallagher2010-02-182-2/+2
|
* Supress warnings with -O2Jakub Hrozek2010-02-181-2/+1
|
* Make attr_type an integerStephen Gallagher2010-02-151-3/+3
| | | | | | Previously it was a string being passed and converted into an integer. It will be more efficient this way (and simpler for other implementers)
* Make return values more specific during password changeSumit Bose2010-02-101-34/+52
| | | | | | | - return PAM_AUTHTOK_ERR instead of PAM_SYSTEM_ERR if the password change operation fails - send a message to the user if the system is offline and the password cannot be changed
* Send a message to the user if the login is delayedSumit Bose2010-02-101-3/+24
|
* Added option to use libcrypto instead of NSS.George McCollister2010-02-051-1/+1
| | | | | | | | | | | | crypto_sha512crypt.c is a clone of nss_sha512crypt.c with the exception that all usage of NSS and related libraries has been switched to libcrypto. I renamed nss_sha512crypt.h to sha512crypt.h since it is common to both crypto_sha512crypt.c and nss_sha512crypt.c. Note that the random number generator is not seeded manually and thus relies on seeding done automatically by libcrypto. On some systems without /dev/urandom seeding may not be performed. See http://www.openssl.org/docs/crypto/RAND_add.html. Signed-off-by: George McCollister <georgem@novatech-llc.com>
* Warn the user if authentication happens offlineSumit Bose2010-02-021-1/+19
|
* Add offline failed login counterSumit Bose2010-02-021-6/+7
|
* Avoid 'PAM' at the beginning of define and enum namesSumit Bose2010-02-012-17/+17
|
* Fix size error on 64-bit systemsStephen Gallagher2010-01-251-1/+1
|
* Pointers to non 32 bit aligned data were being cast to uint32_t *George McCollister2010-01-222-9/+11
| | | | | | | | uint32_t pointers must point to 32 bit aligned data on ARM. Instead of padding the data to force it into alignment I altered the code to memcpy the data to an aligned location. I'd appreciate any and all feedback especially on whether I took the best approach. pam_test_client auth and pam_test_client acct now work on my armeb-xscale-linux-gnueabi target. Signed-off-by: George McCollister <georgem@opteron.novatech-llc.com>
* Fix a double free bugSumit Bose2010-01-201-3/+0
|
* Add sysdb request to authenticate against a cached passwordSumit Bose2010-01-204-216/+59
| | | | | | | | | The code for authentication against a cached password is moved from the pam responder to a generic sysdb tevent request. The new code can be used by other components of sssd to verify passwords on their own. Tests for the sysdb_cache_password and sysdb_cache_auth request are added and some unneeded or unused code and variables are removed.
* Don't free timer events within the handler.Simo Sorce2010-01-051-16/+12
| | | | | | | Tevent frees timer handlers once done, so freeing the timer within the event is going to cause double frees. Just attach the timer event to the request it depends on and make sure to steal it on NULL if we are going to free the request from within the handler.
* Fix broken password changes for local usersStephen Gallagher2009-12-181-1/+6
|
* Handle chauthtok with PAM_PRELIM_CHECK separatelySumit Bose2009-12-181-0/+6
| | | | | | If pam_sm_chauthtok is called with the flag PAM_PRELIM_CHECK set we generate a separate call to the sssd to validate the old password before asking for a new password and sending the change password request.
* Add DEBUG messages to getpwnam_callback and getpwuid_callbackStephen Gallagher2009-12-171-0/+4
| | | | This matches the DEBUG logging available for groups.
* dhash: Add private pointer for delete callbackSimo Sorce2009-12-081-1/+1
| | | | | Also pass a flag to the delete callback to tell it if this is a normal entry removal or we are cleaning up the tbale definitively.
* Fix potential uninitialized value error in responder_dp.cStephen Gallagher2009-12-081-1/+1
| | | | | | If we fell into the default case of the switch statement, we would attempt to talloc_free() a random memory location. This patch guarantees that sdp_req is NULL if it has not been initialized.
* Fix potential uninitialized value errors in nsssrv_cmd.cStephen Gallagher2009-12-081-1/+2
|
* Use the custom password field in groups too.Simo Sorce2009-12-031-3/+5
| | | | Groups also need to honor the settable password field and use * by default.
* Use memberuid and not member in group enumerationsSimo Sorce2009-12-031-53/+8
| | | | | | This allows for correctly reporting nested group members, while at the same time not paying a too high price for caluclating nested groups at runtime e very time a search is made.
* Fix ticket #289Simo Sorce2009-11-231-0/+18
| | | | | When I converted fill_grent to speed up enumerations I left out this check by mistake.
* Speed up user requests while offlineStephen Gallagher2009-11-234-15/+25
| | | | | | | | | This adds a new boolean option to sss_dp_send_acct_req() called fast_reply. If we make a request to the backends and we are currently offline, this option will determine whether we should immediately return from the cache (acceptable for NSS requests) or potentially wait for an online check to complete (required for PAM requests).
* Filter by id range before actually storing entries.Simo Sorce2009-11-201-16/+0
| | | | This way we do not need to check for id ranges on every search.
* Optimize sysdb_enumgrentSimo Sorce2009-11-201-172/+178
| | | | | This brings down the time needed to enumerate my group database from 2.4 seconds to 0.15 seconds.
* Make the password field configurable in NSSJakub Hrozek2009-11-183-4/+14
| | | | | | | | Per the discussion on sssd-devel list, nss_sss should not return a hardcoded value but this should rather be configurable to allow whatever the OS or distribution thinks is the best for the particular case. Fixes: #266
* Change the pam code to perform an initgroups callSimo Sorce2009-11-181-1/+1
| | | | | | An initgroups call refreshes both the user and the user's groups, this is ideal for pam so that we don't need addiotnal initgroups calls (initgroups calls are cached too now) during the login process.
* Change initgroups code to use and check the cacheSimo Sorce2009-11-181-196/+98
| | | | | | | 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.
* Change var name to make its use more clear.Simo Sorce2009-11-122-7/+7
| | | | | Change memctx to make clear it should be used only when a callback is being used.
* Fix check_cache bug in dealing with the callbackSimo Sorce2009-11-121-97/+104
| | | | | | | | Also rework check_cache so that the operations it makes are more explicit. Also add comments about why we are doing something. Should make the code easier to understand in future (took quite some time and discussion on IRC to understand exactly how this function was behaving and to find the callback passing bug).
* Fix segfault on unknown user/domainStephen Gallagher2009-11-091-2/+2
|
* Fix tevent_req error checking.Simo Sorce2009-11-091-6/+1
| | | | When possible using a macro that correctly deals with tstate
* Update midpoint refresh logic to be relative to cache timeoutStephen Gallagher2009-11-053-9/+24
|
* Move responsibility for entry expiration timeoutSimo Sorce2009-10-274-26/+12
| | | | | The providers are now responsible for determining how long a cached entry is considered valid. The default is the same as before (600s)
* 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-261-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.