Log a failed intgetrity check with filename.
authorWerner Koch <wk@gnupg.org>
Mon, 15 Sep 2008 19:36:07 +0000 (19:36 +0000)
committerWerner Koch <wk@gnupg.org>
Mon, 15 Sep 2008 19:36:07 +0000 (19:36 +0000)
src/ChangeLog
src/fips.c

index b902881..43f60b4 100644 (file)
@@ -4,6 +4,7 @@
        (_gcry_initialize_fips_mode, lock_fsm, unlock_fsm)
        (_gcry_fips_signal_error, fips_new_state)
        (_gcry_fips_noreturn) [HAVE_SYSLOG]: Also log via syslog.
+       (check_binary_integrity) [HAVE_SYSLOG]: Log failure.
        * global.h [HAVE_SYSLOG]: Include syslog.h.
        (_gcry_global_is_operational) [HAVE_SYSLOG]: Print warning.
 
index 0f3bdb3..74f206e 100644 (file)
@@ -565,6 +565,12 @@ check_binary_integrity (void)
         }
     }
   reporter ("binary", 0, fname, err? gpg_strerror (err):NULL);
+#ifdef HAVE_SYSLOG
+  if (err)
+    syslog (LOG_USER|LOG_ERR, "Libgcrypt error: "
+            "integrity check on `%s' failed: %s",
+            fname? fname:"[?]", gpg_strerror (err));
+#endif /*HAVE_SYSLOG*/
   gcry_free (fname);
   return !!err;
 #else