summaryrefslogtreecommitdiff
path: root/hw/xwin/winauth.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/xwin/winauth.c')
-rw-r--r--hw/xwin/winauth.c27
1 files changed, 6 insertions, 21 deletions
diff --git a/hw/xwin/winauth.c b/hw/xwin/winauth.c
index 14278390f..4764d4bfb 100644
--- a/hw/xwin/winauth.c
+++ b/hw/xwin/winauth.c
@@ -32,7 +32,8 @@
#include <xwin-config.h>
#endif
-#include "win.h"
+#include "winauth.h"
+#include "winmsg.h"
/* Includes for authorization */
#include "securitysrv.h"
@@ -40,14 +41,6 @@
#include <xcb/xcb.h>
-/* Need to get this from Xlib.h */
-extern void XSetAuthorization(
- const char * /* name */,
- int /* namelen */,
- const char * /* data */,
- int /* datalen */
-);
-
/*
* Constants
*/
@@ -68,9 +61,7 @@ static xcb_auth_info_t auth_info;
*/
#ifndef XCSECURITY
-
-static
- XID
+static XID
GenerateAuthorization(unsigned name_length,
const char *name,
unsigned data_length,
@@ -86,10 +77,12 @@ GenerateAuthorization(unsigned name_length,
* Generate authorization cookie for internal server clients
*/
-Bool
+BOOL
winGenerateAuthorization(void)
{
+#ifdef XCSECURITY
SecurityAuthorizationPtr pAuth = NULL;
+#endif
/* Call OS layer to generate authorization key */
g_authId = GenerateAuthorization(strlen(AUTH_NAME),
@@ -141,14 +134,6 @@ winGenerateAuthorization(void)
return TRUE;
}
-/* Use our generated cookie for authentication */
-void
-winSetAuthorization(void)
-{
- XSetAuthorization(AUTH_NAME,
- strlen(AUTH_NAME), g_pAuthData, g_uiAuthDataLen);
-}
-
xcb_auth_info_t *
winGetXcbAuthInfo(void)
{