[SSSD] [PATCH] IPA: do not try to save override data for the default view

Sumit Bose sbose at redhat.com
Thu Apr 23 11:32:57 UTC 2015


Hi,

this is a fix for an issue Steeve found while testing idviews and
overrides.

bye,
Sumit
-------------- next part --------------
From ece5ee1930418596988e56f0af122e7d7819eb96 Mon Sep 17 00:00:00 2001
From: Sumit Bose <sbose at redhat.com>
Date: Wed, 22 Apr 2015 15:10:07 +0200
Subject: [PATCH] IPA: do not try to save override data for the default view

For the default view all override data is available in the cached user
or group object. Even if separate override data is available it should
not be written into the cache.

Resolves https://fedorahosted.org/sssd/ticket/2630
---
 src/providers/ipa/ipa_s2n_exop.c | 15 ++++++++++-----
 1 file changed, 10 insertions(+), 5 deletions(-)

diff --git a/src/providers/ipa/ipa_s2n_exop.c b/src/providers/ipa/ipa_s2n_exop.c
index a844ee99d25ec28bb02ec7b7fd0afa722b6ac189..b9de88984ea36d5010d5544258d7d0cc68bfa669 100644
--- a/src/providers/ipa/ipa_s2n_exop.c
+++ b/src/providers/ipa/ipa_s2n_exop.c
@@ -2164,11 +2164,16 @@ static errno_t ipa_s2n_save_objects(struct sss_domain_info *dom,
         goto done;
     }
 
-    ret = sysdb_store_override(dom, view_name, type, override_attrs,
-                               res->msgs[0]->dn);
-    if (ret != EOK) {
-        DEBUG(SSSDBG_OP_FAILURE, "sysdb_store_override failed.\n");
-        goto done;
+    if (strcmp(view_name, SYSDB_DEFAULT_VIEW_NAME) != 0) {
+        /* For the default view the data return by the extdom plugin already
+         * contains all needed data and it is not expected to have a separate
+         * override object. */
+        ret = sysdb_store_override(dom, view_name, type, override_attrs,
+                                   res->msgs[0]->dn);
+        if (ret != EOK) {
+            DEBUG(SSSDBG_OP_FAILURE, "sysdb_store_override failed.\n");
+            goto done;
+        }
     }
 
 done:
-- 
2.1.0



More information about the sssd-devel mailing list