} else {
BER_BVSTR( &bv, "0" );
}
- attr_merge_one( e, mi->mi_ad_monitorCounter, &bv, &bv );
+ attr_merge_one( e, mi->mi_ad_monitorCounter, &bv, NULL );
mp = monitor_entrypriv_create();
if ( mp == NULL ) {
}
BER_BVSTR( &bv, "-1" );
- attr_merge_one( e, mi->mi_ad_monitorCounter, &bv, &bv );
+ attr_merge_one( e, mi->mi_ad_monitorCounter, &bv, NULL );
mp = monitor_entrypriv_create();
if ( mp == NULL ) {
}
BER_BVSTR( &bv, "0" );
- attr_merge_one( e, mi->mi_ad_monitorCounter, &bv, &bv );
+ attr_merge_one( e, mi->mi_ad_monitorCounter, &bv, NULL );
mp = monitor_entrypriv_create();
if ( mp == NULL ) {
attr_merge_one( e, mi->mi_ad_monitorConnectionNumber, &bv, NULL );
bv.bv_len = snprintf( buf, sizeof( buf ), "%ld", (long) c->c_protocol );
- attr_merge_one( e, mi->mi_ad_monitorConnectionProtocol, &bv, NULL );
+ attr_merge_normalize_one( e, mi->mi_ad_monitorConnectionProtocol, &bv, NULL );
bv.bv_len = snprintf( buf, sizeof( buf ), "%ld", c->c_n_ops_received );
attr_merge_one( e, mi->mi_ad_monitorConnectionOpsReceived, &bv, NULL );
LDAP_STAILQ_EMPTY( &c->c_pending_ops ) ? "" : "p",
connection_state2str( c->c_conn_state ),
c->c_sasl_bind_in_progress ? "S" : "" );
- attr_merge_one( e, mi->mi_ad_monitorConnectionMask, &bv, NULL );
+ attr_merge_normalize_one( e, mi->mi_ad_monitorConnectionMask, &bv, NULL );
attr_merge_one( e, mi->mi_ad_monitorConnectionAuthzDN,
&c->c_dn, &c->c_ndn );
/* NOTE: client connections leave the c_peer_* fields NULL */
assert( !BER_BVISNULL( &c->c_listener_url ) );
- attr_merge_one( e, mi->mi_ad_monitorConnectionListener,
+ attr_merge_normalize_one( e, mi->mi_ad_monitorConnectionListener,
&c->c_listener_url, NULL );
- attr_merge_one( e, mi->mi_ad_monitorConnectionPeerDomain,
+ attr_merge_normalize_one( e, mi->mi_ad_monitorConnectionPeerDomain,
BER_BVISNULL( &c->c_peer_domain ) ? &bv_unknown : &c->c_peer_domain,
NULL );
- attr_merge_one( e, mi->mi_ad_monitorConnectionPeerAddress,
+ attr_merge_normalize_one( e, mi->mi_ad_monitorConnectionPeerAddress,
BER_BVISNULL( &c->c_peer_name ) ? &bv_unknown : &c->c_peer_name,
NULL );
assert( !BER_BVISNULL( &c->c_sock_name ) );
- attr_merge_one( e, mi->mi_ad_monitorConnectionLocalAddress,
+ attr_merge_normalize_one( e, mi->mi_ad_monitorConnectionLocalAddress,
&c->c_sock_name, NULL );
- attr_merge_one( e, mi->mi_ad_monitorConnectionStartTime, &bv2, NULL );
+ attr_merge_normalize_one( e, mi->mi_ad_monitorConnectionStartTime, &bv2, NULL );
- attr_merge_one( e, mi->mi_ad_monitorConnectionActivityTime, &bv3, NULL );
+ attr_merge_normalize_one( e, mi->mi_ad_monitorConnectionActivityTime, &bv3, NULL );
mp = monitor_entrypriv_create();
if ( mp == NULL ) {
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
rdnval, 0, 0 );
} else {
attr_merge( e, slap_schema.si_ad_namingContexts,
- be->be_suffix, be->be_nsuffix );
+ be->be_suffix, NULL );
attr_merge( e_database, slap_schema.si_ad_namingContexts,
- be->be_suffix, be->be_nsuffix );
+ be->be_suffix, NULL );
}
}
} else {
attr_merge( e_overlay, slap_schema.si_ad_namingContexts,
- be->be_suffix, be->be_nsuffix );
+ be->be_suffix, NULL );
}
mp_overlay = monitor_entrypriv_create();
if ( a ) {
int j, k;
- for ( j = 0; !BER_BVISNULL( &a->a_nvals[ j ] ); j++ ) {
- for ( k = 0; !BER_BVISNULL( &be->be_nsuffix[ k ] ); k++ ) {
- if ( dn_match( &a->a_nvals[ j ], &be->be_nsuffix[ k ] ) ) {
+ /* FIXME: RFC 4512 defines namingContexts without an
+ * equality matching rule, making comparisons
+ * like this one tricky. We use a_vals and
+ * be_suffix instead for now.
+ */
+ for ( j = 0; !BER_BVISNULL( &a->a_vals[ j ] ); j++ ) {
+ for ( k = 0; !BER_BVISNULL( &be->be_suffix[ k ] ); k++ ) {
+ if ( dn_match( &a->a_vals[ j ],
+ &be->be_suffix[ k ] ) ) {
rc = 0;
goto done;
}