[SSSD] [PATCH] Hint about removing sysdb if initializing ID map fails

Jakub Hrozek jhrozek at redhat.com
Sat Nov 22 14:56:17 UTC 2014


On Thu, Nov 20, 2014 at 06:47:35PM +0100, Pavel Reichl wrote:
> 
> On 11/20/2014 01:41 PM, Jakub Hrozek wrote:
> >--- a/src/providers/ipa/ipa_init.c
> >+++ b/src/providers/ipa/ipa_init.c
> >@@ -225,7 +225,13 @@ int sssm_ipa_id_init(struct be_ctx *bectx,
> >      /* Set up the ID mapping object */
> >      ret = ipa_idmap_init(sdap_ctx, sdap_ctx, &sdap_ctx->opts->idmap_ctx);
> >-    if (ret != EOK) goto done;
> >+    if (ret != EOK) {
> >+        DEBUG(SSSDBG_FATAL_FAILURE,
> >+              "Could not initialize ID mapping. In case ID mapping properties"
> >+              "changed on the server, please remove the SSSD database\n");
> I think you are missing a space after properties.

Thanks, I fixed that in the attached patch.
-------------- next part --------------
>From 0aae23699cde121b2cb4244369bf1da88954d6e2 Mon Sep 17 00:00:00 2001
From: Jakub Hrozek <jhrozek at redhat.com>
Date: Thu, 20 Nov 2014 13:39:09 +0100
Subject: [PATCH] Hint about removing sysdb if initializing ID map fails

https://fedorahosted.org/sssd/ticket/2477
---
 src/providers/ipa/ipa_init.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/src/providers/ipa/ipa_init.c b/src/providers/ipa/ipa_init.c
index 45abd0e2ae3d5909e33fd0fca2027a238264b455..160d15cac42a1c1083722d656d369442e6ee4dd8 100644
--- a/src/providers/ipa/ipa_init.c
+++ b/src/providers/ipa/ipa_init.c
@@ -225,7 +225,13 @@ int sssm_ipa_id_init(struct be_ctx *bectx,
 
     /* Set up the ID mapping object */
     ret = ipa_idmap_init(sdap_ctx, sdap_ctx, &sdap_ctx->opts->idmap_ctx);
-    if (ret != EOK) goto done;
+    if (ret != EOK) {
+        DEBUG(SSSDBG_FATAL_FAILURE,
+              "Could not initialize ID mapping. In case ID mapping properties "
+              "changed on the server, please remove the SSSD database\n");
+        goto done;
+    }
+
 
     ret = ldap_id_setup_tasks(sdap_ctx);
     if (ret != EOK) {
-- 
1.9.3



More information about the sssd-devel mailing list