[Pkg-openldap-devel] [openldap] 254/281: ITS#8150 let check_name_index handle frontend

Ryan Tandy rtandy-guest at moszumanska.debian.org
Thu Jul 9 01:43:06 UTC 2015


This is an automated email from the git hooks/post-receive script.

rtandy-guest pushed a commit to branch master
in repository openldap.

commit 39b05c79004335e50bb328e49700d7cd5433df7f
Author: Ryan Tandy <ryan at nardis.ca>
Date:   Wed May 20 14:39:08 2015 -0700

    ITS#8150 let check_name_index handle frontend
    
    The fix for ITS#7016 only adjusted the frontend entry's DN, but not the
    naming attribute in the entry. check_name_index knows how to do both.
---
 servers/slapd/bconfig.c | 18 +-----------------
 1 file changed, 1 insertion(+), 17 deletions(-)

diff --git a/servers/slapd/bconfig.c b/servers/slapd/bconfig.c
index aa74b89..4e796cc 100644
--- a/servers/slapd/bconfig.c
+++ b/servers/slapd/bconfig.c
@@ -4679,7 +4679,7 @@ check_name_index( CfEntryInfo *parent, ConfigType ce_type, Entry *e,
 	if ( ce_type == Cft_Database )
 		nsibs--;
 
-	if ( index != nsibs ) {
+	if ( index != nsibs || isfrontend ) {
 		if ( gotindex ) {
 			if ( index < nsibs ) {
 				if ( tailindex ) return LDAP_NAMING_VIOLATION;
@@ -7220,22 +7220,6 @@ config_tool_entry_put( BackendDB *be, Entry *e, struct berval *text )
 					return NOID;
 				}
 			} else {
-				if ( !strncmp( e->e_nname.bv_val + 
-					STRLENOF( "olcDatabase" ), "=frontend",
-					STRLENOF( "=frontend" ) ) )
-				{
-					struct berval rdn, pdn, ndn;
-					dnParent( &e->e_nname, &pdn );
-					rdn.bv_val = ca.log;
-					rdn.bv_len = snprintf(rdn.bv_val, sizeof( ca.log ),
-						"%s=" SLAP_X_ORDERED_FMT "%s",
-						cfAd_database->ad_cname.bv_val, -1,
-						frontendDB->bd_info->bi_type );
-					build_new_dn( &ndn, &pdn, &rdn, NULL );
-					ber_memfree( e->e_name.bv_val );
-					e->e_name = ndn;
-					ber_bvreplace( &e->e_nname, &e->e_name );
-				}
 				entry_put_got_frontend++;
 				isFrontend = 1;
 			}

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-openldap/openldap.git



More information about the Pkg-openldap-devel mailing list