ldap/servers/slapd/libglobs.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+)
New commits: commit f1461312fc9e221413b19d6babbdf5a886794d10 Author: Mark Reynolds mreynolds@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!) (cherry picked from commit 6200f6812682760cd2a54d6a3bcbb009a0dffe79)
diff --git a/ldap/servers/slapd/libglobs.c b/ldap/servers/slapd/libglobs.c index f8c5b01..b925a2c 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 */ @@ -6764,6 +6765,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); @@ -7434,3 +7438,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] = ' '; + } + } +}
389-commits@lists.fedoraproject.org