diff options
Diffstat (limited to 'configure.in')
-rw-r--r-- | configure.in | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/configure.in b/configure.in index f217e5ae9..798e327be 100644 --- a/configure.in +++ b/configure.in | |||
@@ -1043,7 +1043,7 @@ AC_CHECK_FILE("/dev/ptc", | |||
1043 | 1043 | ||
1044 | # Check for user-specified random device, otherwise check /dev/urandom | 1044 | # Check for user-specified random device, otherwise check /dev/urandom |
1045 | AC_ARG_WITH(random, | 1045 | AC_ARG_WITH(random, |
1046 | [ --with-random=FILE read randomness from FILE (default=/dev/urandom)], | 1046 | [ --with-random=FILE read entropy from FILE (default=/dev/urandom)], |
1047 | [ | 1047 | [ |
1048 | if test "x$withval" != "xno" ; then | 1048 | if test "x$withval" != "xno" ; then |
1049 | RANDOM_POOL="$withval"; | 1049 | RANDOM_POOL="$withval"; |
@@ -1064,15 +1064,31 @@ AC_ARG_WITH(random, | |||
1064 | 1064 | ||
1065 | # Check for EGD pool file | 1065 | # Check for EGD pool file |
1066 | AC_ARG_WITH(egd-pool, | 1066 | AC_ARG_WITH(egd-pool, |
1067 | [ --with-egd-pool=FILE read randomness from EGD pool FILE (default none)], | 1067 | [ --with-egd-pool=FILE read entropy from PRNGD/EGD socket FILE (default=/var/run/egd-pool)], |
1068 | [ | 1068 | [ |
1069 | if test "x$withval" != "xno" ; then | 1069 | if test "x$withval" != "xno" ; then |
1070 | EGD_SOCKET="$withval"; | 1070 | EGD_SOCKET="$withval"; |
1071 | AC_DEFINE_UNQUOTED(EGD_SOCKET, "$EGD_SOCKET") | 1071 | AC_DEFINE_UNQUOTED(EGD_SOCKET, "$EGD_SOCKET") |
1072 | fi | 1072 | fi |
1073 | ], | ||
1074 | [ | ||
1075 | # Check for existing socket only if we don't have a random device already | ||
1076 | if test -z "$RANDOM_POOL" ; then | ||
1077 | AC_MSG_CHECKING(for PRNGD/EGD socket) | ||
1078 | # Insert other locations here | ||
1079 | for egdsock in /var/run/egd-pool /etc/entropy ; do | ||
1080 | if test -S $egdsock ; then | ||
1081 | EGD_SOCKET="$egdsock" | ||
1082 | AC_DEFINE_UNQUOTED(EGD_SOCKET, "$EGD_SOCKET") | ||
1083 | AC_MSG_RESULT($egdsock) | ||
1084 | break; | ||
1085 | fi | ||
1086 | done | ||
1087 | fi | ||
1073 | ] | 1088 | ] |
1074 | ) | 1089 | ) |
1075 | 1090 | ||
1091 | |||
1076 | # detect pathnames for entropy gathering commands, if we need them | 1092 | # detect pathnames for entropy gathering commands, if we need them |
1077 | INSTALL_SSH_PRNG_CMDS="" | 1093 | INSTALL_SSH_PRNG_CMDS="" |
1078 | rm -f prng_commands | 1094 | rm -f prng_commands |
@@ -1629,7 +1645,7 @@ if test ! -z "$RANDOM_POOL" ; then | |||
1629 | RAND_MSG="Device ($RANDOM_POOL)" | 1645 | RAND_MSG="Device ($RANDOM_POOL)" |
1630 | else | 1646 | else |
1631 | if test ! -z "$EGD_SOCKET" ; then | 1647 | if test ! -z "$EGD_SOCKET" ; then |
1632 | RAND_MSG="EGD ($EGD_SOCKET)" | 1648 | RAND_MSG="EGD/PRNGD ($EGD_SOCKET)" |
1633 | else | 1649 | else |
1634 | RAND_MSG="Builtin (timeout $entropy_timeout)" | 1650 | RAND_MSG="Builtin (timeout $entropy_timeout)" |
1635 | BUILTIN_RNG=1 | 1651 | BUILTIN_RNG=1 |