summaryrefslogtreecommitdiffstats
path: root/server/responder/pam/pamsrv_cmd.c
Commit message (Collapse)AuthorAgeFilesLines
* Supress warnings with -O2Jakub Hrozek2010-02-181-2/+1
|
* 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
|
* Warn the user if authentication happens offlineSumit Bose2010-02-021-1/+19
|
* Avoid 'PAM' at the beginning of define and enum namesSumit Bose2010-02-011-13/+13
|
* 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-221-8/+10
| | | | | | | | 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-201-11/+51
| | | | | | | | | 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.
* 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.
* Speed up user requests while offlineStephen Gallagher2009-11-231-3/+5
| | | | | | | | | 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).
* 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.
* 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
* Move responsibility for entry expiration timeoutSimo Sorce2009-10-271-7/+4
| | | | | 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-221-1/+170
| | | | | | | | | 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.
* 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.
* Revert "Use syslog for logging error conditions in SSSD"Stephen Gallagher2009-09-231-3/+3
| | | | | | | | 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-211-3/+3
| | | | | 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
* Split database in multiple filesSimo Sorce2009-09-081-3/+26
| | | | | The special persistent local database retains the original name. All other backends now have their own cache-NAME.ldb file.
* Fix reconnection codeSimo Sorce2009-08-171-1/+1
| | | | | | | 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-141-6/+6
| | | | | | 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_*
* 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
|
* special-case NSS calls in PAM codeJakub Hrozek2009-05-281-2/+2
|
* fix a wrong timeoutSumit Bose2009-05-261-3/+4
| | | | | The timeout of the data provider call (in ms) got overwritten by a cache timeout (in s).
* Move actual password caching into sysdbSimo Sorce2009-05-181-13/+0
| | | | Convert auth modules to do the caching themselves
* added new pam client protocolSumit Bose2009-05-151-1/+132
|
* added more flexible handling of client protocolSumit Bose2009-05-151-1/+12
| | | | | - allow different protocol versions for PAM and NSS - support more than one protocol version in the responder
* added check for NULL valuesSumit Bose2009-05-141-0/+1
| | | | | - allow unspecified value in struct pam_data to be NULL - check if domain structure is initialized in pam_reply
* handle other pam calls when offlineSumit Bose2009-04-281-0/+10
|
* change PAM timeout the match NSS timeSumit Bose2009-04-281-1/+1
|
* fix for pam proxy chauthtokSumit Bose2009-04-271-0/+1
| | | | | | | | | | When a user from a domain served by the proxy backend changes his password with passwd the passwd command asks for the old password, but it is not validated by the pam_chauthtok call in the proxy backend, because it is running as root. If the request is coming the unpriviledged socket we now call pam_authenticate explicitly before pam_chauthtok.
* removed length of unused element from packet size calculationSumit Bose2009-04-231-1/+1
| | | | | | The domain name is no longer send as an element on its own, but if set as a member of the response array. If the user was not found pd->domain is NULL and strlen will seg-fault.
* fix for a seq fault when pam_reply_delay is called.Sumit Bose2009-04-221-2/+2
| | | | see https://fedorahosted.org/sssd/ticket/25
* Force user check and discover user's domainSimo Sorce2009-04-171-19/+316
| | | | | | | | | | | Force a user lookup against the users domain provider. If a user domain is not specified search though all non fully qualifying domains. Perform authentication against the corrent domain auth backend, based on the user's domain found in the lookup if one was not specified. Also move the NSS-DP functions in COMMON-DP as they are reused by the PAM responder too now.
* Implement credentials caching in pam responder.Simo Sorce2009-04-131-28/+95
| | | | | | | Implement credentials caching in pam responder. Currently works only for the proxy backend. Also cleanup pam responder code and mode common code in data provider. (the data provider should never include responder private headers)
* Change the way we retrieve domainsSimo Sorce2009-04-081-16/+13
| | | | | | | | | | | | | 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-071-2/+2
|
* Unify name parsing and reposnder headersSimo Sorce2009-04-071-31/+34
| | | | | | 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
* Make nsssrv use the common responder functionsSimo Sorce2009-03-271-8/+1
| | | | | Make nss_ctx a private pointer of the common resp_ctx Use sss_process_init and remove all duplicate functions from nsssrv.c
* Refactor nss_ctx to resp_ctx in respondersStephen Gallagher2009-03-261-8/+8
|
* remove an unnecessary call to confdbSumit Bose2009-03-111-8/+4
|
* added generic PAM return messages and a false login delaySumit Bose2009-03-101-7/+86
|
* Simplify some aspects of pam_LOCAL_domainSimo Sorce2009-03-041-1/+3
| | | | | | | | | | 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.