]> git.sur5r.net Git - openldap/commitdiff
Fix prev commit
authorHoward Chu <hyc@openldap.org>
Fri, 21 Nov 2008 05:15:20 +0000 (05:15 +0000)
committerHoward Chu <hyc@openldap.org>
Fri, 21 Nov 2008 05:15:20 +0000 (05:15 +0000)
libraries/libldap/cyrus.c

index 263df1be366c2a3b25ed77e8a68ee6180fd111b5..a886d7d1c963a9cbc9e379cdbb054f704692d86f 100644 (file)
@@ -1024,7 +1024,10 @@ ldap_int_sasl_get_option( LDAP *ld, int option, void *arg )
 int
 ldap_int_sasl_set_option( LDAP *ld, int option, void *arg )
 {
-       if ( ld == NULL || arg == NULL )
+       if ( ld == NULL )
+               return -1;
+
+       if ( arg == NULL && option != LDAP_OPT_X_SASL_NOCANON )
                return -1;
 
        switch ( option ) {