Blame SOURCES/0022-Issue-51188-db2ldif-crashes-when-LDIF-file-can-t-be-.patch

5873fa
From d24381488a997dda0006b603fb2b452b726757c0 Mon Sep 17 00:00:00 2001
5873fa
From: Simon Pichugin <simon.pichugin@gmail.com>
5873fa
Date: Thu, 25 Jun 2020 10:45:16 +0200
5873fa
Subject: [PATCH] Issue 51188 - db2ldif crashes when LDIF file can't be
5873fa
 accessed
5873fa
5873fa
Bug Description: db2ldif crashes when we set '-a LDIF_PATH' to a place that
5873fa
can't be accessed by the user (dirsrv by default)
5873fa
5873fa
Fix Description: Don't attempt to close DB if we bail after a failed
5873fa
attempt to open LDIF file.
5873fa
5873fa
https://pagure.io/389-ds-base/issue/51188
5873fa
5873fa
Reviewed by: mreynolds (Thanks!)
5873fa
---
5873fa
 ldap/servers/slapd/back-ldbm/db-bdb/bdb_ldif2db.c | 1 +
5873fa
 1 file changed, 1 insertion(+)
5873fa
5873fa
diff --git a/ldap/servers/slapd/back-ldbm/db-bdb/bdb_ldif2db.c b/ldap/servers/slapd/back-ldbm/db-bdb/bdb_ldif2db.c
5873fa
index 542147c3d..9ffd877cb 100644
5873fa
--- a/ldap/servers/slapd/back-ldbm/db-bdb/bdb_ldif2db.c
5873fa
+++ b/ldap/servers/slapd/back-ldbm/db-bdb/bdb_ldif2db.c
5873fa
@@ -871,6 +871,7 @@ bdb_db2ldif(Slapi_PBlock *pb)
5873fa
             slapi_log_err(SLAPI_LOG_ERR, "bdb_db2ldif",
5873fa
                     "db2ldif: %s: can't open %s: %d (%s) while running as user \"%s\"\n",
5873fa
                     inst->inst_name, fname, errno, dblayer_strerror(errno), slapdFrontendConfig->localuserinfo->pw_name);
5873fa
+            we_start_the_backends = 0;
5873fa
             return_value = -1;
5873fa
             goto bye;
5873fa
         }
5873fa
-- 
5873fa
2.26.2
5873fa