*/
op->o_bd = select_backend( &op->o_req_ndn, manageDSAit, 0 );
if ( op->o_bd == NULL ) {
- rs->sr_ref = referral_rewrite( default_referral,
+ rs->sr_ref = referral_rewrite( SLAPD_GLOBAL(default_referral),
NULL, &op->o_req_dn, LDAP_SCOPE_DEFAULT );
- if (!rs->sr_ref) rs->sr_ref = default_referral;
+ if (!rs->sr_ref) rs->sr_ref = SLAPD_GLOBAL(default_referral);
if (rs->sr_ref != NULL ) {
rs->sr_err = LDAP_REFERRAL;
send_ldap_result( op, rs );
- if (rs->sr_ref != default_referral) ber_bvarray_free( rs->sr_ref );
+ if (rs->sr_ref != SLAPD_GLOBAL(default_referral)) ber_bvarray_free( rs->sr_ref );
} else {
send_ldap_error( op, rs, LDAP_UNWILLING_TO_PERFORM,
"no global superior knowledge" );
/* send a referral */
} else {
BerVarray defref = op->o_bd->be_update_refs
- ? op->o_bd->be_update_refs : default_referral;
+ ? op->o_bd->be_update_refs : SLAPD_GLOBAL(default_referral);
if ( defref != NULL ) {
rs->sr_ref = referral_rewrite( defref,
NULL, &op->o_req_dn,
#ifdef HAVE_GMTIME_R
ltm = gmtime_r( &now, <m_buf );
#else
- ldap_pvt_thread_mutex_lock( &gmtime_mutex );
+ ldap_pvt_thread_mutex_lock( &SLAPD_GLOBAL(gmtime_mutex) );
ltm = gmtime( &now );
#endif /* HAVE_GMTIME_R */
lutil_gentime( timebuf, sizeof(timebuf), ltm );
slap_get_csn( op, csnbuf, sizeof(csnbuf), &csn, manage_ctxcsn );
#ifndef HAVE_GMTIME_R
- ldap_pvt_thread_mutex_unlock( &gmtime_mutex );
+ ldap_pvt_thread_mutex_unlock( &SLAPD_GLOBAL(gmtime_mutex) );
#endif
timestamp.bv_val = timebuf;
if( op->o_tag == LDAP_REQ_ADD ) {
struct berval tmpval;
- if( global_schemacheck ) {
+ if( SLAPD_GLOBAL(schemachecking) ) {
int rc = mods_structural_class( mods, &tmpval,
text, textbuf, textlen );
if( rc != LDAP_SUCCESS ) return rc;