[Date Prev][Date Next] [Chronological] [Thread] [Top]

Despite modrdn failure, slapd wite out the replog (ITS#2235)



Full_Name: Kaoru Sekiguchi
Version: openldap 2.0.27
OS: linux 2.4
URL: ftp://ftp.openldap.org/incoming/
Submission from: (NULL) (202.221.173.110)


Hi
I have 3 openldap server. They are in master-slave relationship.
My configuration is as follows:

database ldbm
suffix   ""
...

I tried to modify RDN of root dn with ldapmodrdn.

$ldapmodrdn -x o=test1 o=test2
Rename Result: Insufficient access (50)

The ldapmodrdn command was failed for insufficient access, but
the change record was written out in the replication logfile.
In this case, master slapd mustn't write out the replication 
logfile.

The following patch fixes this problem.

--- servers/slapd/back-ldbm/modrdn.c.org	Wed Dec 11 19:49:38 2002
+++ servers/slapd/back-ldbm/modrdn.c	Thu Dec 12 11:05:16 2002
@@ -194,6 +194,7 @@
 		send_ldap_result( conn, op, 
 			LDAP_INSUFFICIENT_ACCESS,
 			NULL, NULL, NULL, NULL );
+		rc = CAN_ROLLBACK;
 		goto return_results;
	}
 
@@ -315,6 +316,7 @@
 			send_ldap_result( conn, op, 
 				LDAP_INSUFFICIENT_ACCESS,
 				NULL, NULL, NULL, NULL );
+			rc = CAN_ROLLBACK;
 			goto return_results;
 		}