Sfoglia il codice sorgente

Bug(s) fixed: 172672
Bug Description: sasl code needs to accomodate older versions of sasl
Reviewed by: Noriko (Thanks!)
Fix Description: 1) Change build to use -L/usr/kerberos/lib on RHEL3
since that's where gssapi_krb5 is on that platform 2) ifdef out the use
of SASL_AUX_PASSWORD_PROP - if it's not defined, we don't need to use it.
Platforms tested: RHEL3
Flag Day: no
Doc impact: no

Rich Megginson 20 anni fa
parent
commit
8b8176f3b8
2 ha cambiato i file con 8 aggiunte e 1 eliminazioni
  1. 5 1
      components.mk
  2. 3 0
      ldap/servers/slapd/saslbind.c

+ 5 - 1
components.mk

@@ -355,7 +355,11 @@ LIBLDAP = $(addprefix $(LDAP_LIBPATH)/, $(LDAPOBJNAME))
 ### SASL package ##########################################
 
 ifeq ($(ARCH), Linux)
-  SASL_LIBPATH = /usr/lib
+  ifeq ($(BUILD_ARCH), RHEL3)
+    SASL_LIBPATH = /usr/kerberos/lib
+  else
+    SASL_LIBPATH = /usr/lib
+  endif
   SASL_INCDIR = /usr/include/sasl
 else
   ifdef SASL_SOURCE_ROOT

+ 3 - 0
ldap/servers/slapd/saslbind.c

@@ -498,11 +498,14 @@ static int ids_sasl_canon_user(
 
     clear = pw;
     if (clear) {
+/* older versions of sasl do not have SASL_AUX_PASSWORD_PROP, so omit it */
+#ifdef SASL_AUX_PASSWORD_PROP
         if (prop_set(propctx, SASL_AUX_PASSWORD_PROP, clear, -1) != 0) {
             /* Failure is benign here because some mechanisms don't support this property */
             /*LDAPDebug(LDAP_DEBUG_TRACE, "prop_set(userpassword) failed\n", 0, 0, 0);
             goto fail */ ;
         }
+#endif /* SASL_AUX_PASSWORD_PROP */
         if (prop_set(propctx, SASL_AUX_PASSWORD, clear, -1) != 0) {
             /* Failure is benign here because some mechanisms don't support this property */
             /*LDAPDebug(LDAP_DEBUG_TRACE, "prop_set(userpassword) failed\n", 0, 0, 0);