Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 13 Dec 2019 05:11:35 +0000 (UTC)
From:      Conrad Meyer <cem@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r355696 - head/lib/libtacplus
Message-ID:  <201912130511.xBD5BZPC049300@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: cem
Date: Fri Dec 13 05:11:34 2019
New Revision: 355696
URL: https://svnweb.freebsd.org/changeset/base/355696

Log:
  libtacplus: Remove bogus srandomdev+random
  
  Replace with arc4random.
  
  TACAS+ is a 1993 Cisco extension to the 1984 TACAS.  Is this something we want
  in base still?  The directory has been substantively unmaintained since 2002,
  at least.

Modified:
  head/lib/libtacplus/taclib.c

Modified: head/lib/libtacplus/taclib.c
==============================================================================
--- head/lib/libtacplus/taclib.c	Fri Dec 13 04:55:17 2019	(r355695)
+++ head/lib/libtacplus/taclib.c	Fri Dec 13 05:11:34 2019	(r355696)
@@ -429,10 +429,10 @@ gen_session_id(struct tac_msg *msg)
 {
 	int r;
 
-	r = random();
+	r = arc4random();
 	msg->session_id[0] = r >> 8;
 	msg->session_id[1] = r;
-	r = random();
+	r = arc4random();
 	msg->session_id[2] = r >> 8;
 	msg->session_id[3] = r;
 }
@@ -1051,7 +1051,6 @@ tac_open(void)
 		}
 		init_srvr_str(&h->srvr_msg);
 		init_srvr_str(&h->srvr_data);
-		srandomdev();
 	}
 	return h;
 }



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201912130511.xBD5BZPC049300>