mhonek / rpms / openldap

Forked from rpms/openldap 3 years ago
Clone
Blob Blame History Raw
Cannot set SASL or GSSAPI options

Regression, compound statements need brackets.

Author: Howard Chu <hyc@openldap.org>
Upstream ITS: #6898
Upstream commit: 9b463b5
Resolves: #733056

---
 libraries/libldap/options.c |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/libraries/libldap/options.c b/libraries/libldap/options.c
index eec7c6d..3d94097 100644
--- a/libraries/libldap/options.c
+++ b/libraries/libldap/options.c
@@ -778,19 +778,22 @@ ldap_set_option(
 
 	default:
 #ifdef HAVE_TLS
-		if ( ldap_pvt_tls_set_option( ld, option, (void *)invalue ) == 0 )
+		if ( ldap_pvt_tls_set_option( ld, option, (void *)invalue ) == 0 ) {
 			LDAP_MUTEX_UNLOCK( &lo->ldo_mutex );
 			return ( LDAP_OPT_SUCCESS );
+		}
 #endif
 #ifdef HAVE_CYRUS_SASL
-		if ( ldap_int_sasl_set_option( ld, option, (void *)invalue ) == 0 )
+		if ( ldap_int_sasl_set_option( ld, option, (void *)invalue ) == 0 ) {
 			LDAP_MUTEX_UNLOCK( &lo->ldo_mutex );
 			return ( LDAP_OPT_SUCCESS );
+		}
 #endif
 #ifdef HAVE_GSSAPI
-		if ( ldap_int_gssapi_set_option( ld, option, (void *)invalue ) == 0 )
+		if ( ldap_int_gssapi_set_option( ld, option, (void *)invalue ) == 0 ) {
 			LDAP_MUTEX_UNLOCK( &lo->ldo_mutex );
 			return ( LDAP_OPT_SUCCESS );
+		}
 #endif
 		/* bad param */
 		break;	/* LDAP_OPT_ERROR */
-- 
1.7.6