3 * Copyright 1998-2002 The OpenLDAP Foundation, All Rights Reserved.
4 * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
6 /* backend.c - routines for dealing with back-end databases */
13 #include <ac/string.h>
14 #include <ac/socket.h>
23 * If a module is configured as dynamic, its header should not
24 * get included into slapd. While this is a general rule and does
25 * not have much of an effect in UNIX, this rule should be adhered
26 * to for Windows, where dynamic object code should not be implicitly
27 * imported into slapd without appropriate __declspec(dllimport) directives.
30 #if defined(SLAPD_BDB) && !defined(SLAPD_BDB_DYNAMIC)
31 #include "back-bdb/external.h"
33 #if defined(SLAPD_DNSSRV) && !defined(SLAPD_DNSSRV_DYNAMIC)
34 #include "back-dnssrv/external.h"
36 #if defined(SLAPD_LDAP) && !defined(SLAPD_LDAP_DYNAMIC)
37 #include "back-ldap/external.h"
39 #if defined(SLAPD_LDBM) && !defined(SLAPD_LDBM_DYNAMIC)
40 #include "back-ldbm/external.h"
42 #if defined(SLAPD_META) && !defined(SLAPD_META_DYNAMIC)
43 #include "back-meta/external.h"
45 #if defined(SLAPD_MONITOR) && !defined(SLAPD_MONITOR_DYNAMIC)
46 #include "back-monitor/external.h"
48 #if defined(SLAPD_NULL) && !defined(SLAPD_NULL_DYNAMIC)
49 #include "back-null/external.h"
51 #if defined(SLAPD_PASSWD) && !defined(SLAPD_PASSWD_DYNAMIC)
52 #include "back-passwd/external.h"
54 #if defined(SLAPD_PERL) && !defined(SLAPD_PERL_DYNAMIC)
55 #include "back-perl/external.h"
57 #if defined(SLAPD_SHELL) && !defined(SLAPD_SHELL_DYNAMIC)
58 #include "back-shell/external.h"
60 #if defined(SLAPD_TCL) && !defined(SLAPD_TCL_DYNAMIC)
61 #include "back-tcl/external.h"
63 #if defined(SLAPD_SQL) && !defined(SLAPD_SQL_DYNAMIC)
64 #include "back-sql/external.h"
66 #if defined(SLAPD_PRIVATE) && !defined(SLAPD_PRIVATE_DYNAMIC)
67 #include "private/external.h"
70 static BackendInfo binfo[] = {
71 #if defined(SLAPD_BDB) && !defined(SLAPD_BDB_DYNAMIC)
72 {"bdb", bdb_initialize},
74 #if defined(SLAPD_DNSSRV) && !defined(SLAPD_DNSSRV_DYNAMIC)
75 {"dnssrv", dnssrv_back_initialize},
77 #if defined(SLAPD_LDAP) && !defined(SLAPD_LDAP_DYNAMIC)
78 {"ldap", ldap_back_initialize},
80 #if defined(SLAPD_LDBM) && !defined(SLAPD_LDBM_DYNAMIC)
81 {"ldbm", ldbm_back_initialize},
83 #if defined(SLAPD_META) && !defined(SLAPD_META_DYNAMIC)
84 {"meta", meta_back_initialize},
86 #if defined(SLAPD_MONITOR) && !defined(SLAPD_MONITOR_DYNAMIC)
87 {"monitor", monitor_back_initialize},
89 #if defined(SLAPD_NULL) && !defined(SLAPD_NULL_DYNAMIC)
90 {"null", null_back_initialize},
92 #if defined(SLAPD_PASSWD) && !defined(SLAPD_PASSWD_DYNAMIC)
93 {"passwd", passwd_back_initialize},
95 #if defined(SLAPD_PERL) && !defined(SLAPD_PERL_DYNAMIC)
96 {"perl", perl_back_initialize},
98 #if defined(SLAPD_SHELL) && !defined(SLAPD_SHELL_DYNAMIC)
99 {"shell", shell_back_initialize},
101 #if defined(SLAPD_TCL) && !defined(SLAPD_TCL_DYNAMIC)
102 {"tcl", tcl_back_initialize},
104 #if defined(SLAPD_SQL) && !defined(SLAPD_SQL_DYNAMIC)
105 {"sql", sql_back_initialize},
107 /* for any private backend */
108 #if defined(SLAPD_PRIVATE) && !defined(SLAPD_PRIVATE_DYNAMIC)
109 {"private", private_back_initialize},
114 int nBackendInfo = 0;
115 BackendInfo *backendInfo = NULL;
118 BackendDB *backendDB = NULL;
120 int backend_init(void)
124 if((nBackendInfo != 0) || (backendInfo != NULL)) {
125 /* already initialized */
127 LDAP_LOG(( "backend", LDAP_LEVEL_ERR,
128 "backend_init: backend already initialized\n" ));
130 Debug( LDAP_DEBUG_ANY,
131 "backend_init: already initialized.\n", 0, 0, 0 );
137 binfo[nBackendInfo].bi_type != NULL;
140 rc = binfo[nBackendInfo].bi_init( &binfo[nBackendInfo] );
144 LDAP_LOG(( "backend", LDAP_LEVEL_INFO,
145 "backend_init: initialized for type \"%s\"\n",
146 binfo[nBackendInfo].bi_type ));
148 Debug( LDAP_DEBUG_ANY,
149 "backend_init: initialized for type \"%s\"\n",
150 binfo[nBackendInfo].bi_type, 0, 0 );
152 /* destroy those we've already inited */
157 if ( binfo[nBackendInfo].bi_destroy ) {
158 binfo[nBackendInfo].bi_destroy(
159 &binfo[nBackendInfo] );
166 if ( nBackendInfo > 0) {
176 LDAP_LOG(( "backend", LDAP_LEVEL_ERR,
177 "backend_init: failed\n" ));
179 Debug( LDAP_DEBUG_ANY,
180 "backend_init: failed\n",
185 #endif /* SLAPD_MODULES */
188 int backend_add(BackendInfo *aBackendInfo)
192 if ((rc = aBackendInfo->bi_init(aBackendInfo)) != 0) {
194 LDAP_LOG(( "backend", LDAP_LEVEL_ERR,
195 "backend_add: initialization for type \"%s\" failed\n",
196 aBackendInfo->bi_type ));
198 Debug( LDAP_DEBUG_ANY,
199 "backend_add: initialization for type \"%s\" failed\n",
200 aBackendInfo->bi_type, 0, 0 );
205 /* now add the backend type to the Backend Info List */
207 BackendInfo *newBackendInfo = 0;
209 /* if backendInfo == binfo no deallocation of old backendInfo */
210 if (backendInfo == binfo) {
211 newBackendInfo = ch_calloc(nBackendInfo + 1, sizeof(BackendInfo));
212 AC_MEMCPY(newBackendInfo, backendInfo, sizeof(BackendInfo) *
215 newBackendInfo = ch_realloc(backendInfo, sizeof(BackendInfo) *
218 AC_MEMCPY(&newBackendInfo[nBackendInfo], aBackendInfo,
219 sizeof(BackendInfo));
220 backendInfo = newBackendInfo;
227 int backend_startup(Backend *be)
232 if( ! ( nBackendDB > 0 ) ) {
235 LDAP_LOG(( "backend", LDAP_LEVEL_INFO,
236 "backend_startup: %d databases to startup. \n",
239 Debug( LDAP_DEBUG_ANY,
240 "backend_startup: %d databases to startup.\n",
247 /* startup a specific backend database */
249 LDAP_LOG(( "backend", LDAP_LEVEL_DETAIL1,
250 "backend_startup: starting \"%s\"\n",
251 be->be_suffix[0].bv_val ));
253 Debug( LDAP_DEBUG_TRACE,
254 "backend_startup: starting \"%s\"\n",
255 be->be_suffix[0].bv_val, 0, 0 );
258 if ( be->bd_info->bi_open ) {
259 rc = be->bd_info->bi_open( be->bd_info );
264 LDAP_LOG(( "backend", LDAP_LEVEL_CRIT,
265 "backend_startup: bi_open failed!\n" ));
267 Debug( LDAP_DEBUG_ANY,
268 "backend_startup: bi_open failed!\n",
275 if ( be->bd_info->bi_db_open ) {
276 rc = be->bd_info->bi_db_open( be );
281 LDAP_LOG(( "backend", LDAP_LEVEL_CRIT,
282 "backend_startup: bi_db_open failed! (%d)\n", rc ));
284 Debug( LDAP_DEBUG_ANY,
285 "backend_startup: bi_db_open failed! (%d)\n",
294 /* open each backend type */
295 for( i = 0; i < nBackendInfo; i++ ) {
296 if( backendInfo[i].bi_nDB == 0) {
297 /* no database of this type, don't open */
301 if( backendInfo[i].bi_open ) {
302 rc = backendInfo[i].bi_open(
308 LDAP_LOG(( "backend", LDAP_LEVEL_CRIT,
309 "backend_startup: bi_open %d failed!\n", i ));
311 Debug( LDAP_DEBUG_ANY,
312 "backend_startup: bi_open %d failed!\n",
319 /* open each backend database */
320 for( i = 0; i < nBackendDB; i++ ) {
321 /* append global access controls */
322 acl_append( &backendDB[i].be_acl, global_acl );
324 if ( backendDB[i].bd_info->bi_db_open ) {
325 rc = backendDB[i].bd_info->bi_db_open(
331 LDAP_LOG(( "backend", LDAP_LEVEL_CRIT,
332 "backend_startup: bi_db_open(%d) failed! (%d)\n",
335 Debug( LDAP_DEBUG_ANY,
336 "backend_startup: bi_db_open(%d) failed! (%d)\n",
346 int backend_num( Backend *be )
350 if( be == NULL ) return -1;
352 for( i = 0; i < nBackendDB; i++ ) {
353 if( be == &backendDB[i] ) return i;
358 int backend_shutdown( Backend *be )
364 /* shutdown a specific backend database */
366 if ( be->bd_info->bi_nDB == 0 ) {
367 /* no database of this type, we never opened it */
371 if ( be->bd_info->bi_db_close ) {
372 be->bd_info->bi_db_close( be );
375 if( be->bd_info->bi_close ) {
376 be->bd_info->bi_close( be->bd_info );
382 /* close each backend database */
383 for( i = 0; i < nBackendDB; i++ ) {
384 if ( backendDB[i].bd_info->bi_db_close ) {
385 backendDB[i].bd_info->bi_db_close(
391 LDAP_LOG(( "backend", LDAP_LEVEL_NOTICE,
392 "backend_shutdown: bi_close %s failed!\n",
393 backendDB[i].be_type ));
395 Debug( LDAP_DEBUG_ANY,
396 "backend_close: bi_close %s failed!\n",
397 backendDB[i].be_type, 0, 0 );
402 /* close each backend type */
403 for( i = 0; i < nBackendInfo; i++ ) {
404 if( backendInfo[i].bi_nDB == 0 ) {
405 /* no database of this type */
409 if( backendInfo[i].bi_close ) {
410 backendInfo[i].bi_close(
418 int backend_destroy(void)
423 /* destroy each backend database */
424 for( i = 0, bd = backendDB; i < nBackendDB; i++, bd++ ) {
425 if ( bd->bd_info->bi_db_destroy ) {
426 bd->bd_info->bi_db_destroy( bd );
428 ber_bvarray_free( bd->be_suffix );
429 ber_bvarray_free( bd->be_nsuffix );
430 if ( bd->be_rootdn.bv_val ) free( bd->be_rootdn.bv_val );
431 if ( bd->be_rootndn.bv_val ) free( bd->be_rootndn.bv_val );
432 if ( bd->be_rootpw.bv_val ) free( bd->be_rootpw.bv_val );
433 acl_destroy( bd->be_acl, global_acl );
437 /* destroy each backend type */
438 for( i = 0; i < nBackendInfo; i++ ) {
439 if( backendInfo[i].bi_destroy ) {
440 backendInfo[i].bi_destroy(
446 if (backendInfo != binfo) {
449 #endif /* SLAPD_MODULES */
457 BackendInfo* backend_info(const char *type)
461 /* search for the backend type */
462 for( i = 0; i < nBackendInfo; i++ ) {
463 if( strcasecmp(backendInfo[i].bi_type, type) == 0 ) {
464 return &backendInfo[i];
478 BackendInfo *bi = backend_info(type);
482 fprintf( stderr, "Unrecognized database type (%s)\n", type );
486 backendDB = (BackendDB *) ch_realloc(
488 (nBackendDB + 1) * sizeof(Backend) );
490 memset( &backendDB[nbackends], '\0', sizeof(Backend) );
492 be = &backends[nbackends++];
495 be->be_def_limit = deflimit;
496 be->be_dfltaccess = global_default_access;
498 be->be_restrictops = global_restrictops;
499 be->be_requires = global_requires;
500 be->be_ssf_set = global_ssf_set;
502 /* assign a default depth limit for alias deref */
503 be->be_max_deref_depth = SLAPD_DEFAULT_MAXDEREFDEPTH;
506 rc = bi->bi_db_init( be );
510 fprintf( stderr, "database init failed (%s)\n", type );
524 for ( i = 0; i < nbackends; i++ ) {
525 if ( backends[i].bd_info->bi_db_close ) {
526 (*backends[i].bd_info->bi_db_close)( &backends[i] );
538 ber_len_t len, dnlen = dn->bv_len;
541 for ( i = 0; i < nbackends; i++ ) {
542 for ( j = 0; backends[i].be_nsuffix != NULL &&
543 backends[i].be_nsuffix[j].bv_val != NULL; j++ )
545 if (( backends[i].be_flags & SLAP_BFLAG_GLUE_SUBORDINATE )
551 len = backends[i].be_nsuffix[j].bv_len;
554 /* suffix is longer than DN */
559 * input DN is normalized, so the separator check
560 * need not look at escaping
562 if ( len && len < dnlen &&
563 !DN_SEPARATOR( dn->bv_val[(dnlen-len)-1] ))
568 if ( strcmp( backends[i].be_nsuffix[j].bv_val,
569 &dn->bv_val[dnlen-len] ) == 0 )
574 if( manageDSAit && len == dnlen ) {
591 struct berval *bvsuffix
596 for ( i = 0; be->be_nsuffix != NULL && be->be_nsuffix[i].bv_val != NULL; i++ ) {
597 if ( ber_bvcmp( &be->be_nsuffix[i], bvsuffix ) == 0 ) {
606 be_isroot( Backend *be, struct berval *ndn )
608 if ( !ndn->bv_len ) {
612 if ( !be->be_rootndn.bv_len ) {
616 return dn_match( &be->be_rootndn, ndn );
620 be_isupdate( Backend *be, struct berval *ndn )
622 if ( !ndn->bv_len ) {
626 if ( !be->be_update_ndn.bv_len ) {
630 return dn_match( &be->be_update_ndn, ndn );
634 be_root_dn( Backend *be )
636 return &be->be_rootdn;
640 be_isroot_pw( Backend *be,
643 struct berval *cred )
647 if ( ! be_isroot( be, ndn ) ) {
651 if( be->be_rootpw.bv_len == 0 ) {
655 #if defined( SLAPD_CRYPT ) || defined( SLAPD_SPASSWD )
656 ldap_pvt_thread_mutex_lock( &passwd_mutex );
658 lutil_passwd_sasl_conn = conn->c_sasl_context;
662 result = lutil_passwd( &be->be_rootpw, cred, NULL );
664 #if defined( SLAPD_CRYPT ) || defined( SLAPD_SPASSWD )
666 lutil_passwd_sasl_conn = NULL;
668 ldap_pvt_thread_mutex_unlock( &passwd_mutex );
682 if ( be->be_release ) {
683 /* free and release entry from backend */
684 return be->be_release( be, conn, op, e, rw );
700 for ( i = 0; i < nbackends; i++ ) {
701 if ( backends[i].be_unbind ) {
702 (*backends[i].be_unbind)( &backends[i], conn, op );
710 backend_connection_init(
716 for ( i = 0; i < nbackends; i++ ) {
717 if ( backends[i].be_connection_init ) {
718 (*backends[i].be_connection_init)( &backends[i], conn);
726 backend_connection_destroy(
732 for ( i = 0; i < nbackends; i++ ) {
733 if ( backends[i].be_connection_destroy ) {
734 (*backends[i].be_connection_destroy)( &backends[i], conn);
742 backend_check_controls(
750 if( ctrls == NULL ) {
754 for( ; *ctrls != NULL ; ctrls++ ) {
755 if( (*ctrls)->ldctl_iscritical &&
756 !charray_inlist( be->be_controls, (*ctrls)->ldctl_oid ) )
758 *text = "control unavailable in context";
759 return LDAP_UNAVAILABLE_CRITICAL_EXTENSION;
767 backend_check_restrictions(
771 struct berval *opdata,
775 slap_mask_t restrictops;
776 slap_mask_t requires;
784 rc = backend_check_controls( be, conn, op, text );
786 if( rc != LDAP_SUCCESS ) {
790 restrictops = be->be_restrictops;
791 requires = be->be_requires;
792 ssf = &be->be_ssf_set;
795 restrictops = global_restrictops;
796 requires = global_requires;
797 ssf = &global_ssf_set;
800 switch( op->o_tag ) {
802 opflag = SLAP_RESTRICT_OP_ADD;
806 opflag = SLAP_RESTRICT_OP_BIND;
809 case LDAP_REQ_COMPARE:
810 opflag = SLAP_RESTRICT_OP_COMPARE;
812 case LDAP_REQ_DELETE:
814 opflag = SLAP_RESTRICT_OP_DELETE;
816 case LDAP_REQ_EXTENDED:
817 opflag = SLAP_RESTRICT_OP_EXTENDED;
820 /* treat unspecified as a modify */
821 opflag = SLAP_RESTRICT_OP_MODIFY;
827 struct berval bv = BER_BVC( LDAP_EXOP_START_TLS );
828 if( ber_bvcmp( opdata, &bv ) == 0 ) {
836 struct berval bv = BER_BVC( LDAP_EXOP_X_WHO_AM_I );
837 if( ber_bvcmp( opdata, &bv ) == 0 ) {
842 /* treat everything else as a modify */
843 opflag = SLAP_RESTRICT_OP_MODIFY;
847 case LDAP_REQ_MODIFY:
849 opflag = SLAP_RESTRICT_OP_MODIFY;
851 case LDAP_REQ_RENAME:
853 opflag = SLAP_RESTRICT_OP_RENAME;
855 case LDAP_REQ_SEARCH:
856 opflag = SLAP_RESTRICT_OP_SEARCH;
858 case LDAP_REQ_UNBIND:
863 *text = "restrict operations internal error";
868 /* these checks don't apply to StartTLS */
870 if( op->o_transport_ssf < ssf->sss_transport ) {
871 *text = "transport confidentiality required";
872 return LDAP_CONFIDENTIALITY_REQUIRED;
875 if( op->o_tls_ssf < ssf->sss_tls ) {
876 *text = "TLS confidentiality required";
877 return LDAP_CONFIDENTIALITY_REQUIRED;
880 if( op->o_tag != LDAP_REQ_BIND || opdata == NULL ) {
881 /* these checks don't apply to SASL bind */
883 if( op->o_sasl_ssf < ssf->sss_sasl ) {
884 *text = "SASL confidentiality required";
885 return LDAP_CONFIDENTIALITY_REQUIRED;
888 if( op->o_ssf < ssf->sss_ssf ) {
889 *text = "confidentiality required";
890 return LDAP_CONFIDENTIALITY_REQUIRED;
895 if( op->o_transport_ssf < ssf->sss_update_transport ) {
896 *text = "transport update confidentiality required";
897 return LDAP_CONFIDENTIALITY_REQUIRED;
900 if( op->o_tls_ssf < ssf->sss_update_tls ) {
901 *text = "TLS update confidentiality required";
902 return LDAP_CONFIDENTIALITY_REQUIRED;
905 if( op->o_sasl_ssf < ssf->sss_update_sasl ) {
906 *text = "SASL update confidentiality required";
907 return LDAP_CONFIDENTIALITY_REQUIRED;
910 if( op->o_ssf < ssf->sss_update_ssf ) {
911 *text = "update confidentiality required";
912 return LDAP_CONFIDENTIALITY_REQUIRED;
915 if( op->o_ndn.bv_len == 0 ) {
916 *text = "modifications require authentication";
917 return LDAP_OPERATIONS_ERROR;
923 /* these checks don't apply to Bind, StartTLS, or Unbind */
925 if( requires & SLAP_REQUIRE_STRONG ) {
926 /* should check mechanism */
927 if( ( op->o_transport_ssf < ssf->sss_transport
928 && op->o_authmech.bv_len == 0 ) || op->o_dn.bv_len == 0 )
930 *text = "strong authentication required";
931 return LDAP_STRONG_AUTH_REQUIRED;
935 if( requires & SLAP_REQUIRE_SASL ) {
936 if( op->o_authmech.bv_len == 0 || op->o_dn.bv_len == 0 ) {
937 *text = "SASL authentication required";
938 return LDAP_STRONG_AUTH_REQUIRED;
942 if( requires & SLAP_REQUIRE_AUTHC ) {
943 if( op->o_dn.bv_len == 0 ) {
944 *text = "authentication required";
945 return LDAP_UNWILLING_TO_PERFORM;
949 if( requires & SLAP_REQUIRE_BIND ) {
951 ldap_pvt_thread_mutex_lock( &conn->c_mutex );
952 version = conn->c_protocol;
953 ldap_pvt_thread_mutex_unlock( &conn->c_mutex );
956 /* no bind has occurred */
957 *text = "BIND required";
958 return LDAP_OPERATIONS_ERROR;
962 if( requires & SLAP_REQUIRE_LDAP_V3 ) {
963 if( op->o_protocol < LDAP_VERSION3 ) {
964 /* no bind has occurred */
965 *text = "operation restricted to LDAPv3 clients";
966 return LDAP_OPERATIONS_ERROR;
971 if( restrictops & opflag ) {
972 if( restrictops == SLAP_RESTRICT_OP_READS ) {
973 *text = "read operations restricted";
975 *text = "operation restricted";
977 return LDAP_UNWILLING_TO_PERFORM;
983 int backend_check_referrals(
990 int rc = LDAP_SUCCESS;
992 if( be->be_chk_referrals ) {
995 rc = be->be_chk_referrals( be,
996 conn, op, dn, ndn, &text );
998 if( rc != LDAP_SUCCESS && rc != LDAP_REFERRAL ) {
999 send_ldap_result( conn, op, rc,
1000 NULL, text, NULL, NULL );
1013 struct berval *gr_ndn,
1014 struct berval *op_ndn,
1015 ObjectClass *group_oc,
1016 AttributeDescription *group_at
1021 if ( op->o_abandon ) return SLAPD_ABANDON;
1023 if ( !dn_match( &target->e_nname, gr_ndn ) ) {
1024 /* we won't attempt to send it to a different backend */
1026 be = select_backend( gr_ndn, 0, 0 );
1029 return LDAP_NO_SUCH_OBJECT;
1033 ldap_pvt_thread_mutex_lock( &conn->c_mutex );
1034 for (g = conn->c_groups; g; g=g->ga_next) {
1035 if (g->ga_be != be || g->ga_oc != group_oc ||
1036 g->ga_at != group_at || g->ga_len != gr_ndn->bv_len)
1038 if (strcmp( g->ga_ndn, gr_ndn->bv_val ) == 0)
1041 ldap_pvt_thread_mutex_unlock( &conn->c_mutex );
1046 if( be->be_group ) {
1047 int res = be->be_group( be, conn, op,
1048 target, gr_ndn, op_ndn,
1049 group_oc, group_at );
1051 if (op->o_tag != LDAP_REQ_BIND) {
1052 g = ch_malloc(sizeof(GroupAssertion) + gr_ndn->bv_len);
1054 g->ga_oc = group_oc;
1055 g->ga_at = group_at;
1057 g->ga_len = gr_ndn->bv_len;
1058 strcpy(g->ga_ndn, gr_ndn->bv_val);
1059 ldap_pvt_thread_mutex_lock( &conn->c_mutex );
1060 g->ga_next = conn->c_groups;
1062 ldap_pvt_thread_mutex_unlock( &conn->c_mutex );
1068 return LDAP_UNWILLING_TO_PERFORM;
1078 AttributeDescription *entry_at,
1082 if ( target == NULL || !dn_match( &target->e_nname, edn ) ) {
1083 /* we won't attempt to send it to a different backend */
1085 be = select_backend( edn, 0, 0 );
1088 return LDAP_NO_SUCH_OBJECT;
1092 if( be->be_attribute ) {
1093 return be->be_attribute( be, conn, op, target, edn,
1097 return LDAP_UNWILLING_TO_PERFORM;
1100 Attribute *backend_operational(
1105 AttributeName *attrs,
1108 Attribute *a = NULL, **ap = &a;
1110 #ifdef SLAPD_SCHEMA_DN
1111 *ap = slap_operational_subschemaSubentry();
1112 ap = &(*ap)->a_next;
1116 * If operational attributes (allegedly) are required,
1117 * and the backend supports specific operational attributes,
1118 * add them to the attribute list
1120 if ( ( opattrs || attrs ) && be && be->be_operational != NULL ) {
1121 ( void )be->be_operational( be, conn, op, e, attrs, opattrs, ap );