Hi,

this patch fixes an issue in the CLDAP plugin found by Coverity.

bye,
Sumit
From c993567c2c23857df361c527a4abd185b1f01a1e Mon Sep 17 00:00:00 2001
From: Sumit Bose <sb...@redhat.com>
Date: Wed, 28 Aug 2013 10:10:52 +0200
Subject: [PATCH] CLDAP: make sure an empty reply is returned on any error

If ipa_cldap_decode() reply is not initialized.

Fixes https://fedorahosted.org/freeipa/ticket/3885
---
 daemons/ipa-slapi-plugins/ipa-cldap/ipa_cldap_worker.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/daemons/ipa-slapi-plugins/ipa-cldap/ipa_cldap_worker.c 
b/daemons/ipa-slapi-plugins/ipa-cldap/ipa_cldap_worker.c
index 
df7cc11a97c843692f461b21e1a99e75773dd886..db4a3d0611a713feb30843bb01b7645afcb2b695
 100644
--- a/daemons/ipa-slapi-plugins/ipa-cldap/ipa_cldap_worker.c
+++ b/daemons/ipa-slapi-plugins/ipa-cldap/ipa_cldap_worker.c
@@ -276,13 +276,14 @@ static void ipa_cldap_process(struct ipa_cldap_ctx *ctx,
     LOG_TRACE("CLDAP Request received");
 
     ret = ipa_cldap_netlogon(ctx, req, &reply);
+
+done:
     if (ret != 0) {
         /* bad request, or internal error, return empty reply */
         /* as Windows does per MS-ADTS 6.3.3.3 */
         memset(&reply, 0, sizeof(struct berval));
     }
 
-done:
     ipa_cldap_respond(ctx, req, &reply);
 
     ipa_cldap_free_kvps(&req->kvps);
-- 
1.8.1.4

_______________________________________________
Freeipa-devel mailing list
Freeipa-devel@redhat.com
https://www.redhat.com/mailman/listinfo/freeipa-devel

Reply via email to