]> sourceware.org Git - systemtap.git/commitdiff
PR32064: SEC_ERROR_BAD_DATABASE during very first stap-server start
authorMartin Cermak <mcermak@redhat.com>
Fri, 9 Aug 2024 09:26:57 +0000 (11:26 +0200)
committerMartin Cermak <mcermak@redhat.com>
Fri, 9 Aug 2024 09:26:57 +0000 (11:26 +0200)
nsscommon.cxx

index f5f9e18f285cc3e0bbe50a0450b69b454d4bfaee..272e60a980bd23d2ca3fbaf2c094626220bc0b81 100644 (file)
@@ -842,6 +842,13 @@ add_client_cert (const string &inFileName, const string &db_path, db_init_types
       // first has already called nssInit; we don't want to call nssInit twice
       // See if the database already exists and can be initialized.
       SECStatus secStatus = SECFailure;
+      // Make sure certificate database directory exists.
+      if (create_client_cert_db (db_path.c_str ()) != 0)
+        {
+          nsscommon_error (_F("Could not make sure the certificate database directory %s exists",
+              db_path.c_str ()));
+          return SECFailure;
+        }
       if (db_init_type == db_nssinitcontext)
         {
           context= nssInitContext (db_path.c_str (), 1/*readwrite*/, 0/*issueMessage*/);
This page took 0.029471 seconds and 5 git commands to generate.