mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-02-23 14:09:39 +08:00
ITS#8180 back-sock: return error when str2entry fails
This commit is contained in:
parent
f0c7427ba3
commit
64789dd2c7
@ -105,6 +105,10 @@ sock_read_and_send_results(
|
||||
if ( (rs->sr_entry = str2entry( buf )) == NULL ) {
|
||||
Debug( LDAP_DEBUG_ANY, "str2entry(%s) failed\n",
|
||||
buf );
|
||||
rs->sr_err = LDAP_OTHER;
|
||||
rs->sr_text = "str2entry failed";
|
||||
goto fail;
|
||||
|
||||
} else {
|
||||
rs->sr_attrs = op->oq_search.rs_attrs;
|
||||
rs->sr_flags = REP_ENTRY_MODIFIABLE;
|
||||
@ -118,6 +122,7 @@ sock_read_and_send_results(
|
||||
}
|
||||
(void) str2result( buf, &rs->sr_err, (char **)&rs->sr_matched, (char **)&rs->sr_text );
|
||||
|
||||
fail:
|
||||
/* otherwise, front end will send this result */
|
||||
if ( rs->sr_err != 0 || op->o_tag != LDAP_REQ_BIND ) {
|
||||
send_ldap_result( op, rs );
|
||||
|
Loading…
Reference in New Issue
Block a user