Fix SASL automatic/quiet modes...

This commit is contained in:
Kurt Zeilenga 2000-07-17 21:36:30 +00:00
parent 6393523ffa
commit 9fb680d527
2 changed files with 6 additions and 4 deletions

View File

@ -600,12 +600,12 @@ ldap_int_sasl_bind(
if( flags != LDAP_SASL_QUIET ) {
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 );
}
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 );
}
}

View File

@ -101,7 +101,9 @@ static int interaction(
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;
}
@ -184,7 +186,7 @@ int lutil_sasl_interact(
{
sasl_interact_t *interact = in;
if( flags != LDAP_SASL_QUIET ) {
if( flags == LDAP_SASL_INTERACTIVE ) {
fputs( "SASL Interaction\n", stderr );
}