Skip to content
Snippets Groups Projects
Commit b7ed9571 authored by Pierangelo Masarati's avatar Pierangelo Masarati
Browse files

check if handler is being installed twice (needs work to allow replacement)

parent 2f81cc64
No related branches found
No related tags found
No related merge requests found
......@@ -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_main ) {
return -1;
}
if ( ext_oid == NULL || BER_BVISNULL( ext_oid ) || BER_BVISEMPTY( ext_oid ) ) {
return -1;
}
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 ( 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)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment