mirror of
https://git.openldap.org/openldap/openldap.git
synced 2024-12-21 03:10:25 +08:00
Read LDAPResult.resultCode & ModifyRequest.modification.operation
and send SortResult.sortResult as BER ENUMERATED, not BER INTEGER. libldap: ldap_parse_extended_result, try_read1msg, build_result_ber, ldap_parse_sasl_bind_result. slapd: do_modify, send_ldap_controls.
This commit is contained in:
parent
3647cba131
commit
d50820cdd6
@ -210,7 +210,7 @@ ldap_parse_extended_result (
|
||||
return ld->ld_errno;
|
||||
}
|
||||
|
||||
rc = ber_scanf( ber, "{iaa" /*}*/, &errcode,
|
||||
rc = ber_scanf( ber, "{eaa" /*}*/, &errcode,
|
||||
&ld->ld_matched, &ld->ld_error );
|
||||
|
||||
if( rc == LBER_ERROR ) {
|
||||
|
@ -555,7 +555,7 @@ nextresp2:
|
||||
ber_len_t len;
|
||||
char *lr_res_error = NULL;
|
||||
|
||||
if ( ber_scanf( &tmpber, "{iaa",/*}*/ &lderr,
|
||||
if ( ber_scanf( &tmpber, "{eaa",/*}*/ &lderr,
|
||||
&lr->lr_res_matched, &lr_res_error )
|
||||
!= LBER_ERROR )
|
||||
{
|
||||
@ -636,7 +636,7 @@ nextresp2:
|
||||
*/
|
||||
if ( tag == LDAP_RES_SEARCH_RESULT )
|
||||
refer_cnt = 0;
|
||||
} else if ( ber_scanf( &tmpber, "{iaa}", &lderr,
|
||||
} else if ( ber_scanf( &tmpber, "{eaa}", &lderr,
|
||||
&lr->lr_res_matched, &lr_res_error )
|
||||
!= LBER_ERROR )
|
||||
{
|
||||
@ -978,7 +978,7 @@ build_result_ber( LDAP *ld, BerElement **bp, LDAPRequest *lr )
|
||||
return( LBER_ERROR );
|
||||
}
|
||||
|
||||
if ( ber_get_int( ber, &along ) == LBER_ERROR ) {
|
||||
if ( ber_get_enum( ber, &along ) == LBER_ERROR ) {
|
||||
ld->ld_errno = LDAP_DECODING_ERROR;
|
||||
ber_free(ber, 1);
|
||||
return( LBER_ERROR );
|
||||
|
@ -306,7 +306,7 @@ ldap_parse_sasl_bind_result(
|
||||
} else {
|
||||
ber_len_t len;
|
||||
|
||||
tag = ber_scanf( ber, "{iaa" /*}*/,
|
||||
tag = ber_scanf( ber, "{eaa" /*}*/,
|
||||
&errcode, &ld->ld_matched, &ld->ld_error );
|
||||
|
||||
if( tag == LBER_ERROR ) {
|
||||
|
@ -90,7 +90,7 @@ do_modify(
|
||||
|
||||
tmp.sml_nvalues = NULL;
|
||||
|
||||
if ( ber_scanf( op->o_ber, "{i{m[W]}}", &mop,
|
||||
if ( ber_scanf( op->o_ber, "{e{m[W]}}", &mop,
|
||||
&tmp.sml_type, &tmp.sml_values ) == LBER_ERROR )
|
||||
{
|
||||
send_ldap_discon( op, rs, LDAP_PROTOCOL_ERROR,
|
||||
|
@ -266,7 +266,7 @@ send_ldap_controls( Operation *o, BerElement *ber, LDAPControl **c )
|
||||
|
||||
ber_init2( sber, NULL, LBER_USE_DER );
|
||||
|
||||
ber_printf( sber, "{i}", LDAP_UNWILLING_TO_PERFORM );
|
||||
ber_printf( sber, "{e}", LDAP_UNWILLING_TO_PERFORM );
|
||||
|
||||
if( ber_flatten2( ber, &sorted.ldctl_value, 0 ) == -1 ) {
|
||||
return -1;
|
||||
|
Loading…
Reference in New Issue
Block a user