Hello,

Fix crash triggered by missing sasl_user parameter.

--
Petr^2 Spacek
From 5e9454744939b64825b330135c7ab5579567be0e Mon Sep 17 00:00:00 2001
From: Petr Spacek <pspa...@redhat.com>
Date: Wed, 29 May 2013 14:56:28 +0200
Subject: [PATCH] Fix crash triggered by missing sasl_user parameter.

Signed-off-by: Petr Spacek <pspa...@redhat.com>
---
 src/ldap_helper.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/ldap_helper.c b/src/ldap_helper.c
index 424bc4b8afef924e92524ceca620e047380d70a4..4d22f2803ba4e9f5658b086dc7bb53579c5a3b92 100644
--- a/src/ldap_helper.c
+++ b/src/ldap_helper.c
@@ -440,6 +440,7 @@ validate_local_instance_settings(ldap_instance_t *inst, settings_set_t *set) {
 						  "gethostname() failed");
 					CLEANUP_WITH(ISC_R_FAILURE);
 				} else {
+					CHECK(str_new(inst->mctx, &buff));
 					CHECK(str_sprintf(buff,
 							  "DNS/%s", hostname));
 					log_debug(2, "SASL mech GSSAPI defined "
@@ -466,6 +467,7 @@ validate_local_instance_settings(ldap_instance_t *inst, settings_set_t *set) {
 		result = ISC_R_FAILURE;
 
 cleanup:
+	str_destroy(&buff);
 	if (result != ISC_R_SUCCESS)
 		log_error_r("LDAP config validation failed for database '%s'",
 			    inst->db_name);
-- 
1.7.11.7

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

Reply via email to