Hi,

Attached find a patch for the issue https://fedorahosted.org/sssd/ticket/1930

Ondra
--
Ondrej Kos
Associate Software Engineer
Identity Management - SSSD
Red Hat Czech
From ba83ff12f6b5ed7f305c2b4e7ac68da922d291e9 Mon Sep 17 00:00:00 2001
From: Ondrej Kos <o...@redhat.com>
Date: Fri, 24 May 2013 13:48:42 +0200
Subject: [PATCH] Fail with misconfigured id-mapping ranges

https://fedorahosted.org/sssd/ticket/1930

On misconfigured id-mapping range variables, the provider should not
start. We were internally correctly setting error code for failure, but
interruption of startup was not performed.

Also raised the debug level of message for this misconfiguration.
---
 src/providers/ldap/sdap_idmap.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/providers/ldap/sdap_idmap.c b/src/providers/ldap/sdap_idmap.c
index 43db0c83354ed2f8f112a8853ab66ab51e1d9fd2..a81bc98b89c5ef0beea4bbf54f54436059e80f65 100644
--- a/src/providers/ldap/sdap_idmap.c
+++ b/src/providers/ldap/sdap_idmap.c
@@ -81,10 +81,11 @@ sdap_idmap_init(TALLOC_CTX *mem_ctx,
             || idmap_upper <= idmap_lower
             || (idmap_upper-idmap_lower) < rangesize)
     {
-        DEBUG(SSSDBG_CRIT_FAILURE,
+        DEBUG(SSSDBG_FATAL_FAILURE,
               ("Invalid settings for range selection: [%d][%d][%d]\n",
                idmap_lower, idmap_upper, rangesize));
         ret = EINVAL;
+        goto done;
     }
 
     if (((idmap_upper - idmap_lower) % rangesize) != 0) {
-- 
1.8.1.4

_______________________________________________
sssd-devel mailing list
sssd-devel@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/sssd-devel

Reply via email to