[Fedora-directory-commits] ldapserver/ldap/servers/slapd uuid.c, 1.7, 1.8

Richard Allen Megginson (rmeggins) fedora-directory-commits at redhat.com
Thu Sep 20 20:27:37 UTC 2007


Author: rmeggins

Update of /cvs/dirsec/ldapserver/ldap/servers/slapd
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv5955/ldapserver/ldap/servers/slapd

Modified Files:
	uuid.c 
Log Message:
Resolves: bug 262021
Bug Description: Migration script does not migrate nsDS5ReplicaCredentials correctly.
Reviewed by: nhosoi (Thanks!)
Fix Description: We still need to be able to decrypt passwords using the broken method.  I guess it works on Solaris and HP because the values are already in network byte order.  But when the values were encrypted on x86, they were encrypted the wrong way.  It is safe to use MIGRATE_BROKEN_PWD on Solaris and HP because it is essentially a no-op.  But this allows us to decrypt x86 passwords and store them correctly.
Platforms tested: RHEL4 i386, RHEL5 x86_64
Flag Day: no
Doc impact: no
QA impact: should be covered by regular nightly and manual testing
New Tests integrated into TET: none



Index: uuid.c
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/uuid.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- uuid.c	30 Aug 2007 00:18:10 -0000	1.7
+++ uuid.c	20 Sep 2007 20:27:35 -0000	1.8
@@ -856,10 +856,14 @@
 
 	memcpy(uuid, hash, sizeof(guid_t));
 
-	/* convert UUID to local byte order */
-	uuid->time_low = PR_ntohl(uuid->time_low);
-	uuid->time_mid = PR_ntohs(uuid->time_mid);
-	uuid->time_hi_and_version = PR_ntohs(uuid->time_hi_and_version);
+	/* when migrating, we skip the ntohl in order to read in old, 
+	   incorrectly formatted uuids */
+	if (!getenv("USE_BROKEN_UUID")) {
+		/* convert UUID to local byte order */
+		uuid->time_low = PR_ntohl(uuid->time_low);
+		uuid->time_mid = PR_ntohs(uuid->time_mid);
+		uuid->time_hi_and_version = PR_ntohs(uuid->time_hi_and_version);
+	}
 
 	/* put in the variant and version bits */
 	uuid->time_hi_and_version &= 0x0FFF;




More information about the Fedora-directory-commits mailing list