public inbox for cluster-cvs@sourceware.org help / color / mirror / Atom feed
From: Christine Caulfield <chrissie@fedoraproject.org> To: cluster-cvs-relay@redhat.com Subject: cluster: STABLE3 - config: Remove superflous empty objects created by LDAP loader. Date: Thu, 10 Sep 2009 13:31:00 -0000 [thread overview] Message-ID: <20090910133112.3C5681201EF@lists.fedorahosted.org> (raw) 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;
reply other threads:[~2009-09-10 13:31 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20090910133112.3C5681201EF@lists.fedorahosted.org \ --to=chrissie@fedoraproject.org \ --cc=cluster-cvs-relay@redhat.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).