aboutsummaryrefslogtreecommitdiff
path: root/src/config.h.in
diff options
context:
space:
mode:
authorGabriele Svelto <gsvelto@mozilla.com>2017-04-11 11:51:28 +0200
committerMike Frysinger <vapier@chromium.org>2017-04-12 18:51:24 +0000
commita9fca58305afcb16a7ae539d87d672c702aba3f1 (patch)
tree06ef59d420b0168a301e27a56dd2bc8e7702a432 /src/config.h.in
parentDump MH_DYLINKER images in upload_system_symbols. (diff)
downloadbreakpad-a9fca58305afcb16a7ae539d87d672c702aba3f1.tar.xz
Make minidump name generation on Linux as random as possible
This patch ensures that two crashes taken within the same second have different minidump names. The random characters used in the minidump filename are now read from /dev/urandom where possible or generated via arc4random(). If neither is available we fall back to regular rand() but mixing the address of an object to the current time when generating the random seed to make it slightly less predictable. BUG=681 Change-Id: I2e97454859ed386e199b2628d6b7e87e16481b75 Reviewed-on: https://chromium-review.googlesource.com/445784 Reviewed-by: Mike Frysinger <vapier@chromium.org>
Diffstat (limited to 'src/config.h.in')
-rw-r--r--src/config.h.in9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/config.h.in b/src/config.h.in
index ee6a67ad..a436d6ba 100644
--- a/src/config.h.in
+++ b/src/config.h.in
@@ -1,11 +1,17 @@
/* src/config.h.in. Generated from configure.ac by autoheader. */
+/* Define to 1 if you have the `arc4random' function. */
+#undef HAVE_ARC4RANDOM
+
/* Define to 1 if you have the <a.out.h> header file. */
#undef HAVE_A_OUT_H
/* define if the compiler supports basic C++11 syntax */
#undef HAVE_CXX11
+/* Define to 1 if you have the `getrandom' function. */
+#undef HAVE_GETRANDOM
+
/* Define to 1 if you have the <inttypes.h> header file. */
#undef HAVE_INTTYPES_H
@@ -27,6 +33,9 @@
/* Define to 1 if you have the <string.h> header file. */
#undef HAVE_STRING_H
+/* Define to 1 if you have the <sys/random.h> header file. */
+#undef HAVE_SYS_RANDOM_H
+
/* Define to 1 if you have the <sys/stat.h> header file. */
#undef HAVE_SYS_STAT_H