[SSSD] [PATCH] Fix check if LDAP id provider is already initialized

Sumit Bose sbose at redhat.com
Wed May 19 08:15:31 UTC 2010


Hi,

the ldap_access_filter patch introduces a check if the LDAP id provider
is already initialized so that the LDAP access provider can use the same
global connection as the id provider. This worked in tests because two
errors (missing '==0' and wrong case) were canceling each other. But it
would fail in the rare case where the id provider is not the LDAP
provider. This patch sould fix it.

bye,
Sumit
-------------- next part --------------
From cc5ba82def650a6edbcdbbc4ff93a0c1d3f0aa86 Mon Sep 17 00:00:00 2001
From: Sumit Bose <sbose at redhat.com>
Date: Wed, 19 May 2010 10:07:59 +0200
Subject: [PATCH] Fix check if LDAP id provider is already initialized

---
 src/providers/ldap/ldap_init.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/providers/ldap/ldap_init.c b/src/providers/ldap/ldap_init.c
index af98d8e..3079caa 100644
--- a/src/providers/ldap/ldap_init.c
+++ b/src/providers/ldap/ldap_init.c
@@ -64,7 +64,7 @@ int sssm_ldap_id_init(struct be_ctx *bectx,
 
     /* If we're already set up, just return that */
     if(bectx->bet_info[BET_ID].mod_name &&
-       strcmp("LDAP", bectx->bet_info[BET_ID].mod_name)) {
+       strcmp("ldap", bectx->bet_info[BET_ID].mod_name) == 0) {
         DEBUG(8, ("Re-using sdap_id_ctx for this provider\n"));
         *ops = bectx->bet_info[BET_ID].bet_ops;
         *pvt_data = bectx->bet_info[BET_ID].pvt_bet_data;
-- 
1.6.6.1



More information about the sssd-devel mailing list