]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/backend.c
Install *.schema only
[openldap] / servers / slapd / backend.c
index bf957ad73c313d639b820997b3b08d0eb67798b7..e9f4c0e4de910a7aa3f96f547d0a8715f2cddf12 100644 (file)
@@ -1,6 +1,6 @@
 /* $OpenLDAP$ */
 /*
- * Copyright 1998-1999 The OpenLDAP Foundation, All Rights Reserved.
+ * Copyright 1998-2000 The OpenLDAP Foundation, All Rights Reserved.
  * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
  */
 /* backend.c - routines for dealing with back-end databases */
@@ -609,7 +609,7 @@ backend_check_controls(
        Backend *be,
        Connection *conn,
        Operation *op,
-       char **text )
+       const char **text )
 {
        LDAPControl **ctrls;
        ctrls = op->o_ctrls;
@@ -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
-       /* not yet implemented */
+       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;