summaryrefslogtreecommitdiffstats
path: root/src/providers/ldap
Commit message (Collapse)AuthorAgeFilesLines
* Fix czech specific character in my namePavel Březina2013-09-022-2/+2
|
* LDAP: Make sdap_id_setup_tasks reusable for subdomainsJakub Hrozek2013-08-283-7/+19
| | | | | Instead of always performing the setup for the main domain, the setup can now be performed for subdomains as well.
* LDAP: Make the cleanup task reusable for subdomainsJakub Hrozek2013-08-285-42/+73
| | | | | | Instead of always performing the cleanup on the main domain, the task now accepts a sdap_domain structure to perform the cleanup on. This change will make the cleanup task reusable for subdomains.
* LDAP: Make cleanup synchronousJakub Hrozek2013-08-283-150/+34
| | | | | | The LDAP cleanup request was asynchronous for no good reason, probably a leftover from the days of async sysdb. This patch makes it sychronous again, removing a lot of uneeded code.
* LDAP: Convert enumeration to the ptask APIJakub Hrozek2013-08-284-136/+132
| | | | | | | | | 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.
* LDAP: Move the ldap enum request to its own reusable moduleJakub Hrozek2013-08-286-642/+741
| | | | | | | | | | | 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.
* LDAP: Remove unused constantJakub Hrozek2013-08-281-2/+0
| | | | | The constant was not used since Euegene came up with his reconnection logic.
* LDAP: Add enum_{users,groups}_recv to follow the tevent_req styleJakub Hrozek2013-08-281-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.
* sudo: do not strdup usn on ENOENTPavel Březina2013-08-261-1/+1
| | | | | | If USN attribute is not present, we call strdup on uninitialized variable. This may cause segfault, or if we are lucky and usn is NULL it will return ENOMEM.
* sudo: do not fail to store the rule if we can't read usnPavel Březina2013-08-261-3/+4
| | | | | Resolves: https://fedorahosted.org/sssd/ticket/2052
* sysdb_add_incomplete_group: store SID string is availableSumit Bose2013-08-192-9/+18
| | | | | | During initgroups request we read the SID of a group from the server but do not save it to the cache. This patch fixes this and might help to avoid an additional lookup of the SID later.
* save_rfc2307bis_user_memberships: use fq names for subdomainsSumit Bose2013-08-191-0/+16
| | | | | For subdomains the group names must be expanded to fully qualified names to be able to find existing groups or properly add new ones.
* sdap_add_incomplete_groups: use fully qualified name if neededSumit Bose2013-08-191-4/+14
| | | | | For subdomains the group names must be expanded to fully qualified names to be able to find existing groups or properly add new ones.
* sudo: continue if we are unable to resolve fqdnPavel Březina2013-08-191-1/+0
| | | | https://fedorahosted.org/sssd/ticket/2043
* sdap_save_user: save original primary GID of subdomain usersSumit Bose2013-08-191-11/+22
| | | | | | | | | | | | | | If ID mapping is enabled we use magic private groups (MPG) for subdomains, i.e. the UID and the primary GID of the user will have the same numerical value. As a consequence the information about the original primary group might get lost because neither in AD domains nor on a typical UNIX system the user is an explicit member of it's primary group. With this patch the mapped GID or the original primary group is saved in the cached user object under a new attribute. Fixes https://fedorahosted.org/sssd/ticket/2027
* sdap_get_initgr_done: use the right SID to get a GIDSumit Bose2013-08-191-1/+2
|
* ldap, krb5: More descriptive msg on chpass failure.Michal Zidek2013-08-111-0/+15
| | | | | | | | Print more descriptive message when wrong current password is given during password change operation. resolves: https://fedorahosted.org/sssd/ticket/2029
* Enable removing nonexisting dn in sdap_handle_account_infoLukas Slebodnik2013-08-081-1/+1
| | | | Change was introduced in commit ca344fde
* Fix memory context for hash entriesSumit Bose2013-08-081-2/+4
| | | | | | | | In sdap_nested_group_populate_users() username and orignal_dn are allocated on a temporary memory context. If the corresponding user is not found in the cache both are added to a hash which is later on returned to the caller. To avoid a use-after-free when the hash entries are looked up both must be reassigned to the memory context of the hash.
* Fix memory context for a state memberSumit Bose2013-08-071-1/+1
| | | | | | primary_name was allocated on a temporary memory context but as it is a member of the state struct it should belong to the memory context of the state.
* sudo: print better debug message when a rule has multiple cn valuesPavel Březina2013-08-051-1/+5
|
* sudo: skip rule on error instead of failing completelyPavel Březina2013-08-051-1/+3
| | | | https://fedorahosted.org/sssd/ticket/2031
* Prevent using uninitialized "group_name" in done section.Lukas Slebodnik2013-07-251-1/+1
| | | | Coverity ID: 11927
* LDAP: Use domain-specific name where appropriateJakub Hrozek2013-07-245-112/+159
| | | | | | | | | The subdomain users user FQDN in their name attribute. However, handling of whether to use FQDN in the LDAP code was not really good. This patch introduces a utility function and converts code that was relying on user/group names matching to this utility function. This is a temporary fix until we can refactor the sysdb API in #2011.
* SIGCHLD handler: do not call callback when pvt data where freedPavel Březina2013-07-171-1/+1
| | | | https://fedorahosted.org/sssd/ticket/1992
* print hint about password complexity when new password is rejectedPavel Březina2013-07-171-0/+8
| | | | https://fedorahosted.org/sssd/ticket/1827
* LDAP: When resolving a SID, search for groups first, then usersJakub Hrozek2013-07-171-19/+18
| | | | | | | | | | | https://fedorahosted.org/sssd/ticket/1997 Most of the time, the SIDs are resolved as a call coming from the PAC responder during initgroups. In that case at least, it makes sense to search for group matching that SID first, then users. We may consider making this behaviour configurable ie for the server mode where typically the users should be queried first.
* ldap: only update shadowLastChange when password change is successfulJim Collins2013-07-011-1/+2
| | | | | | | | | | | | | | | | https://fedorahosted.org/sssd/ticket/1999 ldap_auth.c code which was added to SSSD for updating the shadowLastChange when "ldap_chpass_update_last_change" option is enabled updates shadowLastChange even when the PAM password change status reports failure. We should only update shadowLastChange on PAM password change success or we open up a work around for users to avoid changing their passwords periodically as required by policy. The user simply attempts to change password, fails by trying to set new password which invalid (denied due to password history check) yet shadowLastChange is updated, avoiding their need to actually change the password they are using.
* AD: Move storing sdap_domain for subdomain to generic LDAP codeJakub Hrozek2013-06-282-0/+77
| | | | | | | | Makes creating the sdap_domain structure for a subdomain reusable outside AD subdomain code where it was created initially. Subtask of: https://fedorahosted.org/sssd/ticket/1962
* LDAP: Add utility function sdap_copy_mapJakub Hrozek2013-06-282-0/+45
| | | | | | | | | The AD subdomains will only use default options values. This patch introduces a new utility function sdap_copy_map() that copies the default options map. Subtask of: https://fedorahosted.org/sssd/ticket/1962
* Replace new_subdomain() with find_subdomain_by_name()Sumit Bose2013-06-281-3/+2
| | | | | | new_subdomain() will create a new domain object and should not be used anymore in the priovder code directly. Instead a reference to the domain from the common domain object should be used.
* Replace SDAP_ID_MAPPING checks with sdap_idmap_domain_has_algorithmic_mappingSumit Bose2013-06-285-14/+38
| | | | | | | | | | 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
* Add sdap_idmap_domain_has_algorithmic_mapping()Sumit Bose2013-06-282-0/+62
| | | | | | | This patch implements a wrapper for sss_idmap_domain_has_algorithmic_mapping() for the sdap ID mapping. Fixes https://fedorahosted.org/sssd/ticket/1960
* Allow different methods to find new domains for idmappingSumit Bose2013-06-282-3/+24
| | | | | | | | | | | | | | | | | Currently the range management code is in the generic LDAP provider and can be used by the LDAP and AD provider. New ranges are allocated with the help of a hash value of the domain SID. If the IPA provider cannot find a range for a given domain it cannot allocate a new range on its own but has to look up the idrange objects on the FreeIPA server and use them accordingly. To allow the LDAP, AD and IPA provider to use as much common code as possible a plugin interface, similar to the one used to find the DNS site, to find a missing range would be useful. The default plugin will be used by the LDAP and the AD provider and the IPA provider will implement a plugin to read the data from the server. Fixes https://fedorahosted.org/sssd/ticket/1961
* SDAP IDMAP: Add configured domain to idmap contextSumit Bose2013-06-281-0/+70
| | | | | | To allow libsss_idmap to manage all id-ranges the id-ranges of the domains configured in sssd.conf which are currently unmanaged must be added to libsss_idmap.
* Add now options ldap_min_id and ldap_max_idSumit Bose2013-06-282-0/+4
| | | | | | | Currently the range for Posix IDs stored in an LDAP server is unbound. This might lead to conflicts in a setup with AD and trusts when the configured domain uses IDs from LDAP. With the two noe options this conflict can be avoided.
* LDAP: Retry SID search based on result of LDAP search, not the return codeJakub Hrozek2013-06-241-2/+13
|
* nested groups: do not expect any particular number of groupsPavel Březina2013-06-181-19/+10
|
* nested groups: do not return ENOMEM if num_groups is 0Pavel Březina2013-06-181-6/+10
| | | | | | talloc_realloc(..., 0) calls talloc_free() and returns NULL. If we process group that contains only users, we errornously return ENOMEM.
* handle ERR_ACCOUNT_EXPIRED properlyPavel Březina2013-06-171-1/+5
| | | | https://fedorahosted.org/sssd/ticket/1953
* nested groups: allocate more space if deref returns more membersPavel Březina2013-06-171-0/+21
| | | | https://fedorahosted.org/sssd/ticket/1894
* A new option krb5_use_kdcinfoJakub Hrozek2013-06-103-2/+8
| | | | | | | | | | https://fedorahosted.org/sssd/ticket/1883 The patch introduces a new Kerberos provider option called krb5_use_kdcinfo. The option is true by default in all providers. When set to false, the SSSD will not create krb5 info files that the locator plugin consumes and the user would have to set up the Kerberos options manually in krb5.conf
* providers: refresh expired netgroupsPavel Březina2013-06-103-0/+183
| | | | https://fedorahosted.org/sssd/ticket/1713
* LDAP: Do not store separate GID for subdomain usersJakub Hrozek2013-06-071-10/+18
| | | | | As the subdomains are MPG domains, we don't want to store a separate GID for the subdomain users, but rather just create a UPG.
* Split generating primary GID for ID mapped users into a separate functionJakub Hrozek2013-06-071-41/+70
| | | | | | Move the part of sdap_save_user into a separate function so that it can be special cased an only called for users in primary domains, not subdomain users.
* LDAP: store FQDNs for trusted users and groupsJakub Hrozek2013-06-075-12/+36
| | | | | | Because the NSS responder expects the name attribute to contain FQDN, we must save the name as FQDN in the LDAP provider if the domain we save to is a subdomain.
* LDAP: split a function to create search basesJakub Hrozek2013-06-072-29/+73
| | | | | This function will be used later to fill the sdap_domain structures with search bases.
* LDAP: return sdap search return code to IDJakub Hrozek2013-06-075-50/+126
| | | | | | | | By default, the LDAP searches delete the entry from cache if it wasn't found during a search. But if a search wants to try both Global Catalog and LDAP, for example, it might be beneficial to have an option to only delete the entry from cache after the last operation fails to prevent unnecessary memberof operations for example.
* LDAP: new SDAP domain structureJakub Hrozek2013-06-0721-127/+281
| | | | | | | | | | | 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.
* LDAP: Pass in a connection to ID functionsJakub Hrozek2013-06-076-29/+62
| | | | | | | Instead of using the default connection from the sdap_id_ctx, allow the caller to specify which connection shall be used for this particular request. Again, no functional change is present in this patch, just another parameter is added.