From 5cf4fbc74d0c92b99c4b6081895ed89405cc7b63 Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Wed, 30 May 2012 09:39:54 -0700 Subject: [PATCH] ITS#7271 Don't clobber SASL_NOCANON in clients/tools/common.c --- clients/tools/common.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/clients/tools/common.c b/clients/tools/common.c index 9c98b620a9..e928fb287d 100644 --- a/clients/tools/common.c +++ b/clients/tools/common.c @@ -1410,12 +1410,13 @@ dnssrv_free:; #ifdef HAVE_CYRUS_SASL /* canon */ - if( ldap_set_option( ld, LDAP_OPT_X_SASL_NOCANON, - nocanon ? LDAP_OPT_ON : LDAP_OPT_OFF ) != LDAP_OPT_SUCCESS ) - { - fprintf( stderr, "Could not set LDAP_OPT_X_SASL_NOCANON %s\n", - nocanon ? "on" : "off" ); - tool_exit( ld, EXIT_FAILURE ); + if( nocanon ) { + if( ldap_set_option( ld, LDAP_OPT_X_SASL_NOCANON, + LDAP_OPT_ON ) != LDAP_OPT_SUCCESS ) + { + fprintf( stderr, "Could not set LDAP_OPT_X_SASL_NOCANON on\n" ); + tool_exit( ld, EXIT_FAILURE ); + } } #endif if( ldap_set_option( ld, LDAP_OPT_PROTOCOL_VERSION, &protocol ) -- 2.39.5