summaryrefslogtreecommitdiff
blob: ffc16453604859e1a94d4bddd4c96e1cf01a4bb1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
diff --git a/src/rgw/librgw.cc b/src/rgw/librgw.cc
index c476129..cad54b8 100644
--- a/src/rgw/librgw.cc
+++ b/src/rgw/librgw.cc
@@ -470,7 +470,11 @@ namespace rgw {
     const string& ldap_searchdn = store->ctx()->_conf->rgw_ldap_searchdn;
     const string& ldap_dnattr =
       store->ctx()->_conf->rgw_ldap_dnattr;
+#ifdef HAVE_OPENLDAP
     std::string ldap_bindpw = parse_rgw_ldap_bindpw(store->ctx());
+#else
+    std::string ldap_bindpw;
+#endif /* HAVE_OPENLDAP */
 
     ldh = new rgw::LDAPHelper(ldap_uri, ldap_binddn, ldap_bindpw.c_str(),
 			      ldap_searchdn, ldap_dnattr);
diff --git a/src/rgw/rgw_rest_s3.cc b/src/rgw/rgw_rest_s3.cc
index e9f24f3..7291e69 100644
--- a/src/rgw/rgw_rest_s3.cc
+++ b/src/rgw/rgw_rest_s3.cc
@@ -3091,7 +3091,11 @@ void RGW_Auth_S3::init_impl(RGWRados* store)
   const string& ldap_searchdn = store->ctx()->_conf->rgw_ldap_searchdn;
   const string& ldap_dnattr =
     store->ctx()->_conf->rgw_ldap_dnattr;
+#ifdef HAVE_OPENLDAP
   std::string ldap_bindpw = parse_rgw_ldap_bindpw(store->ctx());
+#else
+  std::string ldap_bindpw;
+#endif /* HAVE_OPENLDAP */
 
   ldh = new rgw::LDAPHelper(ldap_uri, ldap_binddn, ldap_bindpw,
 			    ldap_searchdn, ldap_dnattr);