Commit 9fb680d5 authored by Kurt Zeilenga's avatar Kurt Zeilenga
Browse files

Fix SASL automatic/quiet modes...

parent 6393523f
...@@ -600,12 +600,12 @@ ldap_int_sasl_bind( ...@@ -600,12 +600,12 @@ ldap_int_sasl_bind(
if( flags != LDAP_SASL_QUIET ) { if( flags != LDAP_SASL_QUIET ) {
saslrc = sasl_getprop( ctx, SASL_USERNAME, (void **) &data ); saslrc = sasl_getprop( ctx, SASL_USERNAME, (void **) &data );
if( saslrc == SASL_OK ) { if( saslrc == SASL_OK && data && *data ) {
fprintf( stderr, "SASL username: %s\n", data ); fprintf( stderr, "SASL username: %s\n", data );
} }
saslrc = sasl_getprop( ctx, SASL_REALM, (void **) &data ); saslrc = sasl_getprop( ctx, SASL_REALM, (void **) &data );
if( saslrc == SASL_OK ) { if( saslrc == SASL_OK && data && *data ) {
fprintf( stderr, "SASL realm: %s\n", data ); fprintf( stderr, "SASL realm: %s\n", data );
} }
} }
......
...@@ -101,7 +101,9 @@ static int interaction( ...@@ -101,7 +101,9 @@ static int interaction(
if( dflt && !*dflt ) dflt = NULL; if( dflt && !*dflt ) dflt = NULL;
if( flags != LDAP_SASL_INTERACTIVE && dflt ) { if( flags != LDAP_SASL_INTERACTIVE &&
( dflt || interact->id == SASL_CB_USER ) )
{
goto use_default; goto use_default;
} }
...@@ -184,7 +186,7 @@ int lutil_sasl_interact( ...@@ -184,7 +186,7 @@ int lutil_sasl_interact(
{ {
sasl_interact_t *interact = in; sasl_interact_t *interact = in;
if( flags != LDAP_SASL_QUIET ) { if( flags == LDAP_SASL_INTERACTIVE ) {
fputs( "SASL Interaction\n", stderr ); fputs( "SASL Interaction\n", stderr );
} }
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment