summaryrefslogtreecommitdiff
path: root/xserver/hw/xwin/winauth.c
diff options
context:
space:
mode:
Diffstat (limited to 'xserver/hw/xwin/winauth.c')
-rw-r--r--xserver/hw/xwin/winauth.c36
1 files changed, 0 insertions, 36 deletions
diff --git a/xserver/hw/xwin/winauth.c b/xserver/hw/xwin/winauth.c
index e86343952..14278390f 100644
--- a/xserver/hw/xwin/winauth.c
+++ b/xserver/hw/xwin/winauth.c
@@ -68,42 +68,6 @@ static xcb_auth_info_t auth_info;
*/
#ifndef XCSECURITY
-void
-GenerateRandomData(int len, char *buf)
-{
- int fd;
-
- fd = open("/dev/urandom", O_RDONLY);
- read(fd, buf, len);
- close(fd);
-}
-
-static char cookie[16]; /* 128 bits */
-
-XID
-MitGenerateCookie(unsigned data_length,
- const char *data,
- XID id, unsigned *data_length_return, char **data_return)
-{
- int i = 0;
- int status;
-
- while (data_length--) {
- cookie[i++] += *data++;
- if (i >= sizeof(cookie))
- i = 0;
- }
- GenerateRandomData(sizeof(cookie), cookie);
- status = MitAddCookie(sizeof(cookie), cookie, id);
- if (!status) {
- id = -1;
- }
- else {
- *data_return = cookie;
- *data_length_return = sizeof(cookie);
- }
- return id;
-}
static
XID