summaryrefslogtreecommitdiff
path: root/src/providers/ldap/ldap_id_enum.c
AgeCommit message (Collapse)AuthorFilesLines
2013-09-18AD: Download master domain info when enumeratingJakub Hrozek1-6/+0
https://fedorahosted.org/sssd/ticket/2068 With the current design, downloading master domain data was tied to subdomains refresh, triggered by responders. But because enumeration is a background task that can't be triggered on its own, we can't rely on responders to download the master domain data and we need to check the master domain on each enumeration request.
2013-09-18LDAP: sdap_id_setup_tasks accepts a custom enum requestJakub Hrozek1-12/+5
AD provider will override the default with its own.
2013-08-28LDAP: Convert enumeration to the ptask APIJakub Hrozek1-107/+126
https://fedorahosted.org/sssd/ticket/1942 Identity providers other than LDAP need to customize the enumeration in different ways while sharing the way the task is scheduled etc. The easiest way to accomplish it is to leverage the recently introduced ptask framework.
2013-08-28LDAP: Move the ldap enum request to its own reusable moduleJakub Hrozek1-631/+6
The LDAP enumeration was too closely tied to the LDAP identity provider. Because some providers might need special handling such as refresh the master domain record before proceeding with the enumeration itself, this patch splits the request itself to a separate async request and lets the ldap_id_enum.c module only configure this new request. Also move the enum timestamp to sdap_domain to make the enum tracking per sdap domain. The cleanup timestamp will be moved in another patch.
2013-08-28LDAP: Remove unused constantJakub Hrozek1-2/+0
The constant was not used since Euegene came up with his reconnection logic.
2013-08-28LDAP: Add enum_{users,groups}_recv to follow the tevent_req styleJakub Hrozek1-24/+19
The enum code was quite old and predated the tevent_req style. In particular, the enum code was checking tevent state direcly and not using _recv functions or the helper macros we added later. As a consequence, it was not easy to read. This patch adds the standard _recv functions to read the status of the enum requests.
2013-06-28Replace SDAP_ID_MAPPING checks with sdap_idmap_domain_has_algorithmic_mappingSumit Bose1-2/+7
Currently the decision if external or algorithmic mapping should be used in the LDAP or AD provider was based on the value of the ldap_id_mapping config option. Since now all information about ID mapping is handled by libsss_idmap the check for this options can be replace with a call which checks the state via libss_idmap. https://fedorahosted.org/sssd/ticket/1961
2013-06-07LDAP: new SDAP domain structureJakub Hrozek1-15/+23
Previously an sdap_id_ctx was always tied to one domain with a single set of search bases. But with the introduction of Global Catalog lookups, primary domain and subdomains might have different search bases. This patch introduces a new structure sdap_domain that contains an sssd domain or subdomain and a set of search bases. With this patch, there is only one sdap_domain that describes the primary domain.
2013-06-07LDAP: sdap_id_ctx might contain several connectionsJakub Hrozek1-1/+1
With some LDAP server implementations, one server might provide different "views" of the identites on different ports. One example is the Active Directory Global catalog. The provider would contact different view depending on which operation it is performing and against which SSSD domain. At the same time, these views run on the same server, which means the same server options, enumeration, cleanup or Kerberos service should be used. So instead of using several different failover ports or several instances of sdap_id_ctx, this patch introduces a new "struct sdap_id_conn_ctx" that contains the connection cache to the particular view and an instance of "struct sdap_options" that contains the URI. No functional changes are present in this patch, currently all providers use a single connection. Multiple connections will be used later in the upcoming patches.
2013-01-21Remove sysdb as a be context structure memberSimo Sorce1-3/+3
The sysdb context is already available through the 'domain' structure.
2013-01-15Add domain argument to sysdb_has/set_enumerated()Simo Sorce1-1/+1
2012-08-23Clean up cache on server reinitializationPavel Březina1-4/+2
https://fedorahosted.org/sssd/ticket/734 We successfully detect when the server is reinitialized by testing the new lastUSN value. The maximum USN values are set to zero, but the current cache content remains. This patch removes records that were deleted from the server. It uses the following approach: 1. remove entryUSN attribute from all entries 2. run enumeration 3. remove records that doesn't have entryUSN attribute updated We don't need to do this for sudo rules, they will be refreshed automatically during next smart/full refresh, or when an expired rule is deleted.
2012-05-31Add support for filtering atributesJan Zeleny1-4/+4
This patch adds support for filtering attributes when constructing attribute list from a map for LDAP query.
2012-05-10LDAP: Add attr_count return value to build_attrs_from_map()Stephen Gallagher1-2/+2
This is necessary because in several places in the code, we are appending to the attrs returned from this value, and if we relied on the map size macro, we would be appending after the NULL terminator if one or more attributes were defined as NULL.
2012-05-03LDAP: Add support for enumeration of ID-mapped users and groupsStephen Gallagher1-31/+102
2012-01-31LDAP: Add enumeration support for servicesStephen Gallagher1-3/+57
2011-11-02LDAP: Add support for multiple search bases for group enumerationStephen Gallagher1-1/+2
2011-11-02LDAP: Add support for multiple search bases for user enumerationStephen Gallagher1-1/+2
2011-11-02LDAP: Convert ldap_*_search_filterStephen Gallagher1-26/+6
Instead of making this a global option for all user lookups, make it only used if the search base is passed without an explicit filter.
2011-11-02LDAP: Support multiple group search bases (non-enumeration, RFC2307)Stephen Gallagher1-1/+7
2011-11-02LDAP: Support multiple user search bases (non-enumeration)Stephen Gallagher1-0/+5
2011-08-15sysdb refactoring: deleted domain variables in sysdb APIJan Zeleny1-3/+1
The patch also updates code using modified functions. Tests have also been adjusted.
2011-08-04Fix returning groups when gidNumber attribute is not orderedJakub Hrozek1-2/+4
https://fedorahosted.org/sssd/ticket/951
2011-05-04Fixed lastUSN checking improvementsJan Zeleny1-0/+15
This patch fixes some issues with setting lastUSN attribute and it adds check against the highest user/group USN after enumeration to keep better track of the real highest USN. Optimal solution here would be to schedule a check of rootDSE entry right after the enumeration finishes, but for the moment this is good enough.
2011-04-19Add user and group search LDAP filter optionsJakub Hrozek1-6/+26
https://fedorahosted.org/sssd/ticket/647
2011-03-14Require existence of username, uid and gid for user enumerationStephen Gallagher1-12/+18
We will ignore users that do not have these three values.
2011-03-14Require existence of GID number and name in group searchesStephen Gallagher1-12/+16
https://fedorahosted.org/sssd/ticket/824
2011-01-17Add ldap_search_enumeration_timeout config optionSumit Bose1-2/+2
2011-01-17Add timeout parameter to sdap_get_generic_send()Sumit Bose1-2/+6
2010-12-17Start first enumeration immediatelyStephen Gallagher1-0/+14
Previously, we would wait for ten seconds before starting an enumeration. However, this meant that on the first startup (before we had run our first enumeration) there was a ten-second window where clients would immediately get back a response with no entries instead of blocking until the enumeration completed. With this patch, SSSD will now run an enumeration immediately upon startup. Further startups will retain the ten-second delay so as not to slow down system bootups. https://fedorahosted.org/sssd/ticket/616
2010-12-07ldap: Use USN entries if available.Simo Sorce1-26/+25
Otherwise fallback to the default modifyTimestamp indicator
2010-09-08Dead assignments cleanup in providers codeJan Zeleny1-3/+0
Dead assignments were deleted. Also prototype of function sdap_access_decide_offline() has been changed, since its return code was never used. Ticket: #586
2010-07-09Use new LDAP connection framework for LDAP user and group enumeration.eindenbom1-236/+131
2010-06-10Properly check that the timeout event was created for cleanup/enumStephen Gallagher1-1/+23
We need to make sure that if we didn't create the timeout, that we cancel the request so there's no chance of ending up with two enumerations/cleanups running simultaneously. We'll attempt to reschedule later, if possible. https://fedorahosted.org/sssd/ticket/524
2010-05-07Fix segfault in GSSAPI reconnect codeStephen Gallagher1-2/+6
Also clean up some duplicated code into a single common routine sdap_account_info_common_done()
2010-05-03Better handle sdap_handle memory from callers.Simo Sorce1-16/+95
Always just mark the sdap_handle as not connected and let later _send() functions to take care of freeing the handle before reconnecting. Introduce restart functions to avoid calling _send() functions in _done() functions error paths as this would have the same effect as directly freeing the sdap_handle and cause access to freed memory in sdap_handle_release() By freeing sdap_handle only in the connection _recv() function we guarantee it can never be done within sdap_handle_release() but only in a following event.
2010-02-18Rename server/ directory to src/Stephen Gallagher1-0/+608
Also update BUILD.txt