ITS#8909 additional tweak

Set error code on failure
This commit is contained in:
Howard Chu 2018-08-29 02:02:13 +01:00
parent 36e4dd2828
commit 6c221e7730

View File

@ -2075,6 +2075,8 @@ int slap_sasl_authorized( Operation *op,
rc = slap_sasl_check_authz( op, authcDN, authzDN,
slap_schema.si_ad_saslAuthzTo, authcDN );
if(( rc == LDAP_SUCCESS ) ^ (( authz_policy & SASL_AUTHZ_AND) != 0)) {
if( rc != LDAP_SUCCESS )
rc = LDAP_INAPPROPRIATE_AUTH;
goto DONE;
}
}