static struct berval config_rdn = BER_BVC("cn=config");
static struct berval schema_rdn = BER_BVC("cn=schema");
+extern int slap_DN_strict; /* dn.c */
+
#ifdef SLAPD_MODULES
typedef struct modpath_s {
struct modpath_s *mp_next;
if ( readit ) {
void *thrctx = ldap_pvt_thread_pool_context();
+ int prev_DN_strict;
op = (Operation *) &opbuf;
connection_fake_init( &conn, op, thrctx );
cb.sc_private = ≻
op->o_bd = &cfb->cb_db;
+
+ /* Allow unknown attrs in DNs */
+ prev_DN_strict = slap_DN_strict;
+ slap_DN_strict = 0;
+
rc = op->o_bd->be_search( op, &rs );
+ /* Restore normal DN validation */
+ slap_DN_strict = prev_DN_strict;
+
ldap_pvt_thread_pool_context_reset( thrctx );
}
#define AVA_PRIVATE( ava ) ( ( AttributeDescription * )(ava)->la_private )
+int slap_DN_strict = SLAP_AD_NOINSERT;
+
static int
LDAPRDN_validate( LDAPRDN rdn )
{
if ( rc != LDAP_SUCCESS ) {
rc = slap_bv2undef_ad( &ava->la_attr,
&ad, &text,
- SLAP_AD_PROXIED|SLAP_AD_NOINSERT );
+ SLAP_AD_PROXIED|slap_DN_strict );
if ( rc != LDAP_SUCCESS ) {
return LDAP_INVALID_SYNTAX;
}
if ( rc != LDAP_SUCCESS ) {
rc = slap_bv2undef_ad( &ava->la_attr,
&ad, &text,
- SLAP_AD_PROXIED|SLAP_AD_NOINSERT );
+ SLAP_AD_PROXIED|slap_DN_strict );
if ( rc != LDAP_SUCCESS ) {
return LDAP_INVALID_SYNTAX;
}
if ( rc != LDAP_SUCCESS ) {
rc = slap_bv2undef_ad( &ava->la_attr,
&ad, &text,
- SLAP_AD_PROXIED|SLAP_AD_NOINSERT );
+ SLAP_AD_PROXIED|slap_DN_strict );
if ( rc != LDAP_SUCCESS ) {
return LDAP_INVALID_SYNTAX;
}
if ( rc != LDAP_SUCCESS ) {
rc = slap_bv2undef_ad( &ava->la_attr,
&ad, &text,
- SLAP_AD_PROXIED|SLAP_AD_NOINSERT );
+ SLAP_AD_PROXIED|slap_DN_strict );
if ( rc != LDAP_SUCCESS ) {
return LDAP_INVALID_SYNTAX;
}