]> git.sur5r.net Git - openldap/commitdiff
fix attr_merge() usage
authorPierangelo Masarati <ando@openldap.org>
Fri, 6 Aug 2004 16:38:41 +0000 (16:38 +0000)
committerPierangelo Masarati <ando@openldap.org>
Fri, 6 Aug 2004 16:38:41 +0000 (16:38 +0000)
servers/slapd/back-monitor/database.c

index f70e937dc34b7a0d8bdef5fca56b1fd42a162790..0b25c306e14875f9d6ed87fa3f6879135f4f84e8 100644 (file)
@@ -63,7 +63,7 @@ init_readOnly( struct monitorinfo *mi, Entry *e, slap_mask_t restrictops )
        struct berval   *tf = ( ( restrictops & SLAP_RESTRICT_OP_MASK ) == SLAP_RESTRICT_OP_WRITES ) ?
                (struct berval *)&slap_true_bv : (struct berval *)&slap_false_bv;
 
-       return attr_merge_one( e, mi->mi_ad_readOnly, tf, tf );
+       return attr_merge_one( e, mi->mi_ad_readOnly, tf, NULL );
 }
 
 static int
@@ -74,7 +74,7 @@ init_restrictedOperation( struct monitorinfo *mi, Entry *e, slap_mask_t restrict
        for ( i = 0; restricted_ops[ i ].op.bv_val; i++ ) {
                if ( restrictops & restricted_ops[ i ].tag ) {
                        rc = attr_merge_one( e, mi->mi_ad_restrictedOperation,
-                                       &restricted_ops[ i ].op, &restricted_ops[ i ].op );
+                                       &restricted_ops[ i ].op, NULL );
                        if ( rc ) {
                                return rc;
                        }
@@ -84,7 +84,7 @@ init_restrictedOperation( struct monitorinfo *mi, Entry *e, slap_mask_t restrict
        for ( i = 0; restricted_exops[ i ].op.bv_val; i++ ) {
                if ( restrictops & restricted_exops[ i ].tag ) {
                        rc = attr_merge_one( e, mi->mi_ad_restrictedOperation,
-                                       &restricted_exops[ i ].op, &restricted_exops[ i ].op );
+                                       &restricted_exops[ i ].op, NULL );
                        if ( rc ) {
                                return rc;
                        }
@@ -552,7 +552,7 @@ monitor_subsys_database_modify(
 
        if ( !bvmatch( &a->a_vals[0], tf ) ) {
                attr_delete( &e->e_attrs, mi->mi_ad_readOnly );
-               rc = attr_merge_one( e, mi->mi_ad_readOnly, tf, tf );
+               rc = attr_merge_one( e, mi->mi_ad_readOnly, tf, NULL );
        }
 
        if ( rc == LDAP_SUCCESS ) {
@@ -623,14 +623,14 @@ monitor_subsys_database_modify(
                        for ( i = 0; !BER_BVISNULL( &restricted_ops[ i ].op ); i++ ) {
                                if ( rp_add & restricted_ops[ i ].tag ) {
                                        attr_merge_one( e, mi->mi_ad_restrictedOperation,
-                                                       &restricted_ops[ i ].op, &restricted_ops[ i ].op );
+                                                       &restricted_ops[ i ].op, NULL );
                                }
                        }
 
                        for ( i = 0; !BER_BVISNULL( &restricted_exops[ i ].op ); i++ ) {
                                if ( rp_add & restricted_exops[ i ].tag ) {
                                        attr_merge_one( e, mi->mi_ad_restrictedOperation,
-                                                       &restricted_exops[ i ].op, &restricted_exops[ i ].op );
+                                                       &restricted_exops[ i ].op, NULL );
                                }
                        }
                }