From f3dba23fbba87203e8a14991813c76e230c50914 Mon Sep 17 00:00:00 2001 From: Pierangelo Masarati Date: Sat, 14 Jan 2006 10:03:11 +0000 Subject: [PATCH] previous commit contradicts man page; see comment in code --- servers/slapd/back-relay/config.c | 29 +++++++++++++++++++---------- 1 file changed, 19 insertions(+), 10 deletions(-) diff --git a/servers/slapd/back-relay/config.c b/servers/slapd/back-relay/config.c index 107051eaea..b8f8583011 100644 --- a/servers/slapd/back-relay/config.c +++ b/servers/slapd/back-relay/config.c @@ -104,6 +104,25 @@ relay_back_db_config( return 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 [massage]\" line\n", + fname, lineno ); + return 1; + } + dn.bv_val = argv[ 1 ]; dn.bv_len = strlen( argv[ 1 ] ); rc = dnPrettyNormal( NULL, &dn, &pdn, &ndn, NULL ); @@ -142,16 +161,6 @@ relay_back_db_config( if ( argc == 3 ) { char *cargv[ 4 ]; - if ( overlay_config( be, "rwm" ) ) { - Log2( LDAP_DEBUG_ANY, LDAP_LEVEL_ERR, - "%s: line %d: unable to install " - "rwm overlay " - "in \"relay [massage]\" line\n", - fname, lineno ); - rc = 1; - goto relay_done; - } - cargv[ 0 ] = "rwm-suffixmassage"; cargv[ 1 ] = be->be_suffix[0].bv_val; cargv[ 2 ] = pdn.bv_val;