Browse Source

hammer the with_ldap build to actually compile a non-dummy ldap interface that compiles with current OpenLDAP

Michael van Elst 23 years ago
parent
commit
e16423722c
2 changed files with 55 additions and 0 deletions
  1. 46 0
      sasl/sasl.patch
  2. 9 0
      sasl/sasl.spec

+ 46 - 0
sasl/sasl.patch

@@ -16,3 +16,49 @@
  	if (sock) break;
  	
  	cur_host = db_host;
+--- saslauthd/lak.c.dist	Wed Mar 12 11:39:22 2003
++++ saslauthd/lak.c	Wed Mar 12 11:39:22 2003
+@@ -532,8 +532,6 @@
+ 		return;
+ 
+ 	if (lak->ld != NULL) {
+-		if (lak->conf->cache_ttl)
+-			ldap_destroy_cache(lak->ld);
+ 		ldap_unbind_s(lak->ld);
+ 	}
+ 
+@@ -642,16 +640,6 @@
+ 		syslog(LOG_WARNING|LOG_AUTH, "Unable to set LDAP_OPT_RESTART.");
+ 	}
+ 
+-	/*
+-	 * Set up client-side caching
+-	 */
+-	if (lak->conf->cache_ttl) {
+-		rc = ldap_enable_cache(lak->ld, lak->conf->cache_ttl, lak->conf->cache_mem);
+-		if (rc != LDAP_SUCCESS) {
+-			syslog(LOG_WARNING|LOG_AUTH, "Unable to enable cache -- continuing (%s)", ldap_err2string(rc));
+-		}
+-	}
+-
+ 	return LAK_OK;
+ }
+ 
+@@ -667,8 +655,6 @@
+ 
+ 	if (lak->bind_status == LAK_NOT_BOUND) {
+ 		if (lak->ld != NULL) {
+-			if (lak->conf->cache_ttl)
+-				ldap_destroy_cache(lak->ld);
+ 			ldap_unbind_s(lak->ld);
+ 			lak->ld = NULL;
+ 		}
+@@ -683,8 +669,6 @@
+ 			lak->bind_status = LAK_NOT_BOUND;
+ 
+ 			if (lak->ld != NULL) {
+-				if (lak->conf->cache_ttl)
+-					ldap_destroy_cache(lak->ld);
+ 				ldap_unbind_s(lak->ld);
+ 
+ 				lak->ld = NULL;

+ 9 - 0
sasl/sasl.spec

@@ -92,6 +92,12 @@ AutoReqProv:  no
         -e "s;javah;javah-xxx;g" \
         -e "s;javadoc;javadoc-xxx;g" \
         configure
+%if "%{with_ldap}" == "yes"
+    echo 'ac_cv_lib_ldap_ldap_initialize=yes' >config.cache
+    %{l_shtool} subst \
+        -e "s;\(\$LDAP_LIBS\) *\(-lcrypto\);\1 -lssl \2;" \
+        saslauthd/configure
+%endif
 
     cflags="%{l_cflags -O} %{l_cppflags}"
     ldflags="%{l_ldflags}"
@@ -101,6 +107,7 @@ AutoReqProv:  no
     libs="$libs `%{l_prefix}/bin/fsl-config --all --libs`"
 %endif
 %if "%{with_ldap}" == "yes"
+    cflags="$cflags -DAUTH_LDAP"
     ldflags="$ldflags `%{l_prefix}/bin/fsl-config --all --ldflags`"
     libs="$libs `%{l_prefix}/bin/fsl-config --all --libs`"
 %endif
@@ -132,8 +139,10 @@ AutoReqProv:  no
 %endif
 %if "%{with_ldap}" == "yes"
         --with-ldap=%{l_prefix} \
+        --with-openssl=%{l_prefix} \
 %else
         --without-ldap \
+        --without-openssl \
 %endif
 %if "%{with_mysql}" == "yes"
         --with-mysql=%{l_prefix} \