diff options
author | Matthieu Herrb <matthieu@herrb.eu> | 2016-01-05 21:31:12 +0100 |
---|---|---|
committer | Matthieu Herrb <matthieu@herrb.eu> | 2016-01-07 08:39:03 +0100 |
commit | 994d32ad92e12aa381f222db68db9997a602197e (patch) | |
tree | aeab4d6c4ec0f5930ac9ddcbf1913271efc552b9 | |
parent | 5defb9365b7bfb758024ed203b30ee245285b77f (diff) |
Missed on arc4random() conversion.
Signed-off-by: Matthieu Herrb <matthieu@herrb.eu>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-rw-r--r-- | xdm/genauth.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/xdm/genauth.c b/xdm/genauth.c index 5db7315..f50be3b 100644 --- a/xdm/genauth.c +++ b/xdm/genauth.c @@ -408,15 +408,20 @@ GenerateAuthData (char *auth, int len) static int xdmcpAuthInited; long ldata[2]; -# ifdef ITIMER_REAL +# ifndef HAVE_ARC4RANDOM +# ifdef ITIMER_REAL struct timeval now; X_GETTIMEOFDAY (&now); ldata[0] = now.tv_usec; ldata[1] = now.tv_sec; -# else +# else ldata[0] = time ((long *) 0); ldata[1] = getpid (); +# endif +# else + ldata[0] = arc4random(); + ldata[1] = arc4random(); # endif longtochars (ldata[0], data+0); |