1 /* operational.c - ldbm backend operational attributes function */
3 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
5 * Copyright 1998-2004 The OpenLDAP Foundation.
8 * Redistribution and use in source and binary forms, with or without
9 * modification, are permitted only as authorized by the OpenLDAP
12 * A copy of this license is available in the file LICENSE in the
13 * top-level directory of the distribution or, alternatively, at
14 * <http://www.OpenLDAP.org/license.html>.
21 #include <ac/string.h>
22 #include <ac/socket.h>
25 #include "back-ldbm.h"
26 #include "proto-back-ldbm.h"
29 * sets *hasSubordinates to LDAP_COMPARE_TRUE/LDAP_COMPARE_FALSE
30 * if the entry has children or not.
33 ldbm_back_hasSubordinates(
36 int *hasSubordinates )
38 if ( has_children( op->o_bd, e ) ) {
39 *hasSubordinates = LDAP_COMPARE_TRUE;
42 *hasSubordinates = LDAP_COMPARE_FALSE;
49 * sets the supported operational attributes (if required)
52 ldbm_back_operational(
60 assert( rs->sr_entry );
62 if ( opattrs || ad_inlist( slap_schema.si_ad_hasSubordinates, rs->sr_attrs ) ) {
65 hs = has_children( op->o_bd, rs->sr_entry );
66 *aa = slap_operational_hasSubordinate( hs );