From: Pierangelo Masarati Date: Sun, 9 Sep 2007 21:48:17 +0000 (+0000) Subject: fix proxyAuthz oid setup X-Git-Tag: OPENLDAP_REL_ENG_2_4_9~20^2~670 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=f834cdb2f74e0f221a157aeba5f9b1185908354c;p=openldap fix proxyAuthz oid setup --- diff --git a/servers/slapd/back-ldap/bind.c b/servers/slapd/back-ldap/bind.c index e5878a2cbd..02485e8c1a 100644 --- a/servers/slapd/back-ldap/bind.c +++ b/servers/slapd/back-ldap/bind.c @@ -2393,11 +2393,14 @@ ldap_back_proxy_authz_ctrl( goto done; } + ctrl->ldctl_oid = LDAP_CONTROL_PROXY_AUTHZ; + switch ( si->si_mode ) { /* already in u:ID or dn:DN form */ case LDAP_BACK_IDASSERT_OTHERID: case LDAP_BACK_IDASSERT_OTHERDN: ber_dupbv_x( &ctrl->ldctl_value, &assertedID, op->o_tmpmemctx ); + rs->sr_err = LDAP_SUCCESS; break; /* needs the dn: prefix */ @@ -2408,6 +2411,7 @@ ldap_back_proxy_authz_ctrl( AC_MEMCPY( ctrl->ldctl_value.bv_val, "dn:", STRLENOF( "dn:" ) ); AC_MEMCPY( &ctrl->ldctl_value.bv_val[ STRLENOF( "dn:" ) ], assertedID.bv_val, assertedID.bv_len + 1 ); + rs->sr_err = LDAP_SUCCESS; break; } @@ -2435,6 +2439,8 @@ ldap_back_proxy_authz_ctrl( goto free_ber; } + rs->sr_err = LDAP_SUCCESS; + free_ber:; op->o_tmpfree( authzID.bv_val, op->o_tmpmemctx ); ber_free_buf( ber ); @@ -2475,6 +2481,9 @@ free_ber:; goto free_ber2; } + ctrl->ldctl_oid = LDAP_CONTROL_OBSOLETE_PROXY_AUTHZ; + rs->sr_err = LDAP_SUCCESS; + free_ber2:; op->o_tmpfree( authzID.bv_val, op->o_tmpmemctx ); ber_free_buf( ber ); @@ -2482,8 +2491,6 @@ free_ber2:; if ( rs->sr_err != LDAP_SUCCESS ) { goto done; } - - ctrl->ldctl_oid = LDAP_CONTROL_OBSOLETE_PROXY_AUTHZ; } done:;