dpward / rpms / sssd

Forked from rpms/sssd 3 years ago
Clone
Blob Blame History Raw
From a79ca19a29c08de2ba42b8ce7b48244730896cfc Mon Sep 17 00:00:00 2001
From: Sumit Bose <sbose@redhat.com>
Date: Wed, 28 Jan 2015 11:44:37 +0100
Subject: [PATCH 186/188] ipa_s2n_save_objects: properly handle fully-qualified
 group names

Check if the given name is already fully-qualified instead of adding a
domain name unconditionally.

Related to https://fedorahosted.org/sssd/ticket/2529
       and https://fedorahosted.org/sssd/ticket/2524

Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
(cherry picked from commit 9ad346318dc2cc5d5a340d8d981ddfdcc6f632da)
---
 src/providers/ipa/ipa_s2n_exop.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/providers/ipa/ipa_s2n_exop.c b/src/providers/ipa/ipa_s2n_exop.c
index 35bd303d4aa3651e80c70297507bdc85d05bfbde..18f2a867df3ad705008537843ea94e38dab0006e 100644
--- a/src/providers/ipa/ipa_s2n_exop.c
+++ b/src/providers/ipa/ipa_s2n_exop.c
@@ -2074,7 +2074,7 @@ static errno_t ipa_s2n_save_objects(struct sss_domain_info *dom,
 
             if (IS_SUBDOMAIN(dom)) {
                 /* we always use the fully qualified name for subdomain users */
-                name = sss_tc_fqname(tmp_ctx, dom->names, dom, name);
+                name = sss_get_domain_name(tmp_ctx, name, dom);
                 if (!name) {
                     DEBUG(SSSDBG_OP_FAILURE, "failed to format user name,\n");
                     ret = ENOMEM;
-- 
2.1.0