From 22c51491482a98effcc4aac1a9212f7bef59648b Mon Sep 17 00:00:00 2001 From: Simon Pichugin Date: Jul 20 2020 18:11:58 +0000 Subject: Issue 51059 - If dbhome directory is set online backup fails Bug Description: If the dbhome directory is set, eg to /dev/shm/instance then an online backup fails because it looks for the log.000000x file in the wring diretcory. This is hidden because the return code is overwritten before checking. Fix Description: If dblayer_backup function fails - go to error processing section. https://pagure.io/389-ds-base/issue/51059 Reviewed by: mreynolds (Thanks!) --- diff --git a/ldap/servers/slapd/back-ldbm/archive.c b/ldap/servers/slapd/back-ldbm/archive.c index 4eb0eb5..6047e78 100644 --- a/ldap/servers/slapd/back-ldbm/archive.c +++ b/ldap/servers/slapd/back-ldbm/archive.c @@ -427,6 +427,11 @@ ldbm_back_ldbm2archive(Slapi_PBlock *pb) /* tell it to archive */ return_value = dblayer_backup(li, directory, task); + if (return_value) { + slapi_log_err(SLAPI_LOG_BACKLDBM, + "ldbm_back_ldbm2archive", "dblayer_backup failed (%d).\n", return_value); + goto err; + } return_value = plugin_call_plugins(pb, SLAPI_PLUGIN_BE_POST_BACKUP_FN); if (return_value) {