]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/operational.c
More for #6020
[openldap] / servers / slapd / operational.c
index fd12d0aff6e38f89c691edfe763b8b015e05aedb..600cddca12997c956237e00771143498f2376330 100644 (file)
@@ -1,7 +1,7 @@
 /* operational.c - routines to deal with on-the-fly operational attrs */
 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
  *
- * Copyright 2001-2007 The OpenLDAP Foundation.
+ * Copyright 2001-2009 The OpenLDAP Foundation.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -31,6 +31,7 @@ slap_operational_subschemaSubentry( Backend *be )
 
        a = attr_alloc( slap_schema.si_ad_subschemaSubentry );
 
+       a->a_numvals = 1;
        a->a_vals = ch_malloc( 2 * sizeof( struct berval ) );
        ber_dupbv( a->a_vals, &frontendDB->be_schemadn );
        a->a_vals[1].bv_len = 0;
@@ -55,6 +56,7 @@ slap_operational_entryDN( Entry *e )
 
        a = attr_alloc( slap_schema.si_ad_entryDN );
 
+       a->a_numvals = 1;
        a->a_vals = ch_malloc( 2 * sizeof( struct berval ) );
        ber_dupbv( &a->a_vals[ 0 ], &e->e_name );
        BER_BVZERO( &a->a_vals[ 1 ] );
@@ -75,6 +77,7 @@ slap_operational_hasSubordinate( int hs )
        val = hs ? slap_true_bv : slap_false_bv;
 
        a = attr_alloc( slap_schema.si_ad_hasSubordinates );
+       a->a_numvals = 1;
        a->a_vals = ch_malloc( 2 * sizeof( struct berval ) );
 
        ber_dupbv( &a->a_vals[0], &val );