Author: nhosoi
Update of /cvs/dirsec/ldapserver/ldap/servers/slapd/back-ldbm
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv12547
Modified Files:
back-ldbm.h dblayer.c upgrade.c
Log Message:
Resolves: #327091
Summary: Migration/Upgrade fails when it's from 6.21 to 8.0 on the same
OS/architecture
Description:
back-ldbm.h: added LDBM_VERSION_62
dblayer.c: fixed a bug to check the instance dir name
upgrade.c: added LDBM_VERSION_62
Index: back-ldbm.h
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/back-ldbm/back-ldbm.h,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- back-ldbm.h 2 Oct 2007 18:39:51 -0000 1.10
+++ back-ldbm.h 16 Oct 2007 17:30:58 -0000 1.11
@@ -157,8 +157,8 @@
#define LDBM_VERSION "Netscape-ldbm/7.0" /* db42: new idl -> old
*/
#define LDBM_VERSION_NEW "Netscape-ldbm/7.0_NEW" /* db42: new idl
*/
#define LDBM_VERSION_OLD "Netscape-ldbm/7.0_CLASSIC" /* db42: old idl
*/
-#define LDBM_VERSION_62 "Netscape-ldbm/6.2" /* db33: new idl */
-#define LDBM_VERSION_61 "Netscape-ldbm/6.1" /* db33: new idl */
+#define LDBM_VERSION_62 "Netscape-ldbm/6.2" /* db42: old idl */
+#define LDBM_VERSION_61 "Netscape-ldbm/6.1" /* db33: old idl */
#define LDBM_VERSION_60 "Netscape-ldbm/6.0" /* db33: old idl */
#define LDBM_VERSION_50 "Netscape-ldbm/5.0"
Index: dblayer.c
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/back-ldbm/dblayer.c,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -r1.23 -r1.24
--- dblayer.c 4 Oct 2007 03:28:19 -0000 1.23
+++ dblayer.c 16 Oct 2007 17:30:58 -0000 1.24
@@ -5848,7 +5848,7 @@
li = inst->inst_li;
priv = (dblayer_private*)li->li_dblayer_private;
inst_dirp = dblayer_get_full_inst_dir(li, inst, inst_dir, MAXPATHLEN);
- if (!inst_dirp || *inst_dirp) {
+ if (NULL == inst_dirp || '\0' == *inst_dirp) {
LDAPDebug(LDAP_DEBUG_ANY,
"update_db_ext: instance dir is NULL\n", 0, 0, 0);
return -1; /* non zero */
Index: upgrade.c
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/back-ldbm/upgrade.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- upgrade.c 15 Mar 2007 21:34:32 -0000 1.7
+++ upgrade.c 16 Oct 2007 17:30:58 -0000 1.8
@@ -58,7 +58,8 @@
{BDB_IMPL, 0, 0, DBVERSION_NEW_IDL, DBVERSION_NO_UPGRADE},
{LDBM_VERSION, 4, 2, DBVERSION_NEW_IDL, DBVERSION_NO_UPGRADE},
{LDBM_VERSION_OLD, 4, 2, DBVERSION_OLD_IDL, DBVERSION_NO_UPGRADE},
- {LDBM_VERSION_61, 3, 3, DBVERSION_NEW_IDL, DBVERSION_UPGRADE_3_4},
+ {LDBM_VERSION_62, 4, 2, DBVERSION_OLD_IDL, DBVERSION_NO_UPGRADE},
+ {LDBM_VERSION_61, 3, 3, DBVERSION_OLD_IDL, DBVERSION_UPGRADE_3_4},
{LDBM_VERSION_60, 3, 3, DBVERSION_OLD_IDL, DBVERSION_UPGRADE_3_4},
{NULL,0,0}
};
@@ -274,8 +275,7 @@
li->li_flags |= LI_FORCE_MOD_CONFIG;
if ((0 == PL_strncasecmp(ldbmversion, BDB_IMPL, strlen(BDB_IMPL))) ||
- (0 == PL_strcmp(ldbmversion, LDBM_VERSION)) ||
- (0 == PL_strcmp(ldbmversion, LDBM_VERSION_61))) /* db: new idl */
+ (0 == PL_strcmp(ldbmversion, LDBM_VERSION))) /* db: new idl */
{
if (!idl_get_idl_new()) /* config: old idl */
{
@@ -288,6 +288,8 @@
}
}
else if ((0 == strcmp(ldbmversion, LDBM_VERSION_OLD)) ||
+ (0 == PL_strcmp(ldbmversion, LDBM_VERSION_61)) ||
+ (0 == PL_strcmp(ldbmversion, LDBM_VERSION_62)) ||
(0 == strcmp(ldbmversion, LDBM_VERSION_60))) /* db: old */
{
if (idl_get_idl_new()) /* config: new */