]> git.sur5r.net Git - openldap/blob - servers/slapd/back-ldbm/operational.c
e459be1e96da47d56db96739c45115852845d381
[openldap] / servers / slapd / back-ldbm / operational.c
1 /* operational.c - ldbm backend operational attributes function */
2 /*
3  * Copyright 1998-2001 The OpenLDAP Foundation, All Rights Reserved.
4  * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
5  */
6
7 #include "portable.h"
8
9 #include <stdio.h>
10
11 #include <ac/string.h>
12 #include <ac/socket.h>
13
14 #include "slap.h"
15 #include "back-ldbm.h"
16 #include "proto-back-ldbm.h"
17
18 /*
19  * sets the supported operational attributes (if required)
20  */
21
22 int
23 ldbm_back_operational(
24         BackendDB       *be,
25         Connection      *conn, 
26         Operation       *op,
27         Entry           *e,
28         AttributeName           *attrs,
29         int             opattrs,
30         Attribute       **a )
31 {
32         Attribute       **aa = a;
33
34         assert( e );
35
36         if ( opattrs || ad_inlist( slap_schema.si_ad_hasSubordinates, attrs ) ) {
37                 int     hs;
38
39                 hs = has_children( be, e );
40                 *aa = slap_operational_hasSubordinate( hs );
41                 if ( *aa != NULL ) {
42                         aa = &(*aa)->a_next;
43                 }
44         }
45         
46         return 0;
47 }
48