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>
22 * If a module is configured as dynamic, its header should not
23 * get included into slapd. While this is a general rule and does
24 * not have much of an effect in UNIX, this rule should be adhered
25 * to for Windows, where dynamic object code should not be implicitly
26 * imported into slapd without appropriate __declspec(dllimport) directives.
29 #if defined(SLAPD_BDB) && !defined(SLAPD_BDB_DYNAMIC)
30 #include "back-bdb/external.h"
32 #if defined(SLAPD_DNSSRV) && !defined(SLAPD_DNSSRV_DYNAMIC)
33 #include "back-dnssrv/external.h"
35 #if defined(SLAPD_LDAP) && !defined(SLAPD_LDAP_DYNAMIC)
36 #include "back-ldap/external.h"
38 #if defined(SLAPD_LDBM) && !defined(SLAPD_LDBM_DYNAMIC)
39 #include "back-ldbm/external.h"
41 #if defined(SLAPD_META) && !defined(SLAPD_META_DYNAMIC)
42 #include "back-meta/external.h"
44 #if defined(SLAPD_MONITOR) && !defined(SLAPD_MONITOR_DYNAMIC)
45 #include "back-monitor/external.h"
47 #if defined(SLAPD_NULL) && !defined(SLAPD_NULL_DYNAMIC)
48 #include "back-null/external.h"
50 #if defined(SLAPD_PASSWD) && !defined(SLAPD_PASSWD_DYNAMIC)
51 #include "back-passwd/external.h"
53 #if defined(SLAPD_PERL) && !defined(SLAPD_PERL_DYNAMIC)
54 #include "back-perl/external.h"
56 #if defined(SLAPD_SHELL) && !defined(SLAPD_SHELL_DYNAMIC)
57 #include "back-shell/external.h"
59 #if defined(SLAPD_TCL) && !defined(SLAPD_TCL_DYNAMIC)
60 #include "back-tcl/external.h"
62 #if defined(SLAPD_SQL) && !defined(SLAPD_SQL_DYNAMIC)
63 #include "back-sql/external.h"
65 #if defined(SLAPD_PRIVATE) && !defined(SLAPD_PRIVATE_DYNAMIC)
66 #include "private/external.h"
69 static BackendInfo binfo[] = {
70 #if defined(SLAPD_BDB) && !defined(SLAPD_BDB_DYNAMIC)
71 {"bdb", bdb_initialize},
73 #if defined(SLAPD_DNSSRV) && !defined(SLAPD_DNSSRV_DYNAMIC)
74 {"dnssrv", dnssrv_back_initialize},
76 #if defined(SLAPD_LDAP) && !defined(SLAPD_LDAP_DYNAMIC)
77 {"ldap", ldap_back_initialize},
79 #if defined(SLAPD_LDBM) && !defined(SLAPD_LDBM_DYNAMIC)
80 {"ldbm", ldbm_back_initialize},
82 #if defined(SLAPD_META) && !defined(SLAPD_META_DYNAMIC)
83 {"meta", meta_back_initialize},
85 #if defined(SLAPD_MONITOR) && !defined(SLAPD_MONITOR_DYNAMIC)
86 {"monitor", monitor_back_initialize},
88 #if defined(SLAPD_NULL) && !defined(SLAPD_NULL_DYNAMIC)
89 {"null", null_back_initialize},
91 #if defined(SLAPD_PASSWD) && !defined(SLAPD_PASSWD_DYNAMIC)
92 {"passwd", passwd_back_initialize},
94 #if defined(SLAPD_PERL) && !defined(SLAPD_PERL_DYNAMIC)
95 {"perl", perl_back_initialize},
97 #if defined(SLAPD_SHELL) && !defined(SLAPD_SHELL_DYNAMIC)
98 {"shell", shell_back_initialize},
100 #if defined(SLAPD_TCL) && !defined(SLAPD_TCL_DYNAMIC)
101 {"tcl", tcl_back_initialize},
103 #if defined(SLAPD_SQL) && !defined(SLAPD_SQL_DYNAMIC)
104 {"sql", sql_back_initialize},
106 /* for any private backend */
107 #if defined(SLAPD_PRIVATE) && !defined(SLAPD_PRIVATE_DYNAMIC)
108 {"private", private_back_initialize},
113 int nBackendInfo = 0;
114 BackendInfo *backendInfo = NULL;
117 BackendDB *backendDB = NULL;
119 int backend_init(void)
123 if((nBackendInfo != 0) || (backendInfo != NULL)) {
124 /* already initialized */
126 LDAP_LOG(( "backend", LDAP_LEVEL_ERR,
127 "backend_init: backend already initialized\n" ));
129 Debug( LDAP_DEBUG_ANY,
130 "backend_init: already initialized.\n", 0, 0, 0 );
136 binfo[nBackendInfo].bi_type != NULL;
139 rc = binfo[nBackendInfo].bi_init( &binfo[nBackendInfo] );
143 LDAP_LOG(( "backend", LDAP_LEVEL_INFO,
144 "backend_init: initialized for type \"%s\"\n",
145 binfo[nBackendInfo].bi_type ));
147 Debug( LDAP_DEBUG_ANY,
148 "backend_init: initialized for type \"%s\"\n",
149 binfo[nBackendInfo].bi_type, 0, 0 );
151 /* destroy those we've already inited */
156 if ( binfo[nBackendInfo].bi_destroy ) {
157 binfo[nBackendInfo].bi_destroy(
158 &binfo[nBackendInfo] );
165 if ( nBackendInfo > 0) {
175 LDAP_LOG(( "backend", LDAP_LEVEL_ERR,
176 "backend_init: failed\n" ));
178 Debug( LDAP_DEBUG_ANY,
179 "backend_init: failed\n",
184 #endif /* SLAPD_MODULES */
187 int backend_add(BackendInfo *aBackendInfo)
191 if ((rc = aBackendInfo->bi_init(aBackendInfo)) != 0) {
193 LDAP_LOG(( "backend", LDAP_LEVEL_ERR,
194 "backend_add: initialization for type \"%s\" failed\n",
195 aBackendInfo->bi_type ));
197 Debug( LDAP_DEBUG_ANY,
198 "backend_add: initialization for type \"%s\" failed\n",
199 aBackendInfo->bi_type, 0, 0 );
204 /* now add the backend type to the Backend Info List */
206 BackendInfo *newBackendInfo = 0;
208 /* if backendInfo == binfo no deallocation of old backendInfo */
209 if (backendInfo == binfo) {
210 newBackendInfo = ch_calloc(nBackendInfo + 1, sizeof(BackendInfo));
211 AC_MEMCPY(newBackendInfo, backendInfo, sizeof(BackendInfo) *
214 newBackendInfo = ch_realloc(backendInfo, sizeof(BackendInfo) *
217 AC_MEMCPY(&newBackendInfo[nBackendInfo], aBackendInfo,
218 sizeof(BackendInfo));
219 backendInfo = newBackendInfo;
226 int backend_startup(Backend *be)
231 if( ! ( nBackendDB > 0 ) ) {
234 LDAP_LOG(( "backend", LDAP_LEVEL_INFO,
235 "backend_startup: %d databases to startup. \n",
238 Debug( LDAP_DEBUG_ANY,
239 "backend_startup: %d databases to startup.\n",
246 /* startup a specific backend database */
248 LDAP_LOG(( "backend", LDAP_LEVEL_DETAIL1,
249 "backend_startup: starting \"%s\"\n",
250 be->be_suffix[0]->bv_val ));
252 Debug( LDAP_DEBUG_TRACE,
253 "backend_startup: starting \"%s\"\n",
254 be->be_suffix[0]->bv_val, 0, 0 );
257 if ( be->bd_info->bi_open ) {
258 rc = be->bd_info->bi_open( be->bd_info );
263 LDAP_LOG(( "backend", LDAP_LEVEL_CRIT,
264 "backend_startup: bi_open failed!\n" ));
266 Debug( LDAP_DEBUG_ANY,
267 "backend_startup: bi_open failed!\n",
274 if ( be->bd_info->bi_db_open ) {
275 rc = be->bd_info->bi_db_open( be );
280 LDAP_LOG(( "backend", LDAP_LEVEL_CRIT,
281 "backend_startup: bi_db_open failed! (%d)\n", rc ));
283 Debug( LDAP_DEBUG_ANY,
284 "backend_startup: bi_db_open failed! (%d)\n",
293 /* open each backend type */
294 for( i = 0; i < nBackendInfo; i++ ) {
295 if( backendInfo[i].bi_nDB == 0) {
296 /* no database of this type, don't open */
300 if( backendInfo[i].bi_open ) {
301 rc = backendInfo[i].bi_open(
307 LDAP_LOG(( "backend", LDAP_LEVEL_CRIT,
308 "backend_startup: bi_open %d failed!\n", i ));
310 Debug( LDAP_DEBUG_ANY,
311 "backend_startup: bi_open %d failed!\n",
318 /* open each backend database */
319 for( i = 0; i < nBackendDB; i++ ) {
320 /* append global access controls */
321 acl_append( &backendDB[i].be_acl, global_acl );
323 if ( backendDB[i].bd_info->bi_db_open ) {
324 rc = backendDB[i].bd_info->bi_db_open(
330 LDAP_LOG(( "backend", LDAP_LEVEL_CRIT,
331 "backend_startup: bi_db_open(%d) failed! (%d)\n",
334 Debug( LDAP_DEBUG_ANY,
335 "backend_startup: bi_db_open(%d) failed! (%d)\n",
345 int backend_num( Backend *be )
349 if( be == NULL ) return -1;
351 for( i = 0; i < nBackendDB; i++ ) {
352 if( be == &backendDB[i] ) return i;
357 int backend_shutdown( Backend *be )
363 /* shutdown a specific backend database */
365 if ( be->bd_info->bi_nDB == 0 ) {
366 /* no database of this type, we never opened it */
370 if ( be->bd_info->bi_db_close ) {
371 be->bd_info->bi_db_close( be );
374 if( be->bd_info->bi_close ) {
375 be->bd_info->bi_close( be->bd_info );
381 /* close each backend database */
382 for( i = 0; i < nBackendDB; i++ ) {
383 if ( backendDB[i].bd_info->bi_db_close ) {
384 backendDB[i].bd_info->bi_db_close(
390 LDAP_LOG(( "backend", LDAP_LEVEL_NOTICE,
391 "backend_shutdown: bi_close %s failed!\n",
392 backendDB[i].be_type ));
394 Debug( LDAP_DEBUG_ANY,
395 "backend_close: bi_close %s failed!\n",
396 backendDB[i].be_type, 0, 0 );
401 /* close each backend type */
402 for( i = 0; i < nBackendInfo; i++ ) {
403 if( backendInfo[i].bi_nDB == 0 ) {
404 /* no database of this type */
408 if( backendInfo[i].bi_close ) {
409 backendInfo[i].bi_close(
417 int backend_destroy(void)
422 /* destroy each backend database */
423 for( i = 0, bd = backendDB; i < nBackendDB; i++, bd++ ) {
424 if ( bd->bd_info->bi_db_destroy ) {
425 bd->bd_info->bi_db_destroy( bd );
427 ber_bvecfree( bd->be_suffix );
428 ber_bvecfree( bd->be_nsuffix );
429 if ( bd->be_rootdn.bv_val ) free( bd->be_rootdn.bv_val );
430 if ( bd->be_rootndn.bv_val ) free( bd->be_rootndn.bv_val );
431 if ( bd->be_rootpw.bv_val ) free( bd->be_rootpw.bv_val );
432 acl_destroy( bd->be_acl, global_acl );
436 /* destroy each backend type */
437 for( i = 0; i < nBackendInfo; i++ ) {
438 if( backendInfo[i].bi_destroy ) {
439 backendInfo[i].bi_destroy(
445 if (backendInfo != binfo) {
448 #endif /* SLAPD_MODULES */
456 BackendInfo* backend_info(const char *type)
460 /* search for the backend type */
461 for( i = 0; i < nBackendInfo; i++ ) {
462 if( strcasecmp(backendInfo[i].bi_type, type) == 0 ) {
463 return &backendInfo[i];
477 BackendInfo *bi = backend_info(type);
481 fprintf( stderr, "Unrecognized database type (%s)\n", type );
485 backendDB = (BackendDB *) ch_realloc(
487 (nBackendDB + 1) * sizeof(Backend) );
489 memset( &backendDB[nbackends], '\0', sizeof(Backend) );
491 be = &backends[nbackends++];
494 be->be_def_limit = deflimit;
495 be->be_dfltaccess = global_default_access;
497 be->be_restrictops = global_restrictops;
498 be->be_requires = global_requires;
499 be->be_ssf_set = global_ssf_set;
501 /* assign a default depth limit for alias deref */
502 be->be_max_deref_depth = SLAPD_DEFAULT_MAXDEREFDEPTH;
505 rc = bi->bi_db_init( be );
509 fprintf( stderr, "database init failed (%s)\n", type );
523 for ( i = 0; i < nbackends; i++ ) {
524 if ( backends[i].bd_info->bi_db_close ) {
525 (*backends[i].bd_info->bi_db_close)( &backends[i] );
537 ber_len_t len, dnlen = dn->bv_len;
540 for ( i = 0; i < nbackends; i++ ) {
541 for ( j = 0; backends[i].be_nsuffix != NULL &&
542 backends[i].be_nsuffix[j] != NULL; j++ )
544 if (( backends[i].be_flags & SLAP_BFLAG_GLUE_SUBORDINATE )
550 len = backends[i].be_nsuffix[j]->bv_len;
553 /* suffix is longer than DN */
558 * input DN is normalized, so the separator check
559 * need not look at escaping
561 if ( len && len < dnlen &&
562 !DN_SEPARATOR( dn->bv_val[(dnlen-len)-1] ))
567 if ( strcmp( backends[i].be_nsuffix[j]->bv_val,
568 &dn->bv_val[dnlen-len] ) == 0 )
573 if( manageDSAit && len == dnlen ) {
590 struct berval *bvsuffix
595 for ( i = 0; be->be_nsuffix != NULL && be->be_nsuffix[i] != NULL; i++ ) {
596 if ( ber_bvcmp( be->be_nsuffix[i], bvsuffix ) == 0 ) {
605 be_isroot( Backend *be, struct berval *ndn )
607 if ( !ndn->bv_len ) {
611 if ( !be->be_rootndn.bv_len ) {
615 return dn_match( &be->be_rootndn, ndn );
619 be_isupdate( Backend *be, struct berval *ndn )
621 if ( !ndn->bv_len ) {
625 if ( !be->be_update_ndn.bv_len ) {
629 return dn_match( &be->be_update_ndn, ndn );
633 be_root_dn( Backend *be )
635 return &be->be_rootdn;
639 be_isroot_pw( Backend *be,
642 struct berval *cred )
646 if ( ! be_isroot( be, ndn ) ) {
650 if( be->be_rootpw.bv_len == 0 ) {
654 #if defined( SLAPD_CRYPT ) || defined( SLAPD_SPASSWD )
655 ldap_pvt_thread_mutex_lock( &passwd_mutex );
657 lutil_passwd_sasl_conn = conn->c_sasl_context;
661 result = lutil_passwd( &be->be_rootpw, cred, NULL );
663 #if defined( SLAPD_CRYPT ) || defined( SLAPD_SPASSWD )
665 lutil_passwd_sasl_conn = NULL;
667 ldap_pvt_thread_mutex_unlock( &passwd_mutex );
681 if ( be->be_release ) {
682 /* free and release entry from backend */
683 return be->be_release( be, conn, op, e, rw );
699 for ( i = 0; i < nbackends; i++ ) {
700 if ( backends[i].be_unbind ) {
701 (*backends[i].be_unbind)( &backends[i], conn, op );
709 backend_connection_init(
715 for ( i = 0; i < nbackends; i++ ) {
716 if ( backends[i].be_connection_init ) {
717 (*backends[i].be_connection_init)( &backends[i], conn);
725 backend_connection_destroy(
731 for ( i = 0; i < nbackends; i++ ) {
732 if ( backends[i].be_connection_destroy ) {
733 (*backends[i].be_connection_destroy)( &backends[i], conn);
741 backend_check_controls(
749 if( ctrls == NULL ) {
753 for( ; *ctrls != NULL ; ctrls++ ) {
754 if( (*ctrls)->ldctl_iscritical &&
755 !charray_inlist( be->be_controls, (*ctrls)->ldctl_oid ) )
757 *text = "control unavailable in context";
758 return LDAP_UNAVAILABLE_CRITICAL_EXTENSION;
766 backend_check_restrictions(
774 slap_mask_t restrictops;
775 slap_mask_t requires;
781 rc = backend_check_controls( be, conn, op, text );
783 if( rc != LDAP_SUCCESS ) {
787 restrictops = be->be_restrictops;
788 requires = be->be_requires;
789 ssf = &be->be_ssf_set;
792 restrictops = global_restrictops;
793 requires = global_requires;
794 ssf = &global_ssf_set;
797 switch( op->o_tag ) {
799 opflag = SLAP_RESTRICT_OP_ADD;
803 opflag = SLAP_RESTRICT_OP_BIND;
805 case LDAP_REQ_COMPARE:
806 opflag = SLAP_RESTRICT_OP_COMPARE;
808 case LDAP_REQ_DELETE:
810 opflag = SLAP_RESTRICT_OP_DELETE;
812 case LDAP_REQ_EXTENDED:
813 opflag = SLAP_RESTRICT_OP_EXTENDED;
815 case LDAP_REQ_MODIFY:
817 opflag = SLAP_RESTRICT_OP_MODIFY;
819 case LDAP_REQ_RENAME:
821 opflag = SLAP_RESTRICT_OP_RENAME;
823 case LDAP_REQ_SEARCH:
824 opflag = SLAP_RESTRICT_OP_SEARCH;
826 case LDAP_REQ_UNBIND:
830 *text = "restrict operations internal error";
834 if ( op->o_tag != LDAP_REQ_EXTENDED
835 || strcmp( (const char *) opdata, LDAP_EXOP_START_TLS ) )
837 /* these checks don't apply to StartTLS */
839 if( op->o_tag == LDAP_REQ_EXTENDED ) {
840 /* threat other extended operations as update ops */
844 if( op->o_transport_ssf < ssf->sss_transport ) {
845 *text = "transport confidentiality required";
846 return LDAP_CONFIDENTIALITY_REQUIRED;
849 if( op->o_tls_ssf < ssf->sss_tls ) {
850 *text = "TLS confidentiality required";
851 return LDAP_CONFIDENTIALITY_REQUIRED;
854 if( op->o_tag != LDAP_REQ_BIND || opdata == NULL ) {
855 /* these checks don't apply to SASL bind */
857 if( op->o_sasl_ssf < ssf->sss_sasl ) {
858 *text = "SASL confidentiality required";
859 return LDAP_CONFIDENTIALITY_REQUIRED;
862 if( op->o_ssf < ssf->sss_ssf ) {
863 *text = "confidentiality required";
864 return LDAP_CONFIDENTIALITY_REQUIRED;
869 if( op->o_transport_ssf < ssf->sss_update_transport ) {
870 *text = "transport update confidentiality required";
871 return LDAP_CONFIDENTIALITY_REQUIRED;
874 if( op->o_tls_ssf < ssf->sss_update_tls ) {
875 *text = "TLS update confidentiality required";
876 return LDAP_CONFIDENTIALITY_REQUIRED;
879 if( op->o_sasl_ssf < ssf->sss_update_sasl ) {
880 *text = "SASL update confidentiality required";
881 return LDAP_CONFIDENTIALITY_REQUIRED;
884 if( op->o_ssf < ssf->sss_update_ssf ) {
885 *text = "update confidentiality required";
886 return LDAP_CONFIDENTIALITY_REQUIRED;
889 if( op->o_ndn.bv_len == 0 ) {
890 *text = "modifications require authentication";
891 return LDAP_OPERATIONS_ERROR;
896 if ( op->o_tag != LDAP_REQ_BIND && ( op->o_tag != LDAP_REQ_EXTENDED ||
897 strcmp( (const char *) opdata, LDAP_EXOP_START_TLS ) ) )
899 /* these checks don't apply to Bind or StartTLS */
901 if( requires & SLAP_REQUIRE_STRONG ) {
902 /* should check mechanism */
903 if( op->o_authmech.bv_len == 0 || op->o_dn.bv_len == 0 )
905 *text = "strong authentication required";
906 return LDAP_STRONG_AUTH_REQUIRED;
910 if( requires & SLAP_REQUIRE_SASL ) {
911 if( op->o_authmech.bv_len == 0 || op->o_dn.bv_len == 0 )
913 *text = "SASL authentication required";
914 return LDAP_STRONG_AUTH_REQUIRED;
918 if( requires & SLAP_REQUIRE_AUTHC ) {
919 if( op->o_dn.bv_len == 0 ) {
920 *text = "authentication required";
921 return LDAP_UNWILLING_TO_PERFORM;
925 if( requires & SLAP_REQUIRE_BIND ) {
927 ldap_pvt_thread_mutex_lock( &conn->c_mutex );
928 version = conn->c_protocol;
929 ldap_pvt_thread_mutex_unlock( &conn->c_mutex );
932 /* no bind has occurred */
933 *text = "BIND required";
934 return LDAP_OPERATIONS_ERROR;
938 if( requires & SLAP_REQUIRE_LDAP_V3 ) {
939 if( op->o_protocol < LDAP_VERSION3 ) {
940 /* no bind has occurred */
941 *text = "operation restricted to LDAPv3 clients";
942 return LDAP_OPERATIONS_ERROR;
947 if( restrictops & opflag ) {
948 if( restrictops == SLAP_RESTRICT_OP_READS ) {
949 *text = "read operations restricted";
951 *text = "operation restricted";
953 return LDAP_UNWILLING_TO_PERFORM;
959 int backend_check_referrals(
966 int rc = LDAP_SUCCESS;
968 if( be->be_chk_referrals ) {
971 rc = be->be_chk_referrals( be,
972 conn, op, dn, ndn, &text );
974 if( rc != LDAP_SUCCESS && rc != LDAP_REFERRAL ) {
975 send_ldap_result( conn, op, rc,
976 NULL, text, NULL, NULL );
989 struct berval *gr_ndn,
990 struct berval *op_ndn,
991 ObjectClass *group_oc,
992 AttributeDescription *group_at
997 if ( op->o_abandon ) return SLAPD_ABANDON;
999 if ( !dn_match( &target->e_nname, gr_ndn ) ) {
1000 /* we won't attempt to send it to a different backend */
1002 be = select_backend( gr_ndn, 0, 0 );
1005 return LDAP_NO_SUCH_OBJECT;
1009 ldap_pvt_thread_mutex_lock( &conn->c_mutex );
1010 for (g = conn->c_groups; g; g=g->ga_next) {
1011 if (g->ga_be != be || g->ga_oc != group_oc ||
1012 g->ga_at != group_at || g->ga_len != gr_ndn->bv_len)
1014 if (strcmp( g->ga_ndn, gr_ndn->bv_val ) == 0)
1017 ldap_pvt_thread_mutex_unlock( &conn->c_mutex );
1022 if( be->be_group ) {
1023 int res = be->be_group( be, conn, op,
1024 target, gr_ndn, op_ndn,
1025 group_oc, group_at );
1027 if (op->o_tag != LDAP_REQ_BIND) {
1028 g = ch_malloc(sizeof(GroupAssertion) + gr_ndn->bv_len);
1030 g->ga_oc = group_oc;
1031 g->ga_at = group_at;
1033 g->ga_len = gr_ndn->bv_len;
1034 strcpy(g->ga_ndn, gr_ndn->bv_val);
1035 ldap_pvt_thread_mutex_lock( &conn->c_mutex );
1036 g->ga_next = conn->c_groups;
1038 ldap_pvt_thread_mutex_unlock( &conn->c_mutex );
1044 return LDAP_UNWILLING_TO_PERFORM;
1054 AttributeDescription *entry_at,
1058 if ( target == NULL || !dn_match( &target->e_nname, edn ) ) {
1059 /* we won't attempt to send it to a different backend */
1061 be = select_backend( edn, 0, 0 );
1064 return LDAP_NO_SUCH_OBJECT;
1068 if( be->be_attribute ) {
1069 return be->be_attribute( be, conn, op, target, edn,
1073 return LDAP_UNWILLING_TO_PERFORM;
1076 Attribute *backend_operational(
1081 AttributeName *attrs,
1084 Attribute *a = NULL, **ap = &a;
1086 #ifdef SLAPD_SCHEMA_DN
1087 *ap = slap_operational_subschemaSubentry();
1088 ap = &(*ap)->a_next;
1092 * If operational attributes (allegedly) are required,
1093 * and the backend supports specific operational attributes,
1094 * add them to the attribute list
1096 if ( ( opattrs || attrs ) && be && be->be_operational != NULL ) {
1097 ( void )be->be_operational( be, conn, op, e, attrs, opattrs, ap );