1 /* operational.c - routines to deal with on-the-fly operational attrs */
3 * Copyright 2001-2002 The OpenLDAP Foundation, All Rights Reserved.
4 * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
12 * helpers for on-the-fly operational attribute generation
15 #ifdef SLAPD_SCHEMA_DN
17 slap_operational_subschemaSubentry( Backend *be )
21 /* The backend wants to take care of it */
22 if ( be && be->be_schemadn.bv_val )
25 a = ch_malloc( sizeof( Attribute ) );
26 a->a_desc = slap_schema.si_ad_subschemaSubentry;
28 a->a_vals = ch_malloc( 2 * sizeof( struct berval ) );
29 ber_dupbv( a->a_vals, &global_schemadn );
30 a->a_vals[1].bv_val = NULL;
37 #endif /* SLAPD_SCHEMA_DN */
40 slap_operational_hasSubordinate( int hs )
48 len = sizeof( "TRUE" ) - 1;
52 len = sizeof( "FALSE" ) - 1;
56 a = ch_malloc( sizeof( Attribute ) );
57 a->a_desc = slap_schema.si_ad_hasSubordinates;
58 a->a_vals = ch_malloc( 2 * sizeof( struct berval ) );
60 ber_str2bv( val, len, 1, a->a_vals );
61 a->a_vals[1].bv_val = NULL;