walters / rpms / samba

Forked from rpms/samba 5 years ago
Clone
03d0b9f
diff --git a/source/nsswitch/idmap_ldap.c b/source/nsswitch/idmap_ldap.c
03d0b9f
index ca7d32b..7c02779 100644
03d0b9f
--- a/source/nsswitch/idmap_ldap.c
03d0b9f
+++ b/source/nsswitch/idmap_ldap.c
03d0b9f
@@ -287,16 +287,9 @@ static NTSTATUS idmap_ldap_alloc_init(const char *params)
03d0b9f
 	}
03d0b9f
 	CHECK_ALLOC_DONE( idmap_alloc_ldap->url );
03d0b9f
 
03d0b9f
-	tmp = lp_ldap_idmap_suffix();
03d0b9f
+	tmp = lp_parm_const_string(-1, "idmap alloc config", "ldap_base_dn", NULL);
03d0b9f
 	if ( ! tmp || ! *tmp) {
03d0b9f
-		tmp = lp_parm_const_string(-1, "idmap alloc config", "ldap_base_dn", NULL);
03d0b9f
-	}
03d0b9f
-	if ( ! tmp) {
03d0b9f
-		tmp = lp_ldap_suffix();
03d0b9f
-		if (tmp) {
03d0b9f
-			DEBUG(1, ("WARNING: Trying to use the global ldap suffix(%s)\n", tmp));
03d0b9f
-			DEBUGADD(1, ("as suffix. This may not be what you want!\n"));
03d0b9f
-		}
03d0b9f
+		tmp = lp_ldap_idmap_suffix();
03d0b9f
 		if ( ! tmp) {
03d0b9f
 			DEBUG(1, ("ERROR: missing idmap ldap suffix\n"));
03d0b9f
 			ret = NT_STATUS_UNSUCCESSFUL;
03d0b9f
@@ -780,21 +773,16 @@ static NTSTATUS idmap_ldap_db_init(struct idmap_domain *dom)
03d0b9f
 	}
03d0b9f
 	CHECK_ALLOC_DONE(ctx->url);
03d0b9f
 
03d0b9f
-	tmp = lp_ldap_idmap_suffix();
03d0b9f
-	if ( ! tmp || ! *tmp) {
03d0b9f
-		tmp = lp_parm_const_string(-1, config_option, "ldap_base_dn", NULL);
03d0b9f
-	}
03d0b9f
-	if ( ! tmp) {
03d0b9f
-		tmp = lp_ldap_suffix();
03d0b9f
-		if (tmp) {
03d0b9f
-			DEBUG(1, ("WARNING: Trying to use the global ldap suffix(%s)\n", tmp));
03d0b9f
-			DEBUGADD(1, ("as suffix. This may not be what you want!\n"));
03d0b9f
-		} else {
03d0b9f
-			DEBUG(1, ("ERROR: missing idmap ldap suffix\n"));
03d0b9f
-			ret = NT_STATUS_UNSUCCESSFUL;
03d0b9f
-			goto done;
03d0b9f
-		}		
03d0b9f
-	}
03d0b9f
+        tmp = lp_parm_const_string(-1, config_option, "ldap_base_dn", NULL);
03d0b9f
+        if ( ! tmp || ! *tmp) {
03d0b9f
+                tmp = lp_ldap_idmap_suffix();
03d0b9f
+                if ( ! tmp) {
03d0b9f
+                        DEBUG(1, ("ERROR: missing idmap ldap suffix\n"));
03d0b9f
+                        ret = NT_STATUS_UNSUCCESSFUL;
03d0b9f
+                        goto done;
03d0b9f
+		}
03d0b9f
+        }
03d0b9f
+
03d0b9f
 	ctx->suffix = talloc_strdup(ctx, tmp);
03d0b9f
 	CHECK_ALLOC_DONE(ctx->suffix);
03d0b9f