From: Pierangelo Masarati Date: Tue, 4 Jan 2011 00:10:02 +0000 (+0000) Subject: fix request controls X-Git-Tag: MIGRATION_CVS2GIT~266 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=c5afa82d585c33ba83a2ae81b17d0592eef8004d;p=openldap fix request controls --- diff --git a/contrib/slapd-modules/vc/vc.c b/contrib/slapd-modules/vc/vc.c index 6fdb7b8a5f..9043fdd6bf 100644 --- a/contrib/slapd-modules/vc/vc.c +++ b/contrib/slapd-modules/vc/vc.c @@ -291,12 +291,19 @@ vc_exop( "%s VERIFYCREDENTIALS", op->o_log_prefix ); } + conn->op->o_tag = LDAP_REQ_BIND; + memset( &conn->op->oq_bind, 0, sizeof( conn->op->oq_bind ) ); + conn->op->o_req_dn = ndn; + conn->op->o_req_ndn = ndn; + conn->op->o_protocol = LDAP_VERSION3; + conn->op->orb_method = authtag; + conn->op->o_callback = ≻ + /* TODO: controls */ tag = ber_peek_tag( ber, &len ); if ( tag == LDAP_TAG_EXOP_VERIFY_CREDENTIALS_CONTROLS ) { conn->op->o_ber = ber; - rc = get_ctrls( conn->op, &rs2, 0 ); - (void)ber_free( conn->op->o_ber, 1 ); + rc = get_ctrls2( conn->op, &rs2, 0, LDAP_TAG_EXOP_VERIFY_CREDENTIALS_CONTROLS ); if ( rc != LDAP_SUCCESS ) { rs->sr_err = LDAP_PROTOCOL_ERROR; goto done; @@ -309,14 +316,6 @@ vc_exop( goto done; } - conn->op->o_tag = LDAP_REQ_BIND; - memset( &conn->op->oq_bind, 0, sizeof( conn->op->oq_bind ) ); - conn->op->o_req_dn = ndn; - conn->op->o_req_ndn = ndn; - conn->op->o_protocol = LDAP_VERSION3; - conn->op->orb_method = authtag; - conn->op->o_callback = ≻ - switch ( authtag ) { case LDAP_AUTH_SIMPLE: sc.sc_response = slap_null_cb;