mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-12-26 01:29:59 -05:00
check if handler is being installed twice (needs work to allow replacement)
This commit is contained in:
parent
2f81cc64b1
commit
b7ed9571db
1 changed files with 24 additions and 4 deletions
|
|
@ -254,11 +254,31 @@ load_extop(
|
|||
slap_mask_t ext_flags,
|
||||
SLAP_EXTOP_MAIN_FN *ext_main )
|
||||
{
|
||||
struct extop_list *ext;
|
||||
struct berval oidm = BER_BVNULL;
|
||||
struct extop_list *ext;
|
||||
|
||||
if( ext_oid == NULL || ext_oid->bv_val == NULL ||
|
||||
ext_oid->bv_val[0] == '\0' || ext_oid->bv_len == 0 ) return -1;
|
||||
if(!ext_main) return -1;
|
||||
if ( !ext_main ) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
if ( ext_oid == NULL || BER_BVISNULL( ext_oid ) || BER_BVISEMPTY( ext_oid ) ) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
if ( numericoidValidate( NULL, (struct berval *)ext_oid ) != LDAP_SUCCESS ) {
|
||||
oidm.bv_val = oidm_find( ext_oid->bv_val );
|
||||
if ( ext_oid == NULL ) {
|
||||
return -1;
|
||||
}
|
||||
oidm.bv_len = strlen( oidm.bv_val );
|
||||
ext_oid = &oidm;
|
||||
}
|
||||
|
||||
for ( ext = supp_ext_list; ext; ext = ext->next ) {
|
||||
if ( bvmatch( ext_oid, &ext->oid ) ) {
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
ext = ch_calloc(1, sizeof(struct extop_list) + ext_oid->bv_len + 1);
|
||||
if (ext == NULL)
|
||||
|
|
|
|||
Loading…
Reference in a new issue