summaryrefslogtreecommitdiffstats
path: root/ldap/servers/slapd/saslbind.c
diff options
context:
space:
mode:
authorNathan Kinder <nkinder@redhat.com>2006-11-06 19:33:42 +0000
committerNathan Kinder <nkinder@redhat.com>2006-11-06 19:33:42 +0000
commit6f4bf3ed01dd5b7fba4e603b0c3f495c766d64ba (patch)
tree0788cf5db0b63684b83631f55e91e8daa48d1da6 /ldap/servers/slapd/saslbind.c
parentcd00618c33892c16160395fea526aa86e2ffc3c4 (diff)
downloadds-6f4bf3ed01dd5b7fba4e603b0c3f495c766d64ba.tar.gz
ds-6f4bf3ed01dd5b7fba4e603b0c3f495c766d64ba.tar.xz
ds-6f4bf3ed01dd5b7fba4e603b0c3f495c766d64ba.zip
Resolves: 214238
Summary: Added new config parameter for setting the SASL plug-in path.
Diffstat (limited to 'ldap/servers/slapd/saslbind.c')
-rw-r--r--ldap/servers/slapd/saslbind.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/ldap/servers/slapd/saslbind.c b/ldap/servers/slapd/saslbind.c
index e521c49e..1c91fe92 100644
--- a/ldap/servers/slapd/saslbind.c
+++ b/ldap/servers/slapd/saslbind.c
@@ -552,15 +552,21 @@ static int ids_sasl_canon_user(
}
#ifdef CYRUS_SASL
-#if !defined(LINUX)
static int ids_sasl_getpluginpath(sasl_conn_t *conn, const char **path)
{
- static char *pluginpath = "../../../lib/sasl2";
+ /* Try to get path from config, otherwise check for SASL_PATH environment
+ * variable. If neither of these are set, just default to /usr/lib/sasl2
+ */
+ char *pluginpath = config_get_saslpath();
+ if ((!pluginpath) || (*pluginpath == '\0')) {
+ if (!(pluginpath = getenv("SASL_PATH"))) {
+ pluginpath = "/usr/lib/sasl2";
+ }
+ }
*path = pluginpath;
return SASL_OK;
}
#endif
-#endif
static sasl_callback_t ids_sasl_callbacks[] =
{
@@ -589,18 +595,12 @@ static sasl_callback_t ids_sasl_callbacks[] =
NULL
},
#ifdef CYRUS_SASL
- /* On Linux: we use system sasl and plugins are found in the default path
- * /usr/lib/sasl2
- * On other platforms: we need to tell cyrus sasl where they are localted.
- */
-#if !defined(LINUX)
{
SASL_CB_GETPATH,
(IFP) ids_sasl_getpluginpath,
NULL
},
#endif
-#endif
{
SASL_CB_LIST_END,
(IFP) NULL,
@@ -751,7 +751,7 @@ char **ids_sasl_listmech(Slapi_PBlock *pb)
}
PR_Unlock(pb->pb_conn->c_mutex);
- LDAPDebug( LDAP_DEBUG_TRACE, ">= ids_sasl_listmech\n", 0, 0, 0 );
+ LDAPDebug( LDAP_DEBUG_TRACE, "<= ids_sasl_listmech\n", 0, 0, 0 );
return ret;
}