From 489fd210df1184106b7b92dfe6863aae3d27e88b Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Thu, 6 Jul 2000 01:22:42 +0000 Subject: [PATCH] Change reporting of SASL username --- servers/slapd/sasl.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/servers/slapd/sasl.c b/servers/slapd/sasl.c index 8291fdf59e..23dfaae8fa 100644 --- a/servers/slapd/sasl.c +++ b/servers/slapd/sasl.c @@ -284,16 +284,23 @@ int sasl_bind( NULL, "no SASL username", NULL, NULL ); } else { - Debug(LDAP_DEBUG_TRACE, "<== sasl_bind: username=%s\n", + Debug(LDAP_DEBUG_TRACE, "sasl_bind: username=%s\n", authzid, 0, 0); - if( strncasecmp( authzid, "anonymous", sizeof("anonyous")-1 ) && + if( !strncasecmp( authzid, "anonymous", sizeof("anonyous")-1 ) && ( ( authzid[sizeof("anonymous")] == '\0' ) || - ( authzid[sizeof("anonymous")] == '@' ) ) ) + ( authzid[sizeof("anonymous")] == '@' ) ) ) { + Debug(LDAP_DEBUG_TRACE, "<== sasl_bind: anonymous\n", + 0, 0, 0); + + } else { *edn = ch_malloc( sizeof( "authzid=" ) + strlen( authzid ) ); strcpy( *edn, "authzid=" ); strcat( *edn, authzid ); + + Debug(LDAP_DEBUG_TRACE, "<== sasl_bind: authzdn: \"%s\"\n", + *edn, 0, 0); } send_ldap_sasl( conn, op, rc = LDAP_SUCCESS, -- 2.39.5