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

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