]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/backend.c
Install *.schema only
[openldap] / servers / slapd / backend.c
index 6a3a9869d9db4a0c6c8d848eb205999f8378c82e..e9f4c0e4de910a7aa3f96f547d0a8715f2cddf12 100644 (file)
@@ -635,19 +635,20 @@ backend_group(
        Entry   *target,
        const char      *gr_ndn,
        const char      *op_ndn,
-       const char      *objectclassValue,
 #ifdef SLAPD_SCHEMA_NOT_COMPAT
+       ObjectClass *group_oc,
        AttributeDescription *group_at
 #else
+       const char      *group_oc,
        const char      *group_at
 #endif
 )
 {
        if (be->be_group)
                return( be->be_group(be, target, gr_ndn, op_ndn,
-                       objectclassValue, group_at) );
+                       group_oc, group_at) );
        else
-               return(1);
+               return LDAP_UNWILLING_TO_PERFORM;
 }
 
 #ifdef SLAPD_SCHEMA_DN
@@ -657,7 +658,7 @@ Attribute *backend_operational(
 {
        Attribute *a = ch_malloc( sizeof( Attribute ) );
 #ifdef SLAPD_SCHEMA_NOT_COMPAT
-       a->a_desc = slap_schema.si_ad_subschemaSubentry;
+       a->a_desc = ad_dup( slap_schema.si_ad_subschemaSubentry );
 #else
        a->a_type = ch_strdup("subschemasubentry");
        a->a_syntax = SYNTAX_DN | SYNTAX_CIS;
@@ -665,9 +666,7 @@ Attribute *backend_operational(
 
        /* Should be backend specific */
        a->a_vals = ch_malloc( 2 * sizeof( struct berval * ) );
-       a->a_vals[0] = ch_malloc( sizeof( struct berval ) );
-       a->a_vals[0]->bv_val = ch_strdup( SLAPD_SCHEMA_DN );
-       a->a_vals[0]->bv_len = sizeof( SLAPD_SCHEMA_DN ) - 1;
+       a->a_vals[0] = ber_bvstrdup( SLAPD_SCHEMA_DN );
        a->a_vals[1] = NULL;
 
        a->a_next = NULL;