diff options
author | Noriko Hosoi <nhosoi@redhat.com> | 2010-07-21 08:58:20 -0700 |
---|---|---|
committer | Noriko Hosoi <nhosoi@redhat.com> | 2010-07-21 08:58:20 -0700 |
commit | 472a2c0f2f21205390ba87c31c498b4419a932ba (patch) | |
tree | 431fabce163de31a0e935bcf6d326a9d8afa2adf | |
parent | e6723421e6dc69408edb2a396eb22da361cff206 (diff) | |
download | ds-472a2c0f2f21205390ba87c31c498b4419a932ba.tar.gz ds-472a2c0f2f21205390ba87c31c498b4419a932ba.tar.xz ds-472a2c0f2f21205390ba87c31c498b4419a932ba.zip |
612771 - RHDS 8.1/389 v1.2.5 accepts 2 identical entries withDirectory_Server_8_2_Candidate_20100721
different DN formats
https://bugzilla.redhat.com/show_bug.cgi?id=612771
Fix Description:
When newly creating an ancestorid index file, instead of
opening the index file with DB_TRUNCATE option, delete
the file then create it.
-rw-r--r-- | ldap/servers/slapd/back-ldbm/ancestorid.c | 3 | ||||
-rw-r--r-- | ldap/servers/slapd/back-ldbm/import.c | 6 |
2 files changed, 7 insertions, 2 deletions
diff --git a/ldap/servers/slapd/back-ldbm/ancestorid.c b/ldap/servers/slapd/back-ldbm/ancestorid.c index 8f641452..59d77223 100644 --- a/ldap/servers/slapd/back-ldbm/ancestorid.c +++ b/ldap/servers/slapd/back-ldbm/ancestorid.c @@ -397,8 +397,7 @@ static int ldbm_ancestorid_new_idl_create_index(backend *be) ai_aid->ai_indexmask |= INDEX_OFFLINE; /* Open the ancestorid index file */ - ret = dblayer_get_index_file(be, ai_aid, &db_aid, - DBOPEN_CREATE|DBOPEN_TRUNCATE); + ret = dblayer_get_index_file(be, ai_aid, &db_aid, DBOPEN_CREATE); if (ret != 0) { ldbm_nasty(sourcefile,13050,ret); goto out; diff --git a/ldap/servers/slapd/back-ldbm/import.c b/ldap/servers/slapd/back-ldbm/import.c index dde03db3..656ceeac 100644 --- a/ldap/servers/slapd/back-ldbm/import.c +++ b/ldap/servers/slapd/back-ldbm/import.c @@ -1344,6 +1344,12 @@ int import_main_offline(void *arg) } /* And the ancestorid index */ + { + /* Creating ancestorid from the scratch; delete the index file first. */ + struct attrinfo *ai = NULL; + ainfo_get(be, "ancestorid", &ai); + dblayer_erase_index_file(be, ai, 0); + } if ((ret = ldbm_ancestorid_create_index(be)) != 0) { import_log_notice(job, "Failed to create ancestorid index"); goto error; |