1 /* database.c - deals with database subsystem */
3 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
5 * Copyright 2001-2005 The OpenLDAP Foundation.
6 * Portions Copyright 2001-2003 Pierangelo Masarati.
9 * Redistribution and use in source and binary forms, with or without
10 * modification, are permitted only as authorized by the OpenLDAP
13 * A copy of this license is available in file LICENSE in the
14 * top-level directory of the distribution or, alternatively, at
15 * <http://www.OpenLDAP.org/license.html>.
18 * This work was initially developed by Pierangelo Masarati for inclusion
19 * in OpenLDAP Software.
25 #include <ac/string.h>
26 #include <ac/unistd.h>
29 #include "back-monitor.h"
31 #if defined(LDAP_SLAPI)
33 static int monitor_back_add_plugin( monitor_info_t *mi, Backend *be, Entry *e );
34 #endif /* defined(LDAP_SLAPI) */
36 #if defined(SLAPD_BDB)
37 #include "../back-bdb/back-bdb.h"
38 #endif /* defined(SLAPD_BDB) */
39 #if defined(SLAPD_HDB)
40 #include "../back-hdb/back-bdb.h"
41 #endif /* defined(SLAPD_HDB) */
42 #if defined(SLAPD_LDAP)
43 #include "../back-ldap/back-ldap.h"
44 #endif /* defined(SLAPD_LDAP) */
45 #if 0 && defined(SLAPD_LDBM)
46 #include "../back-ldbm/back-ldbm.h"
47 #endif /* defined(SLAPD_LDBM) */
49 /* for PATH_MAX on some systems (e.g. Solaris) */
52 #endif /* HAVE_LIMITS_H */
55 #endif /* ! PATH_MAX */
57 static struct restricted_ops_t {
60 } restricted_ops[] = {
61 { BER_BVC( "add" ), SLAP_RESTRICT_OP_ADD },
62 { BER_BVC( "bind" ), SLAP_RESTRICT_OP_BIND },
63 { BER_BVC( "compare" ), SLAP_RESTRICT_OP_COMPARE },
64 { BER_BVC( "delete" ), SLAP_RESTRICT_OP_DELETE },
65 { BER_BVC( "extended" ), SLAP_RESTRICT_OP_EXTENDED },
66 { BER_BVC( "modify" ), SLAP_RESTRICT_OP_MODIFY },
67 { BER_BVC( "rename" ), SLAP_RESTRICT_OP_RENAME },
68 { BER_BVC( "search" ), SLAP_RESTRICT_OP_SEARCH },
70 }, restricted_exops[] = {
71 { BER_BVC( LDAP_EXOP_START_TLS ), SLAP_RESTRICT_EXOP_START_TLS },
72 { BER_BVC( LDAP_EXOP_MODIFY_PASSWD ), SLAP_RESTRICT_EXOP_MODIFY_PASSWD },
73 { BER_BVC( LDAP_EXOP_X_WHO_AM_I ), SLAP_RESTRICT_EXOP_WHOAMI },
74 { BER_BVC( LDAP_EXOP_X_CANCEL ), SLAP_RESTRICT_EXOP_CANCEL },
79 init_readOnly( monitor_info_t *mi, Entry *e, slap_mask_t restrictops )
81 struct berval *tf = ( ( restrictops & SLAP_RESTRICT_OP_MASK ) == SLAP_RESTRICT_OP_WRITES ) ?
82 (struct berval *)&slap_true_bv : (struct berval *)&slap_false_bv;
84 return attr_merge_one( e, mi->mi_ad_readOnly, tf, tf );
88 init_restrictedOperation( monitor_info_t *mi, Entry *e, slap_mask_t restrictops )
92 for ( i = 0; restricted_ops[ i ].op.bv_val; i++ ) {
93 if ( restrictops & restricted_ops[ i ].tag ) {
94 rc = attr_merge_one( e, mi->mi_ad_restrictedOperation,
95 &restricted_ops[ i ].op,
96 &restricted_ops[ i ].op );
103 for ( i = 0; restricted_exops[ i ].op.bv_val; i++ ) {
104 if ( restrictops & restricted_exops[ i ].tag ) {
105 rc = attr_merge_one( e, mi->mi_ad_restrictedOperation,
106 &restricted_exops[ i ].op,
107 &restricted_exops[ i ].op );
118 monitor_subsys_database_init(
124 Entry *e_database, **ep;
127 monitor_subsys_t *ms_backend,
130 assert( be != NULL );
132 mi = ( monitor_info_t * )be->be_private;
134 ms_backend = monitor_back_get_subsys( SLAPD_MONITOR_BACKEND_NAME );
135 if ( ms_backend == NULL ) {
136 Debug( LDAP_DEBUG_ANY,
137 "monitor_subsys_database_init: "
139 "\"" SLAPD_MONITOR_BACKEND_NAME "\" "
145 ms_overlay = monitor_back_get_subsys( SLAPD_MONITOR_OVERLAY_NAME );
146 if ( ms_overlay == NULL ) {
147 Debug( LDAP_DEBUG_ANY,
148 "monitor_subsys_database_init: "
150 "\"" SLAPD_MONITOR_OVERLAY_NAME "\" "
156 if ( monitor_cache_get( mi, &ms->mss_ndn, &e_database ) ) {
157 Debug( LDAP_DEBUG_ANY,
158 "monitor_subsys_database_init: "
159 "unable to get entry \"%s\"\n",
160 ms->mss_ndn.bv_val, 0, 0 );
164 (void)init_readOnly( mi, e_database, frontendDB->be_restrictops );
165 (void)init_restrictedOperation( mi, e_database, frontendDB->be_restrictops );
167 mp = ( monitor_entry_t * )e_database->e_private;
168 mp->mp_children = NULL;
169 ep = &mp->mp_children;
172 LDAP_STAILQ_FOREACH( be, &backendDB, be_next ) {
173 char buf[ BACKMONITOR_BUFSIZE ];
175 slap_overinfo *oi = NULL;
176 BackendInfo *bi, *bi2;
183 if ( overlay_is_over( be ) ) {
184 oi = (slap_overinfo *)be->bd_info->bi_private;
188 /* Subordinates are not exposed as their own naming context */
189 if ( SLAP_GLUE_SUBORDINATE( be ) ) {
193 snprintf( buf, sizeof( buf ),
194 "dn: cn=Database %d,%s\n"
196 "structuralObjectClass: %s\n"
198 "description: This object contains the type of the database.\n"
201 "modifiersName: %s\n"
202 "createTimestamp: %s\n"
203 "modifyTimestamp: %s\n",
206 mi->mi_oc_monitoredObject->soc_cname.bv_val,
207 mi->mi_oc_monitoredObject->soc_cname.bv_val,
209 mi->mi_ad_monitoredInfo->ad_cname.bv_val,
211 mi->mi_creatorsName.bv_val,
212 mi->mi_creatorsName.bv_val,
213 mi->mi_startTime.bv_val,
214 mi->mi_startTime.bv_val );
216 e = str2entry( buf );
218 Debug( LDAP_DEBUG_ANY,
219 "monitor_subsys_database_init: "
220 "unable to create entry \"cn=Database %d,%s\"\n",
221 i, ms->mss_dn.bv_val, 0 );
225 if ( SLAP_MONITOR(be) ) {
226 attr_merge( e, slap_schema.si_ad_monitorContext,
227 be->be_suffix, be->be_nsuffix );
228 attr_merge( e_database, slap_schema.si_ad_monitorContext,
229 be->be_suffix, be->be_nsuffix );
232 if ( be->be_suffix == NULL ) {
233 Debug( LDAP_DEBUG_ANY,
234 "monitor_subsys_database_init: "
235 "missing suffix for database %d\n",
239 attr_merge( e, slap_schema.si_ad_namingContexts,
240 be->be_suffix, be->be_nsuffix );
241 attr_merge( e_database, slap_schema.si_ad_namingContexts,
242 be->be_suffix, be->be_nsuffix );
245 (void)init_readOnly( mi, e, be->be_restrictops );
246 (void)init_restrictedOperation( mi, e, be->be_restrictops );
249 slap_overinst *on = oi->oi_list,
252 for ( ; on; on = on->on_next ) {
256 for ( on2 = on1; on2 != on; on2 = on2->on_next ) {
257 if ( on2->on_bi.bi_type == on->on_bi.bi_type ) {
266 ber_str2bv( on->on_bi.bi_type, 0, 0, &bv );
267 attr_merge_normalize_one( e, mi->mi_ad_monitorOverlay,
270 /* find the overlay number, j */
271 for ( on2 = overlay_next( NULL ), j = 0; on2; on2 = overlay_next( on2 ), j++ ) {
272 if ( on2->on_bi.bi_type == on->on_bi.bi_type ) {
278 snprintf( buf, sizeof( buf ),
280 j, ms_overlay->mss_dn.bv_val );
281 ber_str2bv( buf, 0, 0, &bv );
282 attr_merge_normalize_one( e, mi->mi_ad_seeAlso,
287 #if defined(SLAPD_BDB) || defined(SLAPD_HDB)
288 if ( strcmp( bi->bi_type, "bdb" ) == 0
289 || strcmp( bi->bi_type, "hdb" ) == 0 )
292 ber_len_t pathlen = 0, len = 0;
293 char path[ PATH_MAX ] = { '\0' };
296 if ( strcmp( bi->bi_type, "bdb" ) == 0
297 || strcmp( bi->bi_type, "hdb" ) == 0 )
299 struct bdb_info *bdb = (struct bdb_info *) be->be_private;
301 fname = bdb->bi_dbenv_home;
303 } else if ( strcmp( bi->bi_type, "ldbm" ) == 0 ) {
304 struct ldbminfo *ldbm = (struct ldbminfo *) be->be_private;
306 /* FIXME: there's a conflict
307 * between back-bdb.h and back.ldbm.h;
308 * anyway, this code will be moved
309 * to the backends as soon as the
310 * issue with filtering on namingContexts
312 fname = ldbm->li_directory;
316 len = strlen( fname );
317 if ( fname[ 0 ] != '/' ) {
318 /* get full path name */
319 getcwd( path, sizeof( path ) );
320 pathlen = strlen( path );
322 if ( fname[ 0 ] == '.' && fname[ 1 ] == '/' ) {
328 bv.bv_len = STRLENOF( "file://" ) + pathlen
329 + STRLENOF( "/" ) + len;
330 bv.bv_val = ch_malloc( bv.bv_len + STRLENOF( "/" ) + 1 );
331 AC_MEMCPY( bv.bv_val, "file://", STRLENOF( "file://" ) );
333 AC_MEMCPY( &bv.bv_val[ STRLENOF( "file://" ) ],
335 bv.bv_val[ STRLENOF( "file://" ) + pathlen ] = '/';
338 AC_MEMCPY( &bv.bv_val[ STRLENOF( "file://" ) + pathlen ],
340 if ( bv.bv_val[ bv.bv_len - 1 ] != '/' ) {
341 bv.bv_val[ bv.bv_len ] = '/';
344 bv.bv_val[ bv.bv_len ] = '\0';
346 attr_merge_normalize_one( e, slap_schema.si_ad_labeledURI,
349 ch_free( bv.bv_val );
351 #endif /* defined(SLAPD_LDAP) || defined(SLAPD_HDB) */
353 #if defined(SLAPD_LDAP)
354 if ( strcmp( bi->bi_type, "ldap" ) == 0 ) {
355 struct ldapinfo *li =
356 (struct ldapinfo *)be->be_private;
359 ber_str2bv( li->url, 0, 0, &bv );
361 attr_merge_normalize_one( e,
362 slap_schema.si_ad_labeledURI,
365 #endif /* defined(SLAPD_LDAP) */
368 LDAP_STAILQ_FOREACH( bi2, &backendInfo, bi_next ) {
370 if ( bi2->bi_type == bi->bi_type ) {
373 snprintf( buf, sizeof( buf ),
375 j, ms_backend->mss_dn.bv_val );
377 bv.bv_len = strlen( buf );
378 attr_merge_normalize_one( e, mi->mi_ad_seeAlso,
383 /* we must find it! */
386 mp = monitor_entrypriv_create();
390 e->e_private = ( void * )mp;
392 mp->mp_flags = ms->mss_flags
395 if ( monitor_cache_add( mi, e ) ) {
396 Debug( LDAP_DEBUG_ANY,
397 "monitor_subsys_database_init: "
398 "unable to add entry \"cn=Database %d,%s\"\n",
399 i, ms->mss_dn.bv_val, 0 );
403 #if defined(LDAP_SLAPI)
404 monitor_back_add_plugin( mi, be, e );
405 #endif /* defined(LDAP_SLAPI) */
408 Entry **ep_overlay = &mp->mp_children;
409 monitor_entry_t *mp_overlay;
410 slap_overinst *on = oi->oi_list;
413 for ( o = 0; on; o++, on = on->on_next ) {
417 /* find the overlay number, j */
418 for ( on2 = overlay_next( NULL ), j = 0; on2; on2 = overlay_next( on2 ), j++ ) {
419 if ( on2->on_bi.bi_type == on->on_bi.bi_type ) {
425 snprintf( buf, sizeof( buf ),
426 "dn: cn=Overlay %d,cn=Database %d,%s\n"
428 "structuralObjectClass: %s\n"
430 "description: This object contains the type of the overlay.\n"
432 "seeAlso: cn=Overlay %d,%s\n"
434 "modifiersName: %s\n"
435 "createTimestamp: %s\n"
436 "modifyTimestamp: %s\n",
440 mi->mi_oc_monitoredObject->soc_cname.bv_val,
441 mi->mi_oc_monitoredObject->soc_cname.bv_val,
443 mi->mi_ad_monitoredInfo->ad_cname.bv_val,
446 ms_overlay->mss_dn.bv_val,
447 mi->mi_creatorsName.bv_val,
448 mi->mi_creatorsName.bv_val,
449 mi->mi_startTime.bv_val,
450 mi->mi_startTime.bv_val );
452 e_overlay = str2entry( buf );
453 if ( e_overlay == NULL ) {
454 Debug( LDAP_DEBUG_ANY,
455 "monitor_subsys_database_init: "
456 "unable to create entry "
457 "\"cn=Overlay %d,cn=Database %d,%s\"\n",
458 o, i, ms->mss_dn.bv_val );
462 mp_overlay = monitor_entrypriv_create();
463 if ( mp_overlay == NULL ) {
466 e_overlay->e_private = ( void * )mp_overlay;
467 mp_overlay->mp_info = ms;
468 mp_overlay->mp_flags = ms->mss_flags
471 if ( monitor_cache_add( mi, e_overlay ) ) {
472 Debug( LDAP_DEBUG_ANY,
473 "monitor_subsys_database_init: "
474 "unable to add entry "
475 "\"cn=Overlay %d,cn=Database %d,%s\"\n",
476 o, i, ms->mss_dn.bv_val );
480 *ep_overlay = e_overlay;
481 ep_overlay = &mp_overlay->mp_next;
489 monitor_cache_release( mi, e_database );
496 * cur: must not contain the tags corresponding to the values in v
497 * delta: will contain the tags corresponding to the values in v
500 value_mask( BerVarray v, slap_mask_t cur, slap_mask_t *delta )
502 for ( ; !BER_BVISNULL( v ); v++ ) {
503 struct restricted_ops_t *rops;
506 if ( OID_LEADCHAR( v->bv_val[ 0 ] ) ) {
507 rops = restricted_exops;
510 rops = restricted_ops;
513 for ( i = 0; !BER_BVISNULL( &rops[ i ].op ); i++ ) {
514 if ( ber_bvstrcasecmp( v, &rops[ i ].op ) != 0 ) {
518 if ( rops[ i ].tag & *delta ) {
522 if ( rops[ i ].tag & cur ) {
526 cur |= rops[ i ].tag;
527 *delta |= rops[ i ].tag;
532 if ( BER_BVISNULL( &rops[ i ].op ) ) {
533 return LDAP_INVALID_SYNTAX;
541 monitor_subsys_database_modify(
546 monitor_info_t *mi = (monitor_info_t *)op->o_bd->be_private;
548 Attribute *save_attrs, *a;
549 Modifications *modlist = op->oq_modify.rs_modlist;
552 int ro_gotval = 1, i, n;
553 slap_mask_t rp_add = 0, rp_delete = 0, rp_cur;
556 i = sscanf( e->e_nname.bv_val, "cn=database %d,", &n );
558 return LDAP_UNWILLING_TO_PERFORM;
560 if ( n < 0 || n >= nBackendDB )
561 return LDAP_NO_SUCH_OBJECT;
563 LDAP_STAILQ_FOREACH( be, &backendDB, be_next ) {
567 /* do not allow some changes on back-monitor (needs work)... */
568 if ( SLAP_MONITOR( be ) )
569 return LDAP_UNWILLING_TO_PERFORM;
571 rp_cur = be->be_restrictops;
573 save_attrs = e->e_attrs;
574 e->e_attrs = attrs_dup( e->e_attrs );
576 for ( ml=modlist; ml; ml=ml->sml_next ) {
577 Modification *mod = &ml->sml_mod;
579 if ( mod->sm_desc == mi->mi_ad_readOnly ) {
582 if ( mod->sm_values ) {
583 if ( !BER_BVISNULL( &mod->sm_values[ 1 ] ) ) {
584 rc = LDAP_CONSTRAINT_VIOLATION;
588 if ( bvmatch( &slap_true_bv, mod->sm_values )) {
591 } else if ( bvmatch( &slap_false_bv, mod->sm_values )) {
595 rc = LDAP_INVALID_SYNTAX;
600 switch ( mod->sm_op ) {
601 case LDAP_MOD_DELETE:
602 if ( ro_gotval < 1 ) {
603 rc = LDAP_CONSTRAINT_VIOLATION;
608 if ( val == 0 && ( rp_cur & SLAP_RESTRICT_OP_WRITES ) == SLAP_RESTRICT_OP_WRITES ) {
609 rc = LDAP_NO_SUCH_ATTRIBUTE;
613 if ( val == 1 && ( rp_cur & SLAP_RESTRICT_OP_WRITES ) != SLAP_RESTRICT_OP_WRITES ) {
614 rc = LDAP_NO_SUCH_ATTRIBUTE;
620 case LDAP_MOD_REPLACE:
625 if ( ro_gotval > 0 ) {
626 rc = LDAP_CONSTRAINT_VIOLATION;
632 rp_add |= (~rp_cur) & SLAP_RESTRICT_OP_WRITES;
633 rp_cur |= SLAP_RESTRICT_OP_WRITES;
634 rp_delete &= ~SLAP_RESTRICT_OP_WRITES;
636 } else if ( val == 0 ) {
637 rp_delete |= rp_cur & SLAP_RESTRICT_OP_WRITES;
638 rp_cur &= ~SLAP_RESTRICT_OP_WRITES;
639 rp_add &= ~SLAP_RESTRICT_OP_WRITES;
648 } else if ( mod->sm_desc == mi->mi_ad_restrictedOperation ) {
649 slap_mask_t mask = 0;
651 switch ( mod->sm_op ) {
652 case LDAP_MOD_DELETE:
653 if ( mod->sm_values == NULL ) {
659 rc = value_mask( mod->sm_values, ~rp_cur, &mask );
660 if ( rc == LDAP_SUCCESS ) {
665 } else if ( rc == LDAP_OTHER ) {
666 rc = LDAP_NO_SUCH_ATTRIBUTE;
670 case LDAP_MOD_REPLACE:
677 rc = value_mask( mod->sm_values, rp_cur, &mask );
678 if ( rc == LDAP_SUCCESS ) {
683 } else if ( rc == LDAP_OTHER ) {
684 rc = LDAP_TYPE_OR_VALUE_EXISTS;
693 if ( rc != LDAP_SUCCESS ) {
697 } else if ( is_at_operational( mod->sm_desc->ad_type )) {
698 /* accept all operational attributes */
699 attr_delete( &e->e_attrs, mod->sm_desc );
700 rc = attr_merge( e, mod->sm_desc, mod->sm_values,
708 rc = LDAP_UNWILLING_TO_PERFORM;
714 if ( ro_gotval < 1 ) {
715 rc = LDAP_CONSTRAINT_VIOLATION;
719 if ( ( rp_cur & SLAP_RESTRICT_OP_EXTENDED ) && ( rp_cur & SLAP_RESTRICT_EXOP_MASK ) ) {
720 rc = LDAP_CONSTRAINT_VIOLATION;
724 if ( rp_delete & rp_add ) {
729 /* check current value of readOnly */
730 if ( ( rp_cur & SLAP_RESTRICT_OP_WRITES ) == SLAP_RESTRICT_OP_WRITES ) {
731 tf = (struct berval *)&slap_true_bv;
734 tf = (struct berval *)&slap_false_bv;
737 a = attr_find( e->e_attrs, mi->mi_ad_readOnly );
743 if ( !bvmatch( &a->a_vals[ 0 ], tf ) ) {
744 attr_delete( &e->e_attrs, mi->mi_ad_readOnly );
745 rc = attr_merge_one( e, mi->mi_ad_readOnly, tf, tf );
748 if ( rc == LDAP_SUCCESS ) {
750 if ( rp_delete == be->be_restrictops ) {
751 attr_delete( &e->e_attrs, mi->mi_ad_restrictedOperation );
754 a = attr_find( e->e_attrs, mi->mi_ad_restrictedOperation );
760 for ( i = 0; !BER_BVISNULL( &restricted_ops[ i ].op ); i++ ) {
761 if ( rp_delete & restricted_ops[ i ].tag ) {
764 for ( j = 0; !BER_BVISNULL( &a->a_nvals[ j ] ); j++ ) {
767 if ( !bvmatch( &a->a_nvals[ j ], &restricted_ops[ i ].op ) ) {
771 ch_free( a->a_vals[ j ].bv_val );
772 ch_free( a->a_nvals[ j ].bv_val );
774 for ( k = j + 1; !BER_BVISNULL( &a->a_nvals[ k ] ); k++ ) {
775 a->a_vals[ k - 1 ] = a->a_vals[ k ];
776 a->a_nvals[ k - 1 ] = a->a_nvals[ k ];
779 BER_BVZERO( &a->a_vals[ k - 1 ] );
780 BER_BVZERO( &a->a_nvals[ k - 1 ] );
785 for ( i = 0; !BER_BVISNULL( &restricted_exops[ i ].op ); i++ ) {
786 if ( rp_delete & restricted_exops[ i ].tag ) {
789 for ( j = 0; !BER_BVISNULL( &a->a_nvals[ j ] ); j++ ) {
792 if ( !bvmatch( &a->a_nvals[ j ], &restricted_exops[ i ].op ) ) {
796 ch_free( a->a_vals[ j ].bv_val );
797 ch_free( a->a_nvals[ j ].bv_val );
799 for ( k = j + 1; !BER_BVISNULL( &a->a_nvals[ k ] ); k++ ) {
800 a->a_vals[ k - 1 ] = a->a_vals[ k ];
801 a->a_nvals[ k - 1 ] = a->a_nvals[ k ];
804 BER_BVZERO( &a->a_vals[ k - 1 ] );
805 BER_BVZERO( &a->a_nvals[ k - 1 ] );
813 for ( i = 0; !BER_BVISNULL( &restricted_ops[ i ].op ); i++ ) {
814 if ( rp_add & restricted_ops[ i ].tag ) {
815 attr_merge_one( e, mi->mi_ad_restrictedOperation,
816 &restricted_ops[ i ].op,
817 &restricted_ops[ i ].op );
821 for ( i = 0; !BER_BVISNULL( &restricted_exops[ i ].op ); i++ ) {
822 if ( rp_add & restricted_exops[ i ].tag ) {
823 attr_merge_one( e, mi->mi_ad_restrictedOperation,
824 &restricted_exops[ i ].op,
825 &restricted_exops[ i ].op );
831 be->be_restrictops = rp_cur;
834 if ( rc == LDAP_SUCCESS ) {
835 attrs_free( save_attrs );
838 Attribute *tmp = e->e_attrs;
839 e->e_attrs = save_attrs;
845 #if defined(LDAP_SLAPI)
847 monitor_back_add_plugin( monitor_info_t *mi, Backend *be, Entry *e_database )
849 Slapi_PBlock *pCurrentPB;
850 int i, rc = LDAP_SUCCESS;
852 if ( slapi_int_pblock_get_first( be, &pCurrentPB ) != LDAP_SUCCESS ) {
854 * LDAP_OTHER is returned if no plugins are installed
862 Slapi_PluginDesc *srchdesc;
863 char buf[ BACKMONITOR_BUFSIZE ];
866 rc = slapi_pblock_get( pCurrentPB, SLAPI_PLUGIN_DESCRIPTION,
868 if ( rc != LDAP_SUCCESS ) {
872 snprintf( buf, sizeof(buf),
873 "plugin %d name: %s; "
879 srchdesc->spd_vendor,
880 srchdesc->spd_version,
881 srchdesc->spd_description );
883 ber_str2bv( buf, 0, 0, &bv );
884 attr_merge_normalize_one( e_database,
885 mi->mi_ad_monitoredInfo, &bv, NULL );
889 } while ( ( slapi_int_pblock_get_next( &pCurrentPB ) == LDAP_SUCCESS )
890 && ( pCurrentPB != NULL ) );
895 #endif /* defined(LDAP_SLAPI) */