mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-12-23 08:09:34 -05:00
fix previous commits
This commit is contained in:
parent
588f1f6185
commit
b4629f1e79
1 changed files with 9 additions and 7 deletions
|
|
@ -109,7 +109,10 @@ int slap_parse_user( struct berval *id, struct berval *user,
|
||||||
|
|
||||||
u = id->bv_val[ 0 ];
|
u = id->bv_val[ 0 ];
|
||||||
|
|
||||||
assert( u == 'u' || u == 'U' );
|
if ( u != 'u' && u != 'U' ) {
|
||||||
|
/* called with something other than u: */
|
||||||
|
return LDAP_PROTOCOL_ERROR;
|
||||||
|
}
|
||||||
|
|
||||||
/* uauthzid form:
|
/* uauthzid form:
|
||||||
* u[.mech[/realm]]:user
|
* u[.mech[/realm]]:user
|
||||||
|
|
@ -159,12 +162,11 @@ int slap_parse_user( struct berval *id, struct berval *user,
|
||||||
realm->bv_val -= 2;
|
realm->bv_val -= 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( user->bv_val > id->bv_val + 2 ) {
|
/* leave "u:" before user */
|
||||||
user->bv_val -= 2;
|
user->bv_val -= 2;
|
||||||
user->bv_len += 2;
|
user->bv_len += 2;
|
||||||
user->bv_val[ 0 ] = u;
|
user->bv_val[ 0 ] = u;
|
||||||
user->bv_val[ 1 ] = ':';
|
user->bv_val[ 1 ] = ':';
|
||||||
}
|
|
||||||
|
|
||||||
return LDAP_SUCCESS;
|
return LDAP_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue