diff --git a/usr.sbin/keyserv/Makefile b/usr.sbin/keyserv/Makefile index 42d86b27c29c..367919271ee8 100644 --- a/usr.sbin/keyserv/Makefile +++ b/usr.sbin/keyserv/Makefile @@ -4,7 +4,7 @@ PROG= keyserv MAN= keyserv.8 SRCS= keyserv.c setkey.c crypt_svc.c crypt_server.c crypt.h -CFLAGS+= -DKEYSERV_RANDOM -DBROKEN_DES -I. +CFLAGS+= -DBROKEN_DES -I. LIBADD= mp rpcsvc diff --git a/usr.sbin/keyserv/keyserv.c b/usr.sbin/keyserv/keyserv.c index 8acbaf699d9c..051521636ce7 100644 --- a/usr.sbin/keyserv/keyserv.c +++ b/usr.sbin/keyserv/keyserv.c @@ -224,38 +224,8 @@ static void randomize(master) des_block *master; { -#ifndef __FreeBSD__ - int i; - int seed; - struct timeval tv; - int shift; - - seed = 0; - for (i = 0; i < 1024; i++) { - (void)gettimeofday(&tv, NULL); - shift = i % 8 * sizeof (int); - seed ^= (tv.tv_usec << shift) | (tv.tv_usec >> (32 - shift)); - } -#endif -#ifdef KEYSERV_RANDOM -#ifdef __FreeBSD__ master->key.low = arc4random(); master->key.high = arc4random(); -#else - srandom(seed); - master->key.low = random(); - master->key.high = random(); -#endif -#else - /* use stupid dangerous bad rand() */ -#ifdef __FreeBSD__ - sranddev(); -#else - srand(seed); -#endif - master->key.low = rand(); - master->key.high = rand(); -#endif } /*