diff --git a/ldap/servers/slapd/ldaputil.c b/ldap/servers/slapd/ldaputil.c index 1c67e51..253a1b6 100644 --- a/ldap/servers/slapd/ldaputil.c +++ b/ldap/servers/slapd/ldaputil.c @@ -684,13 +682,21 @@ slapi_ldap_init_ext( char *pp = NULL; if (NULL == pluginpath || (*pluginpath == '\0')) { slapi_log_error(SLAPI_LOG_SHELL, "slapi_ldap_init_ext", "configpluginpath == NULL\n"); if (!(pluginpath = getenv("SASL_PATH"))) { #if defined(LINUX) && defined(__LP64__) pluginpath = "/usr/lib64/sasl2"; + if (PR_SUCCESS != PR_Access(pluginpath, PR_ACCESS_EXISTS)) { + /* Since the path does not exist, try gnu triplet. */ + pluginpath = "/usr/lib/x86_64-linux-gnu"; + } #else pluginpath = "/usr/lib/sasl2"; + if (PR_SUCCESS != PR_Access(pluginpath, PR_ACCESS_EXISTS)) { + /* Since the path does not exist, try gnu triplet. */ + pluginpath = "/usr/lib/i386-linux-gnu"; + } #endif } } diff --git a/ldap/servers/slapd/saslbind.c b/ldap/servers/slapd/saslbind.c index 78031dc..1aa73ea 100644 --- a/ldap/servers/slapd/saslbind.c +++ b/ldap/servers/slapd/saslbind.c @@ -545,8 +545,16 @@ static int ids_sasl_getpluginpath(sasl_conn_t *conn, const char **path) if (!(pluginpath = getenv("SASL_PATH"))) { #if defined(LINUX) && defined(__LP64__) pluginpath = "/usr/lib64/sasl2"; + if (PR_SUCCESS != PR_Access(pluginpath, PR_ACCESS_EXISTS)) { + /* Since the path does not exist, try gnu triplet. */ + pluginpath = "/usr/lib/x86_64-linux-gnu"; + } #else pluginpath = "/usr/lib/sasl2"; + if (PR_SUCCESS != PR_Access(pluginpath, PR_ACCESS_EXISTS)) { + /* Since the path does not exist, try gnu triplet. */ + pluginpath = "/usr/lib/i386-linux-gnu"; + } #endif } }