|
|
dc8c34 |
From b3da135239f66128d43c4bec284936771a5cbdfe Mon Sep 17 00:00:00 2001
|
|
|
dc8c34 |
From: Mark Reynolds <mreynolds@redhat.com>
|
|
|
dc8c34 |
Date: Mon, 19 Dec 2016 12:26:59 -0500
|
|
|
dc8c34 |
Subject: [PATCH 417/425] Ticket 49071 - Import with duplicate DNs throws
|
|
|
dc8c34 |
unexpected errors
|
|
|
dc8c34 |
|
|
|
dc8c34 |
Bug Description: When an import fails there are unable to flush error
|
|
|
dc8c34 |
messages.
|
|
|
dc8c34 |
|
|
|
dc8c34 |
Fix Description: When an import fails close the database files before
|
|
|
dc8c34 |
deleting them.
|
|
|
dc8c34 |
|
|
|
dc8c34 |
Also fixed a small issue in DSUtil where we did not properly
|
|
|
dc8c34 |
check if an entry was valid.
|
|
|
dc8c34 |
|
|
|
dc8c34 |
https://fedorahosted.org/389/ticket/49071
|
|
|
dc8c34 |
|
|
|
dc8c34 |
Reviewed by: mreynolds(one line commit rule)
|
|
|
dc8c34 |
|
|
|
dc8c34 |
(cherry picked from commit 64b1ebffe5af118965bcdf3a84d62c0fc3efd196)
|
|
|
dc8c34 |
(cherry picked from commit d2f46f5af86faa9f50b85eea8dea2df563501f28)
|
|
|
dc8c34 |
(cherry picked from commit 934c5608472788825289219f19380ed218f8c5a6)
|
|
|
dc8c34 |
---
|
|
|
dc8c34 |
ldap/servers/slapd/back-ldbm/import.c | 2 +-
|
|
|
dc8c34 |
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
dc8c34 |
|
|
|
dc8c34 |
diff --git a/ldap/servers/slapd/back-ldbm/import.c b/ldap/servers/slapd/back-ldbm/import.c
|
|
|
dc8c34 |
index 81c3c15..bf70cf3 100644
|
|
|
dc8c34 |
--- a/ldap/servers/slapd/back-ldbm/import.c
|
|
|
dc8c34 |
+++ b/ldap/servers/slapd/back-ldbm/import.c
|
|
|
dc8c34 |
@@ -1427,11 +1427,11 @@ error:
|
|
|
dc8c34 |
}
|
|
|
dc8c34 |
}
|
|
|
dc8c34 |
if (0 != ret) {
|
|
|
dc8c34 |
+ dblayer_instance_close(job->inst->inst_be);
|
|
|
dc8c34 |
if (!(job->flags & FLAG_DRYRUN)) { /* If not dryrun */
|
|
|
dc8c34 |
/* if running in the dry run mode, don't touch the db */
|
|
|
dc8c34 |
dblayer_delete_instance_dir(be);
|
|
|
dc8c34 |
}
|
|
|
dc8c34 |
- dblayer_instance_close(job->inst->inst_be);
|
|
|
dc8c34 |
} else {
|
|
|
dc8c34 |
if (0 != (ret = dblayer_instance_close(job->inst->inst_be)) ) {
|
|
|
dc8c34 |
import_log_notice(job, "Failed to close database");
|
|
|
dc8c34 |
--
|
|
|
dc8c34 |
2.9.3
|
|
|
dc8c34 |
|