ldap/servers/slapd/libglobs.c | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
New commits:
commit 6200f6812682760cd2a54d6a3bcbb009a0dffe79
Author: Mark Reynolds <mreynolds(a)redhat.com>
Date: Mon Dec 2 15:08:15 2013 -0500
Ticket 47613 - Impossible to configure nsslapd-allowed-sasl-mechanisms
Bug Description: The design doc sasy you can use comma separated list of supported
mechanisms,
but in fact this was not supported.
Fix Description: Allow comma separated lists.
https://fedorahosted.org/389/ticket/47613
Reviewed by: richm(Thanks!)
diff --git a/ldap/servers/slapd/libglobs.c b/ldap/servers/slapd/libglobs.c
index 7f00134..3afcb30 100644
--- a/ldap/servers/slapd/libglobs.c
+++ b/ldap/servers/slapd/libglobs.c
@@ -125,6 +125,7 @@ static int config_set_onoff( const char *attrname, char *value,
int *configvalue, char *errorbuf, int apply );
static int config_set_schemareplace ( const char *attrname, char *value,
char *errorbuf, int apply );
+static void remove_commas(char *str);
/* Keeping the initial values */
/* CONFIG_INT/CONFIG_LONG */
@@ -6820,6 +6821,9 @@ config_set_allowed_sasl_mechs(const char *attrname, char *value,
char *errorbuf,
return LDAP_SUCCESS;
}
+ /* cyrus sasl doesn't like comma separated lists */
+ remove_commas(value);
+
CFG_LOCK_WRITE(slapdFrontendConfig);
slapdFrontendConfig->allowed_sasl_mechs = slapi_ch_strdup(value);
CFG_UNLOCK_WRITE(slapdFrontendConfig);
@@ -7577,3 +7581,17 @@ slapi_err2string(int result)
#endif
}
+/* replace commas with spaces */
+static void
+remove_commas(char *str)
+{
+ int i;
+
+ for (i = 0; str && str[i]; i++)
+ {
+ if (str[i] == ',')
+ {
+ str[i] = ' ';
+ }
+ }
+}