]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/overlays/rwmconf.c
Mroe abandon checks for ITS#3671
[openldap] / servers / slapd / overlays / rwmconf.c
index ba20bc35a7282f64c7444a3becb1227bd691d629..ed3121fede40c91da2a28b3cb70fbb4fc253498c 100644 (file)
@@ -2,7 +2,7 @@
 /* $OpenLDAP$ */
 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
  *
- * Copyright 1999-2004 The OpenLDAP Foundation.
+ * Copyright 1999-2005 The OpenLDAP Foundation.
  * Portions Copyright 1999-2003 Howard Chu.
  * Portions Copyright 2000-2003 Pierangelo Masarati.
  * All rights reserved.
@@ -142,10 +142,19 @@ rwm_map_config(
        "is not defined in schema\n",
                                fname, lineno, dst );
 
+                       mapping[0].m_dst_oc = oc_bvfind_undef( &mapping[0].m_dst );
+                       if ( mapping[0].m_dst_oc == NULL ) {
+                               fprintf( stderr, "%s: line %d: unable to mimic destination objectClass '%s'\n",
+                                       fname, lineno, dst );
+                               return 1;
+                       }
+
+#if 0
                        mapping[0].m_dst_oc = ch_malloc( sizeof( ObjectClass ) );
                        memset( mapping[0].m_dst_oc, 0, sizeof( ObjectClass ) );
                        mapping[0].m_dst_oc->soc_cname = mapping[0].m_dst;
                        mapping[0].m_flags |= RWMMAP_F_FREE_DST;
+#endif
                }
                mapping[1].m_src_oc = mapping[0].m_dst_oc;