Skip to content
Snippets Groups Projects
Commit 30fdb0e0 authored by Kurt Zeilenga's avatar Kurt Zeilenga
Browse files

Fix LDAP Intermediate Response tag values.

with code to accept old values.
parent c951fda5
No related branches found
No related tags found
No related merge requests found
......@@ -356,6 +356,9 @@ typedef struct ldapcontrol {
#define LDAP_TAG_EXOP_RES_OID ((ber_tag_t) 0x8aU) /* context specific + primitive */
#define LDAP_TAG_EXOP_RES_VALUE ((ber_tag_t) 0x8bU) /* context specific + primitive */
#define LDAP_TAG_IM_RES_OID ((ber_tag_t) 0x80U) /* context specific + primitive */
#define LDAP_TAG_IM_RES_VALUE ((ber_tag_t) 0x81U) /* context specific + primitive */
#define LDAP_TAG_SASL_RES_CREDS ((ber_tag_t) 0x87U) /* context specific + primitive */
/* LDAP Request Messages */
......
......@@ -337,7 +337,7 @@ ldap_parse_intermediate (
tag = ber_peek_tag( ber, &len );
if( tag == LDAP_TAG_EXOP_RES_OID ) {
if( tag == LDAP_TAG_IM_RES_OID || tag == LDAP_TAG_EXOP_RES_OID ) {
/* we have a resoid */
if( ber_scanf( ber, "a", &resoid ) == LBER_ERROR ) {
ld->ld_errno = LDAP_DECODING_ERROR;
......@@ -348,7 +348,7 @@ ldap_parse_intermediate (
tag = ber_peek_tag( ber, &len );
}
if( tag == LDAP_TAG_EXOP_RES_VALUE ) {
if( tag == LDAP_TAG_IM_RES_VALUE || tag == LDAP_TAG_EXOP_RES_VALUE ) {
/* we have a resdata */
if( ber_scanf( ber, "O", &resdata ) == LBER_ERROR ) {
ld->ld_errno = LDAP_DECODING_ERROR;
......
......@@ -381,11 +381,15 @@ send_ldap_response(
{
if ( rs->sr_rspoid != NULL ) {
rc = ber_printf( ber, "ts",
LDAP_TAG_EXOP_RES_OID, rs->sr_rspoid );
rs->sr_type == REP_EXTENDED
? LDAP_TAG_EXOP_RES_OID : LDAP_TAG_IM_RES_OID,
rs->sr_rspoid );
}
if( rc != -1 && rs->sr_rspdata != NULL ) {
rc = ber_printf( ber, "tO",
LDAP_TAG_EXOP_RES_VALUE, rs->sr_rspdata );
rs->sr_type == REP_EXTENDED
? LDAP_TAG_EXOP_RES_VALUE : LDAP_TAG_IM_RES_VALUE,
rs->sr_rspdata );
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment