1 /* operational.c - routines to deal with on-the-fly operational attrs */
3 * Copyright 2001 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;
33 #endif /* SLAPD_SCHEMA_DN */
36 slap_operational_hasSubordinate( int hs )
40 a = ch_malloc( sizeof( Attribute ) );
41 a->a_desc = slap_schema.si_ad_hasSubordinates;
43 a->a_vals = ch_malloc( 2 * sizeof( struct berval ) );
44 ber_str2bv( hs ? "TRUE" : "FALSE", 0, 1, a->a_vals );
45 a->a_vals[1].bv_val = NULL;