svn commit: samba r25059 - in branches: SAMBA_3_2/source/nsswitch SAMBA_3_2_0/source/nsswitch

idra at samba.org idra at samba.org
Mon Sep 10 16:21:56 GMT 2007


Author: idra
Date: 2007-09-10 16:21:55 +0000 (Mon, 10 Sep 2007)
New Revision: 25059

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=25059

Log:

Apply to 3.2 as well


Modified:
   branches/SAMBA_3_2/source/nsswitch/idmap_ldap.c
   branches/SAMBA_3_2_0/source/nsswitch/idmap_ldap.c


Changeset:
Modified: branches/SAMBA_3_2/source/nsswitch/idmap_ldap.c
===================================================================
--- branches/SAMBA_3_2/source/nsswitch/idmap_ldap.c	2007-09-10 16:20:41 UTC (rev 25058)
+++ branches/SAMBA_3_2/source/nsswitch/idmap_ldap.c	2007-09-10 16:21:55 UTC (rev 25059)
@@ -287,16 +287,9 @@
 	}
 	CHECK_ALLOC_DONE( idmap_alloc_ldap->url );
 
-	tmp = lp_ldap_idmap_suffix();
+	tmp = lp_parm_const_string(-1, "idmap alloc config", "ldap_base_dn", NULL);
 	if ( ! tmp || ! *tmp) {
-		tmp = lp_parm_const_string(-1, "idmap alloc config", "ldap_base_dn", NULL);
-	}
-	if ( ! tmp) {
-		tmp = lp_ldap_suffix();
-		if (tmp) {
-			DEBUG(1, ("WARNING: Trying to use the global ldap suffix(%s)\n", tmp));
-			DEBUGADD(1, ("as suffix. This may not be what you want!\n"));
-		}
+		tmp = lp_ldap_idmap_suffix();
 		if ( ! tmp) {
 			DEBUG(1, ("ERROR: missing idmap ldap suffix\n"));
 			ret = NT_STATUS_UNSUCCESSFUL;
@@ -781,21 +774,16 @@
 	}
 	CHECK_ALLOC_DONE(ctx->url);
 
-	tmp = lp_ldap_idmap_suffix();
-	if ( ! tmp || ! *tmp) {
-		tmp = lp_parm_const_string(-1, config_option, "ldap_base_dn", NULL);
-	}
-	if ( ! tmp) {
-		tmp = lp_ldap_suffix();
-		if (tmp) {
-			DEBUG(1, ("WARNING: Trying to use the global ldap suffix(%s)\n", tmp));
-			DEBUGADD(1, ("as suffix. This may not be what you want!\n"));
-		} else {
-			DEBUG(1, ("ERROR: missing idmap ldap suffix\n"));
-			ret = NT_STATUS_UNSUCCESSFUL;
-			goto done;
-		}		
-	}
+        tmp = lp_parm_const_string(-1, config_option, "ldap_base_dn", NULL);
+        if ( ! tmp || ! *tmp) {
+                tmp = lp_ldap_idmap_suffix();
+                if ( ! tmp) {
+                        DEBUG(1, ("ERROR: missing idmap ldap suffix\n"));
+                        ret = NT_STATUS_UNSUCCESSFUL;
+                        goto done;
+		}
+        }
+
 	ctx->suffix = talloc_strdup(ctx, tmp);
 	CHECK_ALLOC_DONE(ctx->suffix);
 

Modified: branches/SAMBA_3_2_0/source/nsswitch/idmap_ldap.c
===================================================================
--- branches/SAMBA_3_2_0/source/nsswitch/idmap_ldap.c	2007-09-10 16:20:41 UTC (rev 25058)
+++ branches/SAMBA_3_2_0/source/nsswitch/idmap_ldap.c	2007-09-10 16:21:55 UTC (rev 25059)
@@ -287,16 +287,9 @@
 	}
 	CHECK_ALLOC_DONE( idmap_alloc_ldap->url );
 
-	tmp = lp_ldap_idmap_suffix();
+	tmp = lp_parm_const_string(-1, "idmap alloc config", "ldap_base_dn", NULL);
 	if ( ! tmp || ! *tmp) {
-		tmp = lp_parm_const_string(-1, "idmap alloc config", "ldap_base_dn", NULL);
-	}
-	if ( ! tmp) {
-		tmp = lp_ldap_suffix();
-		if (tmp) {
-			DEBUG(1, ("WARNING: Trying to use the global ldap suffix(%s)\n", tmp));
-			DEBUGADD(1, ("as suffix. This may not be what you want!\n"));
-		}
+		tmp = lp_ldap_idmap_suffix();
 		if ( ! tmp) {
 			DEBUG(1, ("ERROR: missing idmap ldap suffix\n"));
 			ret = NT_STATUS_UNSUCCESSFUL;
@@ -781,21 +774,16 @@
 	}
 	CHECK_ALLOC_DONE(ctx->url);
 
-	tmp = lp_ldap_idmap_suffix();
-	if ( ! tmp || ! *tmp) {
-		tmp = lp_parm_const_string(-1, config_option, "ldap_base_dn", NULL);
-	}
-	if ( ! tmp) {
-		tmp = lp_ldap_suffix();
-		if (tmp) {
-			DEBUG(1, ("WARNING: Trying to use the global ldap suffix(%s)\n", tmp));
-			DEBUGADD(1, ("as suffix. This may not be what you want!\n"));
-		} else {
-			DEBUG(1, ("ERROR: missing idmap ldap suffix\n"));
-			ret = NT_STATUS_UNSUCCESSFUL;
-			goto done;
-		}		
-	}
+        tmp = lp_parm_const_string(-1, config_option, "ldap_base_dn", NULL);
+        if ( ! tmp || ! *tmp) {
+                tmp = lp_ldap_idmap_suffix();
+                if ( ! tmp) {
+                        DEBUG(1, ("ERROR: missing idmap ldap suffix\n"));
+                        ret = NT_STATUS_UNSUCCESSFUL;
+                        goto done;
+		}
+        }
+
 	ctx->suffix = talloc_strdup(ctx, tmp);
 	CHECK_ALLOC_DONE(ctx->suffix);
 



More information about the samba-cvs mailing list