aboutsummaryrefslogtreecommitdiff
path: root/configure.ac
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 /configure.ac
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 'configure.ac')
-rw-r--r--configure.ac3
1 files changed, 2 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index bc72017c..fe4e8a5a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -72,7 +72,8 @@ AC_ARG_ENABLE(m32,
AC_HEADER_STDC
AC_SYS_LARGEFILE
AX_PTHREAD
-AC_CHECK_HEADERS([a.out.h])
+AC_CHECK_HEADERS([a.out.h sys/random.h])
+AC_CHECK_FUNCS([arc4random getrandom])
AX_CXX_COMPILE_STDCXX(11, noext, mandatory)