public inbox for cluster-cvs@sourceware.org
help / color / mirror / Atom feed
* cluster: STABLE3 - config: Remove superflous empty objects created by LDAP loader.
@ 2009-09-10 13:31 Christine Caulfield
0 siblings, 0 replies; only message in thread
From: Christine Caulfield @ 2009-09-10 13:31 UTC (permalink / raw)
To: cluster-cvs-relay
Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=631ec23c7baf7fc4ff6cad16fba7f8a02ebe0dcc
Commit: 631ec23c7baf7fc4ff6cad16fba7f8a02ebe0dcc
Parent: 0a053b10bf5888a0bc879296bef6fe7e5565400a
Author: Christine Caulfield <ccaulfie@redhat.com>
AuthorDate: Thu Sep 10 14:29:11 2009 +0100
Committer: Christine Caulfield <ccaulfie@redhat.com>
CommitterDate: Thu Sep 10 14:29:11 2009 +0100
config: Remove superflous empty objects created by LDAP loader.
These could cause the configuration to fail to validate. It would work
OK but ccs_config_validate didn't like it. ... and it looked odd.
Also corrected an error message that said ldap_bind_simple failed when
it was actually ldap_initialize (sic).
Signed-off-by: Christine Caulfield <ccaulfie@redhat.com>
---
config/plugins/ldap/configldap.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/config/plugins/ldap/configldap.c b/config/plugins/ldap/configldap.c
index 704763f..c4549ae 100644
--- a/config/plugins/ldap/configldap.c
+++ b/config/plugins/ldap/configldap.c
@@ -195,6 +195,9 @@ static int read_config_for(LDAP *ld, struct objdb_iface_ver0 *objdb, hdb_handle_
parsed_dn[0][0][0].la_value.bv_len);
}
else {
+ /* Remove redundant empty parent. */
+ objdb->object_destroy(object_handle);
+
parent_handle = find_parent(objdb, parsed_dn, 2, object);
/* Create a new object with the same name as the current one */
objdb->object_create(parent_handle, &object_handle, parsed_dn[1][0][0].la_value.bv_val,
@@ -264,7 +267,7 @@ static int init_config(struct objdb_iface_ver0 *objdb)
/* Connect to the LDAP server */
if (ldap_initialize(&ld, ldap_url)) {
- sprintf(error_reason, "ldap_simple_bind failed: %s\n", strerror(errno));
+ sprintf(error_reason, "ldap_initialize failed: %s\n", strerror(errno));
return -1;
}
version = LDAP_VERSION3;
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2009-09-10 13:31 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-09-10 13:31 cluster: STABLE3 - config: Remove superflous empty objects created by LDAP loader Christine Caulfield
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).