]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/overlays/rwmconf.c
Use "pcache" to invoke the overlay instead of "proxycache"
[openldap] / servers / slapd / overlays / rwmconf.c
index ba20bc35a7282f64c7444a3becb1227bd691d629..32212d6c6dda5af33f082e3aba9705efd98f4883 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;
 
@@ -208,7 +217,7 @@ rwm_map_config(
                        || avl_find( map->remap, (caddr_t)&mapping[1], rwm_mapping_cmp ) != NULL)
        {
                fprintf( stderr,
-                       "%s: line %d: duplicate mapping found (ignored)\n",
+                       "%s: line %d: duplicate mapping found" SLAPD_CONF_UNKNOWN_IGNORED ".\n",
                        fname, lineno );
                /* FIXME: free stuff */
                goto error_return;