summaryrefslogtreecommitdiff
path: root/src/responder
AgeCommit message (Collapse)AuthorFilesLines
2011-04-15Fix regression where nonexistent entries were never added to the negative cacheStephen Gallagher1-21/+21
2011-04-15Fix a regression with the negative cache in multi-domain configurationsStephen Gallagher1-3/+18
2011-04-15Add debug logging to the negative cacheStephen Gallagher1-0/+5
2011-04-08Fix unchecked return values of pam_add_responseJakub Hrozek1-4/+12
https://fedorahosted.org/sssd/ticket/798
2011-03-09Change state of hash entry if netgroup cannot be parsedSumit Bose1-0/+2
2011-03-07Refactor set_netgroup_entry()Sumit Bose1-4/+7
To avoid wrong or missing netgroup names in the getent_ctx destructor set_netgroup_entry() now takes the name out of the getent_ctx struct instead of using a separate argument.
2011-03-07Add missing name to struct getent_ctx for missing netgroupSumit Bose1-0/+6
https://fedorahosted.org/sssd/ticket/817
2011-02-21Perform initgroups lookups for all domainsStephen Gallagher1-3/+5
Previously, we were setting the client context PAM lookup timeout after the first domain replied. However, if the user wasn't a member of the first domain, their information wasn't being updated. This patch ensures that we only set this timeout after the user has been found or all domains were searched.
2011-01-21Perform initgroups lookup for PAMStephen Gallagher1-1/+3
Previously we were only looking up the user, but we need to make sure that all groups are available for use by access providers.
2011-01-19Use DEFAULT_PAM_VERBOSITY if config value cannot be retrievedSumit Bose1-1/+1
2011-01-19Add pam_pwd_expiration_warning config optionSumit Bose1-12/+47
2011-01-14Fix missing hash table bugStephen Gallagher1-0/+1
When the automatic cleanup happened, if the netgroup had been created with no contents (to indicate an unknown netgroup), we weren't saving the hash table address and the talloc_free() was failing.
2011-01-11Validate user supplied size of data itemsSumit Bose1-76/+75
Specially crafted packages might lead to an integer overflow and the parsing of the input buffer might not continue as expected. This issue was identified by Sebastian Krahmer <krahmer@suse.de>.
2011-01-06Remove unused enumeration cache timeout checksSumit Bose3-33/+2
The existence of the getent_ctx is used to track the enumeration cache timeout.
2011-01-06Post enumeration tevent request if neededSumit Bose2-8/+43
2011-01-06Return groups and users from all domains during enumerationSumit Bose1-3/+5
2010-12-22Update the ID cache for any PAM requestStephen Gallagher4-8/+23
Also adds an option to limit how often we check the ID provider, so that conversations with multiple PAM requests won't update the cache multiple times. https://fedorahosted.org/sssd/ticket/749
2010-12-22Ensure ID is checked in all domains for PAMStephen Gallagher1-0/+2
Previously, this was initialized to zero, so the first domain in the list wouldn't be checked for ID updates in pam_check_user_search. This initializes the first domain to check the provider.
2010-12-17Fix possible NULL-dereference in lookup_netgr_step()Sumit Bose1-1/+1
https://fedorahosted.org/sssd/ticket/735
2010-12-17Fix unchecked return value in set_nonblockingStephen Gallagher1-10/+53
Also fixes the same problem with set_close_on_exec https://fedorahosted.org/sssd/ticket/713
2010-12-15Fix uninitialized value error in lookup_netgr_step()Sumit Bose1-146/+181
2010-12-14Remove unused newauthtok variable in LOCAL_pam_handlerSumit Bose1-3/+0
https://fedorahosted.org/sssd/ticket/716
2010-12-14Eliminate possible NULL-dereference in pam_check_user_searchStephen Gallagher1-0/+7
https://fedorahosted.org/sssd/ticket/719
2010-12-03Add support for server-side pam response messagesSumit Bose1-0/+2
2010-12-02Add a special filter type to handle enumerationsSumit Bose1-1/+1
2010-11-15Introduce pam_verbosity config optionSumit Bose1-11/+90
Currently we display all PAM messages generated by sssd to the user. But only some of them are important and others are just some useful information. This patch introduces a new option to the PAM responder which controls what kind of messages are displayed. As an example the 'Authenticated with cached credentials' message is used. This message is only displayed if pam_verbosity=1 or if there is an expire date.
2010-11-15Avoid long long in messages to PAM client use int64_tSumit Bose1-7/+7
2010-10-26Fix double free issueSumit Bose1-2/+2
2010-10-26Always use talloc_zero() to allocate cmdctxSumit Bose2-3/+3
2010-10-26Remove all nss requests after a reconnectSumit Bose3-1/+26
Currently we do not handle the open nss request after a reconnect and wait until they timeout (which is a couple of minutes!). This patch adds a handler that terminates all requests after a reconnect. Then responder will return matching cache entries or nothing.
2010-10-15sysdb interface for adding fake usersJakub Hrozek1-1/+1
2010-10-15sysdb interface for adding incomplete groupsJakub Hrozek1-1/+1
Useful for optimizing the initgroups operation.
2010-10-13Also return member groups to the clientSumit Bose2-55/+85
2010-10-13Add handling of nested netgroups to nss clientSumit Bose1-1/+4
2010-10-13Add missing tevent_req_done()Sumit Bose1-0/+1
2010-10-13Add netgroup support to the NSS responderStephen Gallagher7-2/+922
2010-10-13Split out some helper functions for the NSS responderStephen Gallagher2-83/+147
Create a new private header and make some functions available for other object files.
2010-10-13Add negative cache features for netgroupsStephen Gallagher2-0/+39
2010-10-13Require explicit setting of callback context for check_cacheStephen Gallagher1-7/+13
Previously, it was implicitly using the nss_dom_ctx, but there are situations where we would want to send a different private context
2010-09-22Initgroups on a non-cached user should go to the data providerStephen Gallagher1-1/+2
We were accidentally returning an error when sysdb_getpwnam() returned zero results internally in sysdb_initgroups(). The correct behavior here is to return EOK and a result object with zero entries.
2010-09-08Handle multiple simultaneous enumeration requestsStephen Gallagher2-289/+717
Previously, if a second enumeration request arrived while one was already being processed, each process would receive only a subset of the total number of available users or groups. This is because we were maintaining the response object as a global value in the NSS responder. The second request would come in, see that the data set was already populated, and start reading from wherever the cursor was currently pointed. With this patch, we now move the cursor to the client context instead of the global NSS context. Additionally, this patch completely rewrites the approach to enumerations in the tevent_req style. This makes it much easier to follow in the code. In order to ensure that a slow or malicious client cannot hold onto a reference for the setent result object indefinitely, we set an expiration on the object. We use the enum_cache_timeout here, since that is an appropriate value. If the timeout fires during the normal operation of the get*ent() loop of a client program, we will save the current values of the read index so that we can resume as soon as the object has been refreshed by an implicit setent call. Instead of deleting the enumeration result object immediately after the last in-progress client has read it, we'll keep the object around for the lifetime of enum_cache_timeout. This way, additional clients making enumeration requests can still access the results in-memory.
2010-09-08Dead assignments cleanup in NSS responderJan Zeleny2-7/+7
Various dead assignments were deleted, some return value inspections were added. Ticket: #588
2010-09-08Move crypto functions into its own subdirJakub Hrozek1-1/+1
A refactoring patch that creates a common util/crypto subdir with per-implementation subdirectories for each underlying crypto library supported by SSSD.
2010-06-17Honor filter_users in PAMStephen Gallagher3-10/+47
2010-06-17Move setup of filter_users and filter_groups to negcache.cStephen Gallagher3-187/+220
Creates a new function - sss_ncache_prepopulate() - that can be shared with other responders, such as PAM.
2010-06-17Refactor the negative cacheStephen Gallagher5-57/+57
Rename functions from nss_ncache_* to sss_ncache_* Move negative cache to responder/common and rename as negcache.c/h
2010-06-17Ensure that all domains are checked for users/groupsStephen Gallagher1-3/+15
There was a bug in the negative cache checks (probably a leftover from when filter_users was global-only) that meant that if a user was filtered out of a domain, the remaining domains would not be checked for that user. (Same for groups/initgroups)
2010-06-14Properly null-terminate socket pathStephen Gallagher1-2/+4
https://fedorahosted.org/sssd/ticket/540
2010-06-10Check the correct variable for NULL after creating timerStephen Gallagher1-1/+1
In several places, we were creating a new timer and assigning it to the tev variable, but then we were checking for NULL from the te variable (which, incidentally, is guaranteed never to be NULL in this situation) https://fedorahosted.org/sssd/ticket/523
2010-06-06Remove dead code from the PAM responderJakub Hrozek2-13/+0