Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/libexec/identd use arc4random



details:   https://anonhg.NetBSD.org/src/rev/758d197ae49a
branches:  trunk
changeset: 551404:758d197ae49a
user:      itojun <itojun%NetBSD.org@localhost>
date:      Sat Sep 06 12:52:10 2003 +0000

description:
use arc4random

diffstat:

 libexec/identd/parse.c |  5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diffs (20 lines):

diff -r 92af69e6ce9c -r 758d197ae49a libexec/identd/parse.c
--- a/libexec/identd/parse.c    Sat Sep 06 12:42:00 2003 +0000
+++ b/libexec/identd/parse.c    Sat Sep 06 12:52:10 2003 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: parse.c,v 1.14 2003/05/17 21:17:43 itojun Exp $        */
+/*     $NetBSD: parse.c,v 1.15 2003/09/06 12:52:10 itojun Exp $        */
 
 /*
 ** parse.c                         This file contains the protocol parser
@@ -532,9 +532,8 @@
 #ifdef SLEEP_BETWEEN_RETRIES
       {
        /* Seed the generator: lport should be unique (among other concurrent identd's) */
-       if (try < 1) srandom(lport);
        /* This gives a max sleep of 0xffff = 65535 microsecs, about 32millisec average */
-       usleep(random()&0x00ffff);
+       usleep(arc4random()&0x00ffff);
       }
 #else
       ;



Home | Main Index | Thread Index | Old Index