From: Kurt Zeilenga Date: Wed, 28 Aug 2002 07:30:57 +0000 (+0000) Subject: cleanup X-Git-Tag: NO_SLAP_OP_BLOCKS~1142 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=aa36f5d0495fcc6e410ec1e969acbeba14991d9d;p=openldap cleanup --- diff --git a/servers/slapd/sasl.c b/servers/slapd/sasl.c index b8f1d13f10..7481bfb85f 100644 --- a/servers/slapd/sasl.c +++ b/servers/slapd/sasl.c @@ -298,7 +298,7 @@ slap_sasl_log( #define SET_DN 1 #define SET_U 2 -static struct berval ext_bv = { sizeof("EXTERNAL")-1, "EXTERNAL" }; +static struct berval ext_bv = BER_BVC( "EXTERNAL" ); int slap_sasl_getdn( Connection *conn, char *id, int len, char *user_realm, struct berval *dn, int flags ) @@ -341,8 +341,10 @@ int slap_sasl_getdn( Connection *conn, char *id, int len, */ if( flags & FLAG_GETDN_AUTHCID ) { #ifdef HAVE_TLS - if( conn->c_is_tls && conn->c_sasl_bind_mech.bv_len == ext_bv.bv_len - && ( strcasecmp( ext_bv.bv_val, conn->c_sasl_bind_mech.bv_val ) == 0 ) ) { + if( conn->c_is_tls && + conn->c_sasl_bind_mech.bv_len == ext_bv.bv_len && + strcasecmp( ext_bv.bv_val, conn->c_sasl_bind_mech.bv_val ) == 0 ) + { /* X.509 DN is already normalized */ do_norm = 0; is_dn = SET_DN;