zrhoffman / rpms / 389-ds-base

Forked from rpms/389-ds-base 3 years ago
Clone

Blame SOURCES/0060-Ticket-49334-fix-backup-restore-if-changelog-exists.patch

1c155e
From c903f66194f04e97fc684f5a9654cedb27530931 Mon Sep 17 00:00:00 2001
1c155e
From: Ludwig Krispenz <lkrispen@redhat.com>
1c155e
Date: Mon, 31 Jul 2017 10:51:08 +0200
1c155e
Subject: [PATCH 1/3] Ticket 49334 - fix backup restore if changelog exists
1c155e
1c155e
The corrcect flag to copy a directory in backup/restore must be passed for the changelog directory
1c155e
1c155e
Reviewed by: William, thanks
1c155e
---
1c155e
 ldap/servers/slapd/back-ldbm/dblayer.c | 4 ++--
1c155e
 1 file changed, 2 insertions(+), 2 deletions(-)
1c155e
1c155e
diff --git a/ldap/servers/slapd/back-ldbm/dblayer.c b/ldap/servers/slapd/back-ldbm/dblayer.c
1c155e
index ff97aa4..3a97f2f 100644
1c155e
--- a/ldap/servers/slapd/back-ldbm/dblayer.c
1c155e
+++ b/ldap/servers/slapd/back-ldbm/dblayer.c
1c155e
@@ -6143,7 +6143,7 @@ dblayer_backup(struct ldbminfo *li, char *dest_dir, Slapi_Task *task)
1c155e
             return_value = dblayer_copy_directory(li, task, changelogdir,
1c155e
                                                   changelog_destdir,
1c155e
                                                   0 /* backup */,
1c155e
-                                                  &cnt, 1, 0, 0);
1c155e
+                                                  &cnt, 0, 0, 1);
1c155e
             if (return_value) {
1c155e
                 slapi_log_err(SLAPI_LOG_ERR,
1c155e
                           "dblayer_backup", "Error in copying directory "
1c155e
@@ -6823,7 +6823,7 @@ int dblayer_restore(struct ldbminfo *li, char *src_dir, Slapi_Task *task, char *
1c155e
                     *cldirname = '\0';
1c155e
                     return_value = dblayer_copy_directory(li, task, filename1,
1c155e
                                                           changelogdir, 1 /* restore */,
1c155e
-                                                          &cnt, 1, 0 ,0);
1c155e
+                                                          &cnt, 0, 0 ,1);
1c155e
                     *cldirname = '/';
1c155e
                     if (return_value) {
1c155e
                         slapi_log_err(SLAPI_LOG_ERR,
1c155e
-- 
1c155e
2.9.4
1c155e