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( void )
21 a = ch_malloc( sizeof( Attribute ) );
22 a->a_desc = slap_schema.si_ad_subschemaSubentry;
24 /* Should be backend specific */
25 a->a_vals = ch_malloc( 2 * sizeof( struct berval ) );
26 ber_str2bv( SLAPD_SCHEMA_DN, sizeof(SLAPD_SCHEMA_DN)-1, 1, a->a_vals );
27 a->a_vals[1].bv_val = NULL;
34 #endif /* SLAPD_SCHEMA_DN */
37 slap_operational_hasSubordinate( int hs )
41 a = ch_malloc( sizeof( Attribute ) );
42 a->a_desc = slap_schema.si_ad_hasSubordinates;
44 a->a_vals = ch_malloc( 2 * sizeof( struct berval ) );
45 ber_str2bv( hs ? "TRUE" : "FALSE",
46 hs ? sizeof("TRUE")-1 : sizeof("FALSE")-1,
48 a->a_vals[1].bv_val = NULL;