summaryrefslogtreecommitdiff
path: root/src/responder/nss
AgeCommit message (Collapse)AuthorFilesLines
2011-12-05Ignore NULL-terminator when checking UTF8-validityStephen Gallagher1-3/+3
Glib fails if the NULL-terminator is included when a length is specified.
2011-11-29RESPONDER: Refactor DP requests into tevent_req styleStephen Gallagher2-50/+112
2011-11-22Cleanup: Remove unused parametersJakub Hrozek1-2/+1
2011-11-18RESPONDER: Ensure that all input strings are valid UTF-8Stephen Gallagher2-0/+28
2011-09-21Enable the midpoint cache update by defaultStephen Gallagher1-1/+1
https://fedorahosted.org/sssd/ticket/918
2011-08-25New DEBUG facility - SSSDBG_UNRESOLVED changed from -1 to 0Pavel Březina1-1/+4
Removed: SSS_UNRESOLVED_DEBUG_LEVEL (completely replaced with SSSDBG_UNRESOLVED) Added new macro: CONVERT_AND_SET_DEBUG_LEVEL(new_value) Changes unresolved debug level value (SSSDBG_UNRESOLVED) from -1 to 0 so DEBUG macro could be reduced by one condition. Anyway, it has a minor effect, every time you want to load debug_level from command line parameters, you have to use following pattern: /* Set debug level to invalid value so we can deside if -d 0 was used. */ debug_level = SSSDBG_INVALID; pc = poptGetContext(argv[0], argc, argv, long_options, 0); while((opt = poptGetNextOpt(pc)) != -1) { ... } CONVERT_AND_SET_DEBUG_LEVEL(debug_level);
2011-08-25New DEBUG facility - conversionPavel Březina1-0/+2
https://fedorahosted.org/sssd/ticket/925 Conversion of the old debug_level format to the new one. (only where it was necessary) Removed: SSS_DEFAULT_DEBUG_LEVEL (completely replaced with SSSDBG_DEFAULT)
2011-08-15sysdb refactoring: deleted domain variables in sysdb APIJan Zeleny2-9/+8
The patch also updates code using modified functions. Tests have also been adjusted.
2011-08-08Remove unused temporary contextJakub Hrozek1-5/+0
2011-08-08Prevent segfault if vetoed_shells are specified without allowed_shellsJakub Hrozek1-16/+19
https://fedorahosted.org/sssd/ticket/954
2011-07-29Add vetoed_shells optionJohn Hodrien3-1/+17
There may be users in LDAP that have a valid but unwelcome shell set in their account. This adds a blacklist of shells that should always be replaced by the fallback_shell. Signed-off-by: Stephen Gallagher <sgallagh@redhat.com>
2011-07-21Fix indexing of skipped groupsJakub Hrozek1-2/+4
https://fedorahosted.org/sssd/ticket/928
2011-06-27fix typosSimo Sorce1-5/+5
2011-06-02Non-posix group processing - ldap provider and nss responderJan Zeleny1-3/+11
2011-05-31Fix typo in initgroups negative cache checkStephen Gallagher1-1/+1
2011-05-20Add new options to override shell valueJakub Hrozek3-1/+123
https://fedorahosted.org/sssd/ticket/742
2011-05-20Add a new option to override home directory valueJakub Hrozek3-1/+140
https://fedorahosted.org/sssd/ticket/551
2011-05-20Add a new option to override primary GID numberJakub Hrozek2-2/+10
https://fedorahosted.org/sssd/ticket/742
2011-05-06Allow changing the log level without restartStephen Gallagher1-1/+1
We will now re-read the confdb debug_level value when processing the monitor_common_logrotate() function, which occurs when the monitor receives a SIGHUP.
2011-05-06Do not leak netgroups hash tableJakub Hrozek1-0/+12
2011-04-25Don't use negative cache in netgroup lookupJan Zeleny2-20/+20
In responder a negative cache is used to indicate that the record has not been found by previous lookup. This approach is however not applicable for netgroup lookup because the design of their lookup is a little different. This patch removes some pieces of code working with negative cache, because they didn't fuction well. Instead a new flag has been added to the positive cache. This flag indicates if the record in the cache is a record of existing netgroup or it's just a placeholder. https://fedorahosted.org/sssd/ticket/820
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-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-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-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-17Fix possible NULL-dereference in lookup_netgr_step()Sumit Bose1-1/+1
https://fedorahosted.org/sssd/ticket/735
2010-12-15Fix uninitialized value error in lookup_netgr_step()Sumit Bose1-146/+181
2010-10-26Always use talloc_zero() to allocate cmdctxSumit Bose2-3/+3
2010-10-26Remove all nss requests after a reconnectSumit Bose1-1/+5
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 Gallagher5-2/+915
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-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 Gallagher1-289/+706
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 Zeleny1-5/+7
Various dead assignments were deleted, some return value inspections were added. Ticket: #588
2010-06-17Move setup of filter_users and filter_groups to negcache.cStephen Gallagher1-187/+5
Creates a new function - sss_ncache_prepopulate() - that can be shared with other responders, such as PAM.
2010-06-17Refactor the negative cacheStephen Gallagher5-395/+23
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-04-12sysdb: convert sysdb_initgroupsSimo Sorce1-222/+117
2010-04-12Adjust fill_pwent and fill_grentSimo Sorce1-13/+13
fill_pwent should return the number of users actually processed. Otherwise in case of a recoverable error we may end up skipping a large chunk of users. fill_grent doesn't need to distinguish between number of entries and number of groups to process since we started adding memberuid. Remove remnants that are not useful anymore.