mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-01-24 13:24:56 +08:00
fix previous commit
This commit is contained in:
parent
d92e8ad1f7
commit
43c00ab486
@ -2540,6 +2540,8 @@ ldap_back_controls_add(
|
|||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* put controls that go __before__ existing ones here */
|
||||||
|
|
||||||
/* proxyAuthz for identity assertion */
|
/* proxyAuthz for identity assertion */
|
||||||
switch ( ldap_back_proxy_authz_ctrl( op, rs, &lc->lc_bound_ndn,
|
switch ( ldap_back_proxy_authz_ctrl( op, rs, &lc->lc_bound_ndn,
|
||||||
li->li_version, &li->li_idassert, &c[ j1 ] ) )
|
li->li_version, &li->li_idassert, &c[ j1 ] ) )
|
||||||
@ -2555,6 +2557,8 @@ ldap_back_controls_add(
|
|||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* put controls that go __after__ existing ones here */
|
||||||
|
|
||||||
#ifdef SLAP_CONTROL_X_SESSION_TRACKING
|
#ifdef SLAP_CONTROL_X_SESSION_TRACKING
|
||||||
/* FIXME: according to <draft-wahl-ldap-session>,
|
/* FIXME: according to <draft-wahl-ldap-session>,
|
||||||
* the server should check if the control can be added
|
* the server should check if the control can be added
|
||||||
@ -2580,12 +2584,13 @@ ldap_back_controls_add(
|
|||||||
rs->sr_err = LDAP_SUCCESS;
|
rs->sr_err = LDAP_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
assert( j1 + j1 <= sizeof( c )/sizeof(LDAPControl) );
|
/* if nothing to do, just bail out */
|
||||||
|
|
||||||
if ( j1 == 0 && j2 == 0 ) {
|
if ( j1 == 0 && j2 == 0 ) {
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
assert( j1 + j1 <= sizeof( c )/sizeof(LDAPControl) );
|
||||||
|
|
||||||
if ( op->o_ctrls ) {
|
if ( op->o_ctrls ) {
|
||||||
for ( n = 0; op->o_ctrls[ n ]; n++ )
|
for ( n = 0; op->o_ctrls[ n ]; n++ )
|
||||||
/* just count ctrls */ ;
|
/* just count ctrls */ ;
|
||||||
@ -2609,8 +2614,8 @@ ldap_back_controls_add(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
n += j1;
|
||||||
if ( j2 ) {
|
if ( j2 ) {
|
||||||
n += j1;
|
|
||||||
ctrls[ n ] = (LDAPControl *)&ctrls[ n + j2 + 1 ] + j1;
|
ctrls[ n ] = (LDAPControl *)&ctrls[ n + j2 + 1 ] + j1;
|
||||||
*ctrls[ n ] = c[ j1 ];
|
*ctrls[ n ] = c[ j1 ];
|
||||||
for ( i = 1; i < j2; i++ ) {
|
for ( i = 1; i < j2; i++ ) {
|
||||||
|
@ -1602,6 +1602,8 @@ meta_back_controls_add(
|
|||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* put controls that go __before__ existing ones here */
|
||||||
|
|
||||||
/* proxyAuthz for identity assertion */
|
/* proxyAuthz for identity assertion */
|
||||||
switch ( ldap_back_proxy_authz_ctrl( op, rs, &msc->msc_bound_ndn,
|
switch ( ldap_back_proxy_authz_ctrl( op, rs, &msc->msc_bound_ndn,
|
||||||
mt->mt_version, &mt->mt_idassert, &c[ j1 ] ) )
|
mt->mt_version, &mt->mt_idassert, &c[ j1 ] ) )
|
||||||
@ -1617,6 +1619,8 @@ meta_back_controls_add(
|
|||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* put controls that go __after__ existing ones here */
|
||||||
|
|
||||||
#ifdef SLAP_CONTROL_X_SESSION_TRACKING
|
#ifdef SLAP_CONTROL_X_SESSION_TRACKING
|
||||||
/* session tracking */
|
/* session tracking */
|
||||||
if ( META_BACK_TGT_ST_REQUEST( mt ) ) {
|
if ( META_BACK_TGT_ST_REQUEST( mt ) ) {
|
||||||
@ -1638,12 +1642,13 @@ meta_back_controls_add(
|
|||||||
rs->sr_err = LDAP_SUCCESS;
|
rs->sr_err = LDAP_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
assert( j1 + j1 <= sizeof( c )/sizeof(LDAPControl) );
|
/* if nothing to do, just bail out */
|
||||||
|
|
||||||
if ( j1 == 0 && j2 == 0 ) {
|
if ( j1 == 0 && j2 == 0 ) {
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
assert( j1 + j1 <= sizeof( c )/sizeof(LDAPControl) );
|
||||||
|
|
||||||
if ( op->o_ctrls ) {
|
if ( op->o_ctrls ) {
|
||||||
for ( n = 0; op->o_ctrls[ n ]; n++ )
|
for ( n = 0; op->o_ctrls[ n ]; n++ )
|
||||||
/* just count ctrls */ ;
|
/* just count ctrls */ ;
|
||||||
@ -1667,8 +1672,8 @@ meta_back_controls_add(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
n += j1;
|
||||||
if ( j2 ) {
|
if ( j2 ) {
|
||||||
n += j1;
|
|
||||||
ctrls[ n ] = (LDAPControl *)&ctrls[ n + j2 + 1 ] + j1;
|
ctrls[ n ] = (LDAPControl *)&ctrls[ n + j2 + 1 ] + j1;
|
||||||
*ctrls[ n ] = c[ j1 ];
|
*ctrls[ n ] = c[ j1 ];
|
||||||
for ( i = 1; i < j2; i++ ) {
|
for ( i = 1; i < j2; i++ ) {
|
||||||
|
Loading…
Reference in New Issue
Block a user