"obfuscation" scheme to work (words fail me), but we can use arc4random
for the in game fun. from theo buehler
-/* $OpenBSD: init.c,v 1.12 2014/12/08 21:56:27 deraadt Exp $ */
+/* $OpenBSD: init.c,v 1.13 2014/12/31 15:45:57 tedu Exp $ */
/* $NetBSD: init.c,v 1.4 1996/05/21 21:53:05 mrg Exp $ */
/*-
void
init(void) /* everything for 1st time run */
{
+ /*
+ * We need deterministic randomness for the obfuscation schemes
+ * in io.c and setup.c.
+ */
+ srandom_deterministic(1);
rdata(); /* read data from orig. file */
linkdata();
poof();
-/* $OpenBSD: setup.c,v 1.11 2014/12/08 21:56:27 deraadt Exp $ */
+/* $OpenBSD: setup.c,v 1.12 2014/12/31 15:45:57 tedu Exp $ */
/* $NetBSD: setup.c,v 1.2 1995/03/21 12:05:10 cgd Exp $ */
/*-
count = 0;
linestart = YES;
+ srandom_deterministic(1);
+
while ((c = getc(infile)) != EOF) {
if (count++ % LINE == 0)
printf("\n\t");
-/* $OpenBSD: wizard.c,v 1.16 2014/11/16 04:49:48 guenther Exp $ */
+/* $OpenBSD: wizard.c,v 1.17 2014/12/31 15:45:57 tedu Exp $ */
/* $NetBSD: wizard.c,v 1.3 1995/04/24 12:21:41 cgd Exp $ */
/*-
int
ran(int range)
{
- long i;
-
- i = random() % range;
- return (i);
+ return (arc4random_uniform(range));
}