- ri->ri_bd = select_backend( &ndn, 0, 1 );
- if ( ri->ri_bd == NULL ) {
- fprintf( stderr, "%s: line %d: "
- "cannot find database "
- "of relay dn \"%s\"\n",
- fname, lineno, argv[ 1 ] );
+ /* The man page says that the "relay" directive
+ * automatically instantiates slapo-rwm; I don't
+ * like this very much any more, I'd prefer to
+ * have automatic instantiation only when "massage"
+ * is specified, so one has better control on
+ * where the overlay gets instantiated, but this
+ * would break compatibility. One can still control
+ * where the overlay is instantiated by moving
+ * around the "relay" directive, although this could
+ * make slapd.conf a bit confusing. */
+ if ( overlay_config( be, "rwm" ) ) {
+ Log2( LDAP_DEBUG_ANY, LDAP_LEVEL_ERR,
+ "%s: line %d: unable to install "
+ "rwm overlay "
+ "in \"relay <dn> [massage]\" line\n",
+ fname, lineno );