summaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorEmil Velikov <emil.l.velikov@gmail.com>2017-08-22 11:48:27 +0100
committerAdam Jackson <ajax@redhat.com>2017-08-22 10:59:40 -0400
commit1ef65692258136d6e36d0d9d6c5efad9877c9ceb (patch)
tree168c9928639dfdea0c87354a7e6800b77be3374d /hw
parent292ee7151631cabbd928847a5a2ca47e14a06b75 (diff)
os: make MitGenerateCookie() independent of XCSECURITY
Analogous to previous commit. Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Jon Turney <jon.turney@dronecode.org.uk>
Diffstat (limited to 'hw')
-rw-r--r--hw/xwin/winauth.c26
1 files changed, 0 insertions, 26 deletions
diff --git a/hw/xwin/winauth.c b/hw/xwin/winauth.c
index b7d1e2c7d..14278390f 100644
--- a/hw/xwin/winauth.c
+++ b/hw/xwin/winauth.c
@@ -68,32 +68,6 @@ static xcb_auth_info_t auth_info;
*/
#ifndef XCSECURITY
-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