Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-15-SP3:Update
sssd.23277
0013-Revert-LDAP-IPA-add-local-email-address-to...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0013-Revert-LDAP-IPA-add-local-email-address-to-aliases.patch of Package sssd.23277
From bc561347f789cd05d6430b3af9bcac604238c8fc Mon Sep 17 00:00:00 2001 From: Jakub Hrozek <jhrozek@redhat.com> Date: Thu, 21 Jun 2018 12:27:32 +0200 Subject: [PATCH 13/18] Revert "LDAP/IPA: add local email address to aliases" MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit 9a310913d696d190db14c625080678db853a33fd. Storing the e-mail address as a nameAlias was a performance optimization to avoid having to fall back to the UPN lookup, but had the disadvantage of returning multiple results for cases where an e-mail address is the same as a user's fully qualified name. Since the e-mail lookups would still work without this optimization, just after one more lookup, let's revert the patch. Resolves: https://pagure.io/SSSD/sssd/issue/3607 Reviewed-by: Fabiano FidĂȘncio <fidencio@redhat.com> (cherry picked from commit 9d953f6e109da5ccd3e3709ac6ffe68daa9f8157) --- src/providers/ipa/ipa_s2n_exop.c | 49 -------------------------------- src/providers/ldap/sdap_utils.c | 22 -------------- 2 files changed, 71 deletions(-) diff --git a/src/providers/ipa/ipa_s2n_exop.c b/src/providers/ipa/ipa_s2n_exop.c index 9cb735526..6f3974637 100644 --- a/src/providers/ipa/ipa_s2n_exop.c +++ b/src/providers/ipa/ipa_s2n_exop.c @@ -2118,49 +2118,6 @@ done: return ret; } -static errno_t add_emails_to_aliases(struct sysdb_attrs *attrs, - struct sss_domain_info *dom) -{ - int ret; - const char **emails; - size_t c; - TALLOC_CTX *tmp_ctx; - - tmp_ctx = talloc_new(NULL); - if (tmp_ctx == NULL) { - DEBUG(SSSDBG_OP_FAILURE, "talloc_new failed.\n"); - return ENOMEM; - } - - ret = sysdb_attrs_get_string_array(attrs, SYSDB_USER_EMAIL, tmp_ctx, - &emails); - if (ret == EOK) { - for (c = 0; emails[c] != NULL; c++) { - if (is_email_from_domain(emails[c], dom)) { - ret = sysdb_attrs_add_lc_name_alias_safe(attrs, emails[c]); - if (ret != EOK) { - DEBUG(SSSDBG_OP_FAILURE, - "Failed to add lower-cased version of email [%s] " - "into the alias list\n", emails[c]); - goto done; - } - } - } - } else if (ret == ENOENT) { - DEBUG(SSSDBG_TRACE_ALL, "No email addresses available.\n"); - } else { - DEBUG(SSSDBG_OP_FAILURE, - "sysdb_attrs_get_string_array failed, skipping ...\n"); - } - - ret = EOK; - -done: - talloc_free(tmp_ctx); - - return ret; -} - static errno_t ipa_s2n_save_objects(struct sss_domain_info *dom, struct req_input *req_input, struct resp_attrs *attrs, @@ -2314,12 +2271,6 @@ static errno_t ipa_s2n_save_objects(struct sss_domain_info *dom, goto done; } - ret = add_emails_to_aliases(attrs->sysdb_attrs, dom); - if (ret != EOK) { - DEBUG(SSSDBG_OP_FAILURE, - "add_emails_to_aliases failed, skipping ...\n"); - } - if (upn == NULL) { /* We also have to store a fake UPN here, because otherwise the * krb5 child later won't be able to properly construct one as diff --git a/src/providers/ldap/sdap_utils.c b/src/providers/ldap/sdap_utils.c index 0ac3ab2e4..6d543101f 100644 --- a/src/providers/ldap/sdap_utils.c +++ b/src/providers/ldap/sdap_utils.c @@ -87,7 +87,6 @@ sdap_save_all_names(const char *name, int i; bool lowercase = !dom->case_sensitive; bool store_as_fqdn; - const char **emails; switch (entry_type) { case SYSDB_MEMBER_USER: @@ -144,27 +143,6 @@ sdap_save_all_names(const char *name, } - ret = sysdb_attrs_get_string_array(ldap_attrs, SYSDB_USER_EMAIL, tmp_ctx, - &emails); - if (ret == EOK) { - for (i = 0; emails[i] != NULL; i++) { - if (is_email_from_domain(emails[i], dom)) { - ret = sysdb_attrs_add_lc_name_alias_safe(attrs, emails[i]); - if (ret) { - DEBUG(SSSDBG_OP_FAILURE, - "Failed to add lower-cased version of email [%s] " - "into the alias list\n", emails[i]); - goto done; - } - } - } - } else if (ret == ENOENT) { - DEBUG(SSSDBG_TRACE_ALL, "No email addresses available.\n"); - } else { - DEBUG(SSSDBG_OP_FAILURE, - "sysdb_attrs_get_string_array failed, skipping ...\n"); - } - ret = EOK; done: talloc_free(tmp_ctx); -- 2.23.0
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor