ldap/servers/plugins/dna/dna.c | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
New commits:
commit f23781293f4670ed84ef0fc5a496ad33dfe334d0
Author: Ludwig Krispenz <lkrispen(a)redhat.com>
Date: Wed Aug 27 15:05:36 2014 +0200
Ticket 47866 - Errors after upgrading related to attribute
"dnaremotebindmethod"
Bug Description: the dnaSharedConfig entries can contain "(null)" values
Fix Description: check if remoteBindDn and remoteConnProtocol are set, before
creating a vaue for teh entries.
NOTE: if these values aready have been created they have to be
deleted and the server restarted
https://fedorahosted.org/389/ticket/47866
Reviewed by: mark, thanks
diff --git a/ldap/servers/plugins/dna/dna.c b/ldap/servers/plugins/dna/dna.c
index ab0fc5d..d427dd3 100644
--- a/ldap/servers/plugins/dna/dna.c
+++ b/ldap/servers/plugins/dna/dna.c
@@ -2503,12 +2503,16 @@ dna_get_shared_config_attr_val(struct configEntry *config_entry,
char *attr, cha
while (server) {
if(slapi_sdn_compare(server->sdn, server_sdn) == 0){
if(strcmp(attr, DNA_REMOTE_BIND_METHOD) == 0){
- PR_snprintf(value, DNA_REMOTE_BUFSIZ, "%s",
server->remote_bind_method);
- found = 1;
+ if (server->remote_bind_method) {
+ PR_snprintf(value, DNA_REMOTE_BUFSIZ, "%s",
server->remote_bind_method);
+ found = 1;
+ }
break;
} else if(strcmp(attr, DNA_REMOTE_CONN_PROT) == 0){
- PR_snprintf(value, DNA_REMOTE_BUFSIZ, "%s",
server->remote_conn_prot);
- found = 1;
+ if (server->remote_conn_prot) {
+ PR_snprintf(value, DNA_REMOTE_BUFSIZ, "%s",
server->remote_conn_prot);
+ found = 1;
+ }
break;
}
}