]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Typo
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>
Tue, 30 Jun 2015 18:24:55 +0000 (14:24 -0400)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Tue, 30 Jun 2015 18:25:00 +0000 (14:25 -0400)
src/modules/rlm_ldap/rlm_ldap.c

index 010206c72e8fe2bc2cb7c70aae719ad3e8de7aae..e8e6afcaf60410c7373b0886b245b5bcf67be302 100644 (file)
@@ -852,7 +852,7 @@ static int mod_instantiate(CONF_SECTION *conf, void *instance)
 
                value = cf_pair_value(cp);
 
-#if defined(HAVE_LDAP_URL_PARSE) && defined(HAVE_LDAP_IS_LDAP_URL) && defined(LDAP_URL_DESC2STR)
+#if defined(HAVE_LDAP_URL_PARSE) && defined(HAVE_LDAP_IS_LDAP_URL) && defined(HAVE_LDAP_URL_DESC2STR)
                /*
                 *      Split original server value out into URI, server and port
                 *      so whatever initialization function we use later will have
@@ -879,10 +879,11 @@ static int mod_instantiate(CONF_SECTION *conf, void *instance)
                                goto ldap_url_error;
                        }
 
-                       if (ldap_url->lud_scope >= 0) {
+                       if (ldap_url->lud_scope != 0) {
                                cf_log_err_cs(conf, "Scope cannot be specified via server URL");
                                goto ldap_url_error;
                        }
+                       ldap_url->lud_scope = -1;       /* Otherwise LDAP adds ?base */
 
                        /* We allow extensions */
 
@@ -920,7 +921,7 @@ static int mod_instantiate(CONF_SECTION *conf, void *instance)
                                        goto ldap_url_error;
                                }
                                inst->server = talloc_asprintf_append(inst->server, "%s ", url);
-                               LDAP_FREE(url);
+                               free(url);
                        }
 #  else
                        /*