Browse Source

Issue 51188 - db2ldif crashes when LDIF file can't be accessed

Bug Description: db2ldif crashes when we set '-a LDIF_PATH' to a place that
can't be accessed by the user (dirsrv by default)

Fix Description: Don't attempt to close DB if we bail after a failed
attempt to open LDIF file.

https://pagure.io/389-ds-base/issue/51188

Reviewed by: mreynolds (Thanks!)
Simon Pichugin 5 years ago
parent
commit
20e24cc03f
1 changed files with 1 additions and 0 deletions
  1. 1 0
      ldap/servers/slapd/back-ldbm/db-bdb/bdb_ldif2db.c

+ 1 - 0
ldap/servers/slapd/back-ldbm/db-bdb/bdb_ldif2db.c

@@ -871,6 +871,7 @@ bdb_db2ldif(Slapi_PBlock *pb)
             slapi_log_err(SLAPI_LOG_ERR, "bdb_db2ldif",
                     "db2ldif: %s: can't open %s: %d (%s) while running as user \"%s\"\n",
                     inst->inst_name, fname, errno, dblayer_strerror(errno), slapdFrontendConfig->localuserinfo->pw_name);
+            we_start_the_backends = 0;
             return_value = -1;
             goto bye;
         }