]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/ad.c
remove dbenv->lock_put() call from transaction-protected operations
[openldap] / servers / slapd / ad.c
index 846d77c351825aa81cacf7d5c99915d191b2bc3d..3d1335b435d86c45d0073b9794e92502be90c6a8 100644 (file)
@@ -171,7 +171,7 @@ int slap_bv2ad(
 
                        if( !slap_syntax_is_binary( desc.ad_type->sat_syntax )) {
                                /* not stored in binary, disallow option */
-                               *text = "option \"binary\" with type not supported";
+                               *text = "option \"binary\" not supported with type";
                                return rtn;
                        }
 
@@ -315,7 +315,7 @@ done:;
                d2 = ch_malloc(sizeof(AttributeDescription) + dlen + 1);
                d2->ad_type = desc.ad_type;
                d2->ad_flags = desc.ad_flags;
-               d2->ad_cname.bv_len = desc.ad_cname.bv_len;
+               d2->ad_cname.bv_len = desc.ad_type->sat_cname.bv_len;
                d2->ad_lang.bv_len = desc.ad_lang.bv_len;
 
                if (dlen == 0) {
@@ -456,7 +456,7 @@ int ad_inlist(
                                int i;
                                for ( i = 0; oc->soc_required[i] != NULL; i++ ) {
                                        rc = is_at_subtype( desc->ad_type,
-                                               oc->soc_allowed[i] );
+                                               oc->soc_required[i] );
                                        if( rc ) return 1;
                                }
                        }
@@ -531,8 +531,8 @@ int slap_bv2undef_ad(
        }
        
        if( !desc ) {
-               desc = ch_malloc(sizeof(AttributeDescription) +
-                       bv->bv_len + 1);
+               desc = ch_malloc(sizeof(AttributeDescription) + 1 +
+                       bv->bv_len);
                
                desc->ad_flags = SLAP_DESC_NONE;
                desc->ad_lang.bv_val = NULL;