aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/os/auth.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2009-07-25 19:39:46 +0000
committermarha <marha@users.sourceforge.net>2009-07-25 19:39:46 +0000
commit4a3dbb926ae3f5410198d7cc4f4ebe4f62eebf05 (patch)
treec1e02b9d3509aa97703aa4b540d4cd22ec4600ed /xorg-server/os/auth.c
parentdc3c299dd0995549e2a6973ca0f25b254afd38a5 (diff)
downloadvcxsrv-4a3dbb926ae3f5410198d7cc4f4ebe4f62eebf05.tar.gz
vcxsrv-4a3dbb926ae3f5410198d7cc4f4ebe4f62eebf05.tar.bz2
vcxsrv-4a3dbb926ae3f5410198d7cc4f4ebe4f62eebf05.zip
Added xorg-server-1.6.2.tar.gz
Diffstat (limited to 'xorg-server/os/auth.c')
-rw-r--r--xorg-server/os/auth.c43
1 files changed, 0 insertions, 43 deletions
diff --git a/xorg-server/os/auth.c b/xorg-server/os/auth.c
index dab4f60bd..a852e1c3b 100644
--- a/xorg-server/os/auth.c
+++ b/xorg-server/os/auth.c
@@ -314,8 +314,6 @@ GenerateAuthorization(
return -1;
}
-#ifdef HAVE_URANDOM
-
void
GenerateRandomData (int len, char *buf)
{
@@ -326,45 +324,4 @@ GenerateRandomData (int len, char *buf)
close(fd);
}
-#else /* !HAVE_URANDOM */
-
-/* A random number generator that is more unpredictable
- than that shipped with some systems.
- This code is taken from the C standard. */
-
-static unsigned long int next = 1;
-
-static int
-xdm_rand(void)
-{
- next = next * 1103515245 + 12345;
- return (unsigned int)(next/65536) % 32768;
-}
-
-static void
-xdm_srand(unsigned int seed)
-{
- next = seed;
-}
-
-void
-GenerateRandomData (int len, char *buf)
-{
- static int seed;
- int value;
- int i;
-
- seed += GetTimeInMillis();
- xdm_srand (seed);
- for (i = 0; i < len; i++)
- {
- value = xdm_rand ();
- buf[i] ^= (value & 0xff00) >> 8;
- }
-
- /* XXX add getrusage, popen("ps -ale") */
-}
-
-#endif /* HAVE_URANDOM */
-
#endif /* XCSECURITY */