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_PASSWD) && !defined(SLAPD_PASSWD_DYNAMIC)
48 #include "back-passwd/external.h"
50 #if defined(SLAPD_PERL) && !defined(SLAPD_PERL_DYNAMIC)
51 #include "back-perl/external.h"
53 #if defined(SLAPD_SHELL) && !defined(SLAPD_SHELL_DYNAMIC)
54 #include "back-shell/external.h"
56 #if defined(SLAPD_TCL) && !defined(SLAPD_TCL_DYNAMIC)
57 #include "back-tcl/external.h"
59 #if defined(SLAPD_SQL) && !defined(SLAPD_SQL_DYNAMIC)
60 #include "back-sql/external.h"
62 #if defined(SLAPD_PRIVATE) && !defined(SLAPD_PRIVATE_DYNAMIC)
63 #include "private/external.h"
66 static BackendInfo binfo[] = {
67 #if defined(SLAPD_BDB) && !defined(SLAPD_BDB_DYNAMIC)
68 {"bdb", bdb_initialize},
70 #if defined(SLAPD_DNSSRV) && !defined(SLAPD_DNSSRV_DYNAMIC)
71 {"dnssrv", dnssrv_back_initialize},
73 #if defined(SLAPD_LDAP) && !defined(SLAPD_LDAP_DYNAMIC)
74 {"ldap", ldap_back_initialize},
76 #if defined(SLAPD_LDBM) && !defined(SLAPD_LDBM_DYNAMIC)
77 {"ldbm", ldbm_back_initialize},
79 #if defined(SLAPD_META) && !defined(SLAPD_META_DYNAMIC)
80 {"meta", meta_back_initialize},
82 #if defined(SLAPD_MONITOR) && !defined(SLAPD_MONITOR_DYNAMIC)
83 {"monitor", monitor_back_initialize},
85 #if defined(SLAPD_PASSWD) && !defined(SLAPD_PASSWD_DYNAMIC)
86 {"passwd", passwd_back_initialize},
88 #if defined(SLAPD_PERL) && !defined(SLAPD_PERL_DYNAMIC)
89 {"perl", perl_back_initialize},
91 #if defined(SLAPD_SHELL) && !defined(SLAPD_SHELL_DYNAMIC)
92 {"shell", shell_back_initialize},
94 #if defined(SLAPD_TCL) && !defined(SLAPD_TCL_DYNAMIC)
95 {"tcl", tcl_back_initialize},
97 #if defined(SLAPD_SQL) && !defined(SLAPD_SQL_DYNAMIC)
98 {"sql", sql_back_initialize},
100 /* for any private backend */
101 #if defined(SLAPD_PRIVATE) && !defined(SLAPD_PRIVATE_DYNAMIC)
102 {"private", private_back_initialize},
107 int nBackendInfo = 0;
108 BackendInfo *backendInfo = NULL;
111 BackendDB *backendDB = NULL;
113 int backend_init(void)
117 if((nBackendInfo != 0) || (backendInfo != NULL)) {
118 /* already initialized */
120 LDAP_LOG(( "backend", LDAP_LEVEL_ERR,
121 "backend_init: backend already initialized\n" ));
123 Debug( LDAP_DEBUG_ANY,
124 "backend_init: already initialized.\n", 0, 0, 0 );
130 binfo[nBackendInfo].bi_type != NULL;
133 rc = binfo[nBackendInfo].bi_init( &binfo[nBackendInfo] );
137 LDAP_LOG(( "backend", LDAP_LEVEL_INFO,
138 "backend_init: initialized for type \"%s\"\n",
139 binfo[nBackendInfo].bi_type ));
141 Debug( LDAP_DEBUG_ANY,
142 "backend_init: initialized for type \"%s\"\n",
143 binfo[nBackendInfo].bi_type, 0, 0 );
145 /* destroy those we've already inited */
150 if ( binfo[nBackendInfo].bi_destroy ) {
151 binfo[nBackendInfo].bi_destroy(
152 &binfo[nBackendInfo] );
159 if ( nBackendInfo > 0) {
169 LDAP_LOG(( "backend", LDAP_LEVEL_ERR,
170 "backend_init: failed\n" ));
172 Debug( LDAP_DEBUG_ANY,
173 "backend_init: failed\n",
178 #endif /* SLAPD_MODULES */
181 int backend_add(BackendInfo *aBackendInfo)
185 if ((rc = aBackendInfo->bi_init(aBackendInfo)) != 0) {
187 LDAP_LOG(( "backend", LDAP_LEVEL_ERR,
188 "backend_add: initialization for type \"%s\" failed\n",
189 aBackendInfo->bi_type ));
191 Debug( LDAP_DEBUG_ANY,
192 "backend_add: initialization for type \"%s\" failed\n",
193 aBackendInfo->bi_type, 0, 0 );
198 /* now add the backend type to the Backend Info List */
200 BackendInfo *newBackendInfo = 0;
202 /* if backendInfo == binfo no deallocation of old backendInfo */
203 if (backendInfo == binfo) {
204 newBackendInfo = ch_calloc(nBackendInfo + 1, sizeof(BackendInfo));
205 AC_MEMCPY(newBackendInfo, backendInfo, sizeof(BackendInfo) *
208 newBackendInfo = ch_realloc(backendInfo, sizeof(BackendInfo) *
211 AC_MEMCPY(&newBackendInfo[nBackendInfo], aBackendInfo,
212 sizeof(BackendInfo));
213 backendInfo = newBackendInfo;
220 int backend_startup(Backend *be)
225 if( ! ( nBackendDB > 0 ) ) {
228 LDAP_LOG(( "backend", LDAP_LEVEL_INFO,
229 "backend_startup: %d databases to startup. \n",
232 Debug( LDAP_DEBUG_ANY,
233 "backend_startup: %d databases to startup.\n",
240 /* startup a specific backend database */
242 LDAP_LOG(( "backend", LDAP_LEVEL_DETAIL1,
243 "backend_startup: starting \"%s\"\n",
244 be->be_suffix[0]->bv_val ));
246 Debug( LDAP_DEBUG_TRACE,
247 "backend_startup: starting \"%s\"\n",
248 be->be_suffix[0]->bv_val, 0, 0 );
251 if ( be->bd_info->bi_open ) {
252 rc = be->bd_info->bi_open( be->bd_info );
257 LDAP_LOG(( "backend", LDAP_LEVEL_CRIT,
258 "backend_startup: bi_open failed!\n" ));
260 Debug( LDAP_DEBUG_ANY,
261 "backend_startup: bi_open failed!\n",
268 if ( be->bd_info->bi_db_open ) {
269 rc = be->bd_info->bi_db_open( be );
274 LDAP_LOG(( "backend", LDAP_LEVEL_CRIT,
275 "backend_startup: bi_db_open failed! (%d)\n", rc ));
277 Debug( LDAP_DEBUG_ANY,
278 "backend_startup: bi_db_open failed! (%d)\n",
287 /* open each backend type */
288 for( i = 0; i < nBackendInfo; i++ ) {
289 if( backendInfo[i].bi_nDB == 0) {
290 /* no database of this type, don't open */
294 if( backendInfo[i].bi_open ) {
295 rc = backendInfo[i].bi_open(
301 LDAP_LOG(( "backend", LDAP_LEVEL_CRIT,
302 "backend_startup: bi_open %d failed!\n", i ));
304 Debug( LDAP_DEBUG_ANY,
305 "backend_startup: bi_open %d failed!\n",
312 /* open each backend database */
313 for( i = 0; i < nBackendDB; i++ ) {
314 /* append global access controls */
315 acl_append( &backendDB[i].be_acl, global_acl );
317 if ( backendDB[i].bd_info->bi_db_open ) {
318 rc = backendDB[i].bd_info->bi_db_open(
324 LDAP_LOG(( "backend", LDAP_LEVEL_CRIT,
325 "backend_startup: bi_db_open(%d) failed! (%d)\n",
328 Debug( LDAP_DEBUG_ANY,
329 "backend_startup: bi_db_open(%d) failed! (%d)\n",
339 int backend_num( Backend *be )
343 if( be == NULL ) return -1;
345 for( i = 0; i < nBackendDB; i++ ) {
346 if( be == &backendDB[i] ) return i;
351 int backend_shutdown( Backend *be )
357 /* shutdown a specific backend database */
359 if ( be->bd_info->bi_nDB == 0 ) {
360 /* no database of this type, we never opened it */
364 if ( be->bd_info->bi_db_close ) {
365 be->bd_info->bi_db_close( be );
368 if( be->bd_info->bi_close ) {
369 be->bd_info->bi_close( be->bd_info );
375 /* close each backend database */
376 for( i = 0; i < nBackendDB; i++ ) {
377 if ( backendDB[i].bd_info->bi_db_close ) {
378 backendDB[i].bd_info->bi_db_close(
384 LDAP_LOG(( "backend", LDAP_LEVEL_NOTICE,
385 "backend_shutdown: bi_close %s failed!\n",
386 backendDB[i].be_type ));
388 Debug( LDAP_DEBUG_ANY,
389 "backend_close: bi_close %s failed!\n",
390 backendDB[i].be_type, 0, 0 );
395 /* close each backend type */
396 for( i = 0; i < nBackendInfo; i++ ) {
397 if( backendInfo[i].bi_nDB == 0 ) {
398 /* no database of this type */
402 if( backendInfo[i].bi_close ) {
403 backendInfo[i].bi_close(
411 int backend_destroy(void)
416 /* destroy each backend database */
417 for( i = 0, bd = backendDB; i < nBackendDB; i++, bd++ ) {
418 if ( bd->bd_info->bi_db_destroy ) {
419 bd->bd_info->bi_db_destroy( bd );
421 ber_bvecfree( bd->be_suffix );
422 ber_bvecfree( bd->be_nsuffix );
423 if ( bd->be_rootdn.bv_val ) free( bd->be_rootdn.bv_val );
424 if ( bd->be_rootndn.bv_val ) free( bd->be_rootndn.bv_val );
425 if ( bd->be_rootpw.bv_val ) free( bd->be_rootpw.bv_val );
426 acl_destroy( bd->be_acl, global_acl );
430 /* destroy each backend type */
431 for( i = 0; i < nBackendInfo; i++ ) {
432 if( backendInfo[i].bi_destroy ) {
433 backendInfo[i].bi_destroy(
439 if (backendInfo != binfo) {
442 #endif /* SLAPD_MODULES */
450 BackendInfo* backend_info(const char *type)
454 /* search for the backend type */
455 for( i = 0; i < nBackendInfo; i++ ) {
456 if( strcasecmp(backendInfo[i].bi_type, type) == 0 ) {
457 return &backendInfo[i];
471 BackendInfo *bi = backend_info(type);
475 fprintf( stderr, "Unrecognized database type (%s)\n", type );
479 backendDB = (BackendDB *) ch_realloc(
481 (nBackendDB + 1) * sizeof(Backend) );
483 memset( &backendDB[nbackends], '\0', sizeof(Backend) );
485 be = &backends[nbackends++];
488 be->be_def_limit = deflimit;
489 be->be_dfltaccess = global_default_access;
491 be->be_restrictops = global_restrictops;
492 be->be_requires = global_requires;
493 be->be_ssf_set = global_ssf_set;
495 /* assign a default depth limit for alias deref */
496 be->be_max_deref_depth = SLAPD_DEFAULT_MAXDEREFDEPTH;
499 rc = bi->bi_db_init( be );
503 fprintf( stderr, "database init failed (%s)\n", type );
517 for ( i = 0; i < nbackends; i++ ) {
518 if ( backends[i].bd_info->bi_db_close ) {
519 (*backends[i].bd_info->bi_db_close)( &backends[i] );
531 ber_len_t len, dnlen = dn->bv_len;
534 for ( i = 0; i < nbackends; i++ ) {
535 for ( j = 0; backends[i].be_nsuffix != NULL &&
536 backends[i].be_nsuffix[j] != NULL; j++ )
538 if (( backends[i].be_flags & SLAP_BFLAG_GLUE_SUBORDINATE )
544 len = backends[i].be_nsuffix[j]->bv_len;
547 /* suffix is longer than DN */
551 if ( len && len < dnlen &&
552 ( !DN_SEPARATOR( dn->bv_val[(dnlen-len)-1] ) ||
553 DN_ESCAPE( dn->bv_val[(dnlen-len)-2] ) ) )
555 /* make sure we have a separator */
559 if ( strcmp( backends[i].be_nsuffix[j]->bv_val,
560 &dn->bv_val[dnlen-len] ) == 0 )
565 if( manageDSAit && len == dnlen ) {
582 struct berval *bvsuffix
587 for ( i = 0; be->be_nsuffix != NULL && be->be_nsuffix[i] != NULL; i++ ) {
588 if ( ber_bvcmp( be->be_nsuffix[i], bvsuffix ) == 0 ) {
597 be_isroot( Backend *be, struct berval *ndn )
599 if ( !ndn->bv_len ) {
603 if ( !be->be_rootndn.bv_len ) {
607 return dn_match( &be->be_rootndn, ndn );
611 be_isupdate( Backend *be, struct berval *ndn )
613 if ( !ndn->bv_len ) {
617 if ( !be->be_update_ndn.bv_len ) {
621 return dn_match( &be->be_update_ndn, ndn );
625 be_root_dn( Backend *be )
627 return &be->be_rootdn;
631 be_isroot_pw( Backend *be,
634 struct berval *cred )
638 if ( ! be_isroot( be, ndn ) ) {
642 if( be->be_rootpw.bv_len == 0 ) {
646 #if defined( SLAPD_CRYPT ) || defined( SLAPD_SPASSWD )
647 ldap_pvt_thread_mutex_lock( &passwd_mutex );
649 lutil_passwd_sasl_conn = conn->c_sasl_context;
653 result = lutil_passwd( &be->be_rootpw, cred, NULL );
655 #if defined( SLAPD_CRYPT ) || defined( SLAPD_SPASSWD )
657 lutil_passwd_sasl_conn = NULL;
659 ldap_pvt_thread_mutex_unlock( &passwd_mutex );
673 if ( be->be_release ) {
674 /* free and release entry from backend */
675 return be->be_release( be, conn, op, e, rw );
691 for ( i = 0; i < nbackends; i++ ) {
692 if ( backends[i].be_unbind ) {
693 (*backends[i].be_unbind)( &backends[i], conn, op );
701 backend_connection_init(
707 for ( i = 0; i < nbackends; i++ ) {
708 if ( backends[i].be_connection_init ) {
709 (*backends[i].be_connection_init)( &backends[i], conn);
717 backend_connection_destroy(
723 for ( i = 0; i < nbackends; i++ ) {
724 if ( backends[i].be_connection_destroy ) {
725 (*backends[i].be_connection_destroy)( &backends[i], conn);
733 backend_check_controls(
741 if( ctrls == NULL ) {
745 for( ; *ctrls != NULL ; ctrls++ ) {
746 if( (*ctrls)->ldctl_iscritical &&
747 !charray_inlist( be->be_controls, (*ctrls)->ldctl_oid ) )
749 *text = "control unavailable in context";
750 return LDAP_UNAVAILABLE_CRITICAL_EXTENSION;
758 backend_check_restrictions(
766 slap_mask_t restrictops;
767 slap_mask_t requires;
773 rc = backend_check_controls( be, conn, op, text );
775 if( rc != LDAP_SUCCESS ) {
779 restrictops = be->be_restrictops;
780 requires = be->be_requires;
781 ssf = &be->be_ssf_set;
784 restrictops = global_restrictops;
785 requires = global_requires;
786 ssf = &global_ssf_set;
789 switch( op->o_tag ) {
791 opflag = SLAP_RESTRICT_OP_ADD;
795 opflag = SLAP_RESTRICT_OP_BIND;
797 case LDAP_REQ_COMPARE:
798 opflag = SLAP_RESTRICT_OP_COMPARE;
800 case LDAP_REQ_DELETE:
802 opflag = SLAP_RESTRICT_OP_DELETE;
804 case LDAP_REQ_EXTENDED:
805 opflag = SLAP_RESTRICT_OP_EXTENDED;
807 case LDAP_REQ_MODIFY:
809 opflag = SLAP_RESTRICT_OP_MODIFY;
811 case LDAP_REQ_RENAME:
813 opflag = SLAP_RESTRICT_OP_RENAME;
815 case LDAP_REQ_SEARCH:
816 opflag = SLAP_RESTRICT_OP_SEARCH;
818 case LDAP_REQ_UNBIND:
822 *text = "restrict operations internal error";
826 if ( op->o_tag != LDAP_REQ_EXTENDED
827 || strcmp( (const char *) opdata, LDAP_EXOP_START_TLS ) )
829 /* these checks don't apply to StartTLS */
831 if( op->o_tag == LDAP_REQ_EXTENDED ) {
832 /* threat other extended operations as update ops */
836 if( op->o_transport_ssf < ssf->sss_transport ) {
837 *text = "transport confidentiality required";
838 return LDAP_CONFIDENTIALITY_REQUIRED;
841 if( op->o_tls_ssf < ssf->sss_tls ) {
842 *text = "TLS confidentiality required";
843 return LDAP_CONFIDENTIALITY_REQUIRED;
846 if( op->o_tag != LDAP_REQ_BIND || opdata == NULL ) {
847 /* these checks don't apply to SASL bind */
849 if( op->o_sasl_ssf < ssf->sss_sasl ) {
850 *text = "SASL confidentiality required";
851 return LDAP_CONFIDENTIALITY_REQUIRED;
854 if( op->o_ssf < ssf->sss_ssf ) {
855 *text = "confidentiality required";
856 return LDAP_CONFIDENTIALITY_REQUIRED;
861 if( op->o_transport_ssf < ssf->sss_update_transport ) {
862 *text = "transport update confidentiality required";
863 return LDAP_CONFIDENTIALITY_REQUIRED;
866 if( op->o_tls_ssf < ssf->sss_update_tls ) {
867 *text = "TLS update confidentiality required";
868 return LDAP_CONFIDENTIALITY_REQUIRED;
871 if( op->o_sasl_ssf < ssf->sss_update_sasl ) {
872 *text = "SASL update confidentiality required";
873 return LDAP_CONFIDENTIALITY_REQUIRED;
876 if( op->o_ssf < ssf->sss_update_ssf ) {
877 *text = "update confidentiality required";
878 return LDAP_CONFIDENTIALITY_REQUIRED;
881 if( op->o_ndn.bv_len == 0 ) {
882 *text = "modifications require authentication";
883 return LDAP_OPERATIONS_ERROR;
888 if ( op->o_tag != LDAP_REQ_BIND && ( op->o_tag != LDAP_REQ_EXTENDED ||
889 strcmp( (const char *) opdata, LDAP_EXOP_START_TLS ) ) )
891 /* these checks don't apply to Bind or StartTLS */
893 if( requires & SLAP_REQUIRE_STRONG ) {
894 /* should check mechanism */
895 if( op->o_authmech.bv_len == 0 || op->o_dn.bv_len == 0 )
897 *text = "strong authentication required";
898 return LDAP_STRONG_AUTH_REQUIRED;
902 if( requires & SLAP_REQUIRE_SASL ) {
903 if( op->o_authmech.bv_len == 0 || op->o_dn.bv_len == 0 )
905 *text = "SASL authentication required";
906 return LDAP_STRONG_AUTH_REQUIRED;
910 if( requires & SLAP_REQUIRE_AUTHC ) {
911 if( op->o_dn.bv_len == 0 ) {
912 *text = "authentication required";
913 return LDAP_UNWILLING_TO_PERFORM;
917 if( requires & SLAP_REQUIRE_BIND ) {
919 ldap_pvt_thread_mutex_lock( &conn->c_mutex );
920 version = conn->c_protocol;
921 ldap_pvt_thread_mutex_unlock( &conn->c_mutex );
924 /* no bind has occurred */
925 *text = "BIND required";
926 return LDAP_OPERATIONS_ERROR;
930 if( requires & SLAP_REQUIRE_LDAP_V3 ) {
931 if( op->o_protocol < LDAP_VERSION3 ) {
932 /* no bind has occurred */
933 *text = "operation restricted to LDAPv3 clients";
934 return LDAP_OPERATIONS_ERROR;
939 if( restrictops & opflag ) {
940 if( restrictops == SLAP_RESTRICT_OP_READS ) {
941 *text = "read operations restricted";
943 *text = "operation restricted";
945 return LDAP_UNWILLING_TO_PERFORM;
951 int backend_check_referrals(
958 int rc = LDAP_SUCCESS;
960 if( be->be_chk_referrals ) {
963 rc = be->be_chk_referrals( be,
964 conn, op, dn, ndn, &text );
966 if( rc != LDAP_SUCCESS && rc != LDAP_REFERRAL ) {
967 send_ldap_result( conn, op, rc,
968 NULL, text, NULL, NULL );
981 struct berval *gr_ndn,
982 struct berval *op_ndn,
983 ObjectClass *group_oc,
984 AttributeDescription *group_at
990 ldap_pvt_thread_mutex_lock( &op->o_abandonmutex );
992 ldap_pvt_thread_mutex_unlock( &op->o_abandonmutex );
993 if (i) return SLAPD_ABANDON;
995 if ( !dn_match( &target->e_nname, gr_ndn ) ) {
996 /* we won't attempt to send it to a different backend */
998 be = select_backend( gr_ndn, 0,
999 (be->be_flags & SLAP_BFLAG_GLUE_INSTANCE));
1002 return LDAP_NO_SUCH_OBJECT;
1006 ldap_pvt_thread_mutex_lock( &conn->c_mutex );
1007 for (g = conn->c_groups; g; g=g->next) {
1008 if (g->be != be || g->oc != group_oc || g->at != group_at ||
1009 g->len != gr_ndn->bv_len)
1011 if (strcmp( g->ndn, gr_ndn->bv_val ) == 0)
1014 ldap_pvt_thread_mutex_unlock( &conn->c_mutex );
1018 if( be->be_group ) {
1019 int res = be->be_group( be, conn, op,
1020 target, gr_ndn, op_ndn,
1021 group_oc, group_at );
1023 if (op->o_tag != LDAP_REQ_BIND) {
1024 g = ch_malloc(sizeof(GroupAssertion) + gr_ndn->bv_len);
1029 g->len = gr_ndn->bv_len;
1030 strcpy(g->ndn, gr_ndn->bv_val);
1031 ldap_pvt_thread_mutex_lock( &conn->c_mutex );
1032 g->next = conn->c_groups;
1034 ldap_pvt_thread_mutex_unlock( &conn->c_mutex );
1040 return LDAP_UNWILLING_TO_PERFORM;
1050 AttributeDescription *entry_at,
1054 if ( target == NULL || !dn_match( &target->e_nname, edn ) ) {
1055 /* we won't attempt to send it to a different backend */
1057 be = select_backend( edn, 0,
1058 (be->be_flags & SLAP_BFLAG_GLUE_INSTANCE));
1061 return LDAP_NO_SUCH_OBJECT;
1065 if( be->be_attribute ) {
1066 return be->be_attribute( be, conn, op, target, edn,
1070 return LDAP_UNWILLING_TO_PERFORM;
1073 Attribute *backend_operational(
1078 AttributeName *attrs,
1081 Attribute *a = NULL, **ap = &a;
1083 #ifdef SLAPD_SCHEMA_DN
1084 *ap = slap_operational_subschemaSubentry();
1085 ap = &(*ap)->a_next;
1089 * If operational attributes (allegedly) are required,
1090 * and the backend supports specific operational attributes,
1091 * add them to the attribute list
1093 if ( ( opattrs || attrs ) && be && be->be_operational != NULL ) {
1094 ( void )be->be_operational( be, conn, op, e, attrs, opattrs, ap );