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