summaryrefslogtreecommitdiff
path: root/sbin/isakmpd/isakmpd.c
diff options
context:
space:
mode:
authorChad Loder <cloder@cvs.openbsd.org>2005-04-08 22:32:11 +0000
committerChad Loder <cloder@cvs.openbsd.org>2005-04-08 22:32:11 +0000
commitcb04993a6a5ad3e448426e96a948cdef66528031 (patch)
treef7ef29458cec34b4c4dc5b6aa0a0720a18846ad5 /sbin/isakmpd/isakmpd.c
parentf6e2c42a9faec3e926fc2d60e8cdc93729f7a211 (diff)
Make deterministic randomness (only ever used for testing) a compile-time
option. Reduces chances of somehow setting regrand when it's not supposed to be set. Remove "-r" option from man page. Also xref certpatch(8) while we are in there. And remove some include sysdep.h where it is no longer needed. OK hshoexer
Diffstat (limited to 'sbin/isakmpd/isakmpd.c')
-rw-r--r--sbin/isakmpd/isakmpd.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/sbin/isakmpd/isakmpd.c b/sbin/isakmpd/isakmpd.c
index 3b761076aa9..e2203adaffd 100644
--- a/sbin/isakmpd/isakmpd.c
+++ b/sbin/isakmpd/isakmpd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: isakmpd.c,v 1.83 2005/04/08 19:40:03 deraadt Exp $ */
+/* $OpenBSD: isakmpd.c,v 1.84 2005/04/08 22:32:10 cloder Exp $ */
/* $EOM: isakmpd.c,v 1.54 2000/10/05 09:28:22 niklas Exp $ */
/*
@@ -44,8 +44,6 @@
#include <unistd.h>
#include <fcntl.h>
-#include "sysdep.h"
-
#include "app.h"
#include "conf.h"
#include "connection.h"
@@ -130,7 +128,9 @@ static void
parse_args(int argc, char *argv[])
{
int ch;
+#if defined(INSECURE_RAND)
char *ep;
+#endif
int cls, level;
int do_packetlog = 0;
@@ -202,14 +202,17 @@ parse_args(int argc, char *argv[])
break;
case 'r':
+#if defined(INSECURE_RAND)
seed = strtoul(optarg, &ep, 0);
srandom(seed);
if (*ep != '\0')
log_fatal("parse_args: invalid numeric arg "
"to -r (%s)", optarg);
regrand = 1;
+#else
+ usage();
break;
-
+#endif
case 'R':
report_file = optarg;
break;