aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/os/auth.c
diff options
context:
space:
mode:
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 */