mirror of
https://git.openldap.org/openldap/openldap.git
synced 2026-02-16 00:58:02 -05:00
ITS#9406, #9407 remove saslauthz asserts
This commit is contained in:
parent
a3abd12729
commit
fa0f97545c
1 changed files with 13 additions and 6 deletions
|
|
@ -178,14 +178,16 @@ int slap_parse_user( struct berval *id, struct berval *user,
|
|||
}
|
||||
|
||||
if ( !BER_BVISNULL( mech ) ) {
|
||||
assert( mech->bv_val == id->bv_val + 2 );
|
||||
if ( mech->bv_val != id->bv_val + 2 )
|
||||
return LDAP_PROTOCOL_ERROR;
|
||||
|
||||
AC_MEMCPY( mech->bv_val - 2, mech->bv_val, mech->bv_len + 1 );
|
||||
mech->bv_val -= 2;
|
||||
}
|
||||
|
||||
if ( !BER_BVISNULL( realm ) ) {
|
||||
assert( realm->bv_val >= id->bv_val + 2 );
|
||||
if ( realm->bv_val < id->bv_val + 2 )
|
||||
return LDAP_PROTOCOL_ERROR;
|
||||
|
||||
AC_MEMCPY( realm->bv_val - 2, realm->bv_val, realm->bv_len + 1 );
|
||||
realm->bv_val -= 2;
|
||||
|
|
@ -447,9 +449,12 @@ is_dn: bv.bv_len = in->bv_len - ( bv.bv_val - in->bv_val );
|
|||
}
|
||||
|
||||
/* Grab the searchbase */
|
||||
assert( ludp->lud_dn != NULL );
|
||||
ber_str2bv( ludp->lud_dn, 0, 0, &bv );
|
||||
rc = dnValidate( NULL, &bv );
|
||||
if ( ludp->lud_dn != NULL ) {
|
||||
ber_str2bv( ludp->lud_dn, 0, 0, &bv );
|
||||
rc = dnValidate( NULL, &bv );
|
||||
} else {
|
||||
rc = LDAP_INVALID_SYNTAX;
|
||||
}
|
||||
|
||||
done:
|
||||
ldap_free_urldesc( ludp );
|
||||
|
|
@ -811,7 +816,6 @@ is_dn: bv.bv_len = val->bv_len - ( bv.bv_val - val->bv_val );
|
|||
}
|
||||
|
||||
/* Grab the searchbase */
|
||||
assert( ludp->lud_dn != NULL );
|
||||
if ( ludp->lud_dn ) {
|
||||
struct berval out = BER_BVNULL;
|
||||
|
||||
|
|
@ -829,6 +833,9 @@ is_dn: bv.bv_len = val->bv_len - ( bv.bv_val - val->bv_val );
|
|||
}
|
||||
|
||||
ludp->lud_dn = out.bv_val;
|
||||
} else {
|
||||
rc = LDAP_INVALID_SYNTAX;
|
||||
goto done;
|
||||
}
|
||||
|
||||
ludp->lud_port = 0;
|
||||
|
|
|
|||
Loading…
Reference in a new issue