diff options
author | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2016-10-07 21:38:18 +0200 |
---|---|---|
committer | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2016-10-07 21:38:18 +0200 |
commit | 3039a34cbd8716766391fe7de5ea002f643bf143 (patch) | |
tree | 3dedb91af3a6a473d05b516eb7881065ca397ab7 /nx-X11/programs/Xserver/os/xdmauth.c | |
parent | 168c063dcaa8b60a3b6e3e1132416841d48419ea (diff) | |
parent | 736a2333e655ecfee78cb82f074cce5e84bdc218 (diff) | |
download | nx-libs-3039a34cbd8716766391fe7de5ea002f643bf143.tar.gz nx-libs-3039a34cbd8716766391fe7de5ea002f643bf143.tar.bz2 nx-libs-3039a34cbd8716766391fe7de5ea002f643bf143.zip |
Merge branch 'uli42-pr/decouple-xserver' into 3.6.x
Attributes GH PR #208: https://github.com/ArcticaProject/nx-libs/pull/208
Diffstat (limited to 'nx-X11/programs/Xserver/os/xdmauth.c')
-rw-r--r-- | nx-X11/programs/Xserver/os/xdmauth.c | 25 |
1 files changed, 15 insertions, 10 deletions
diff --git a/nx-X11/programs/Xserver/os/xdmauth.c b/nx-X11/programs/Xserver/os/xdmauth.c index 75e748bea..48e1da6df 100644 --- a/nx-X11/programs/Xserver/os/xdmauth.c +++ b/nx-X11/programs/Xserver/os/xdmauth.c @@ -39,6 +39,9 @@ from The Open Group. #include <stdio.h> #include <nx-X11/X.h> +#define XSERV_t +#define TRANS_SERVER +#define TRANS_REOPEN #include <nx-X11/Xtrans/Xtrans.h> #include "os.h" #include "osdep.h" @@ -66,8 +69,8 @@ XdmAuthenticationValidator (ARRAY8Ptr privateData, ARRAY8Ptr incomingData, { XdmAuthKeyPtr incoming; - XdmcpUnwrap (incomingData->data, &privateKey, - incomingData->data,incomingData->length); + XdmcpUnwrap (incomingData->data, (unsigned char *)&privateKey, + incomingData->data,incomingData->length); if (packet_type == ACCEPT) { if (incomingData->length != 8) return FALSE; @@ -86,7 +89,8 @@ XdmAuthenticationGenerator (ARRAY8Ptr privateData, ARRAY8Ptr outgoingData, outgoingData->data = 0; if (packet_type == REQUEST) { if (XdmcpAllocARRAY8 (outgoingData, 8)) - XdmcpWrap (&rho, &privateKey, outgoingData->data, 8); + XdmcpWrap ((unsigned char *)&rho, (unsigned char *)&privateKey, + outgoingData->data, 8); } return TRUE; } @@ -96,7 +100,8 @@ XdmAuthenticationAddAuth (int name_len, char *name, int data_len, char *data) { Bool ret; - XdmcpUnwrap (data, (unsigned char *)&privateKey, data, data_len); + XdmcpUnwrap ((unsigned char *)data, (unsigned char *)&privateKey, + (unsigned char *)data, data_len); authFromXDMCP = TRUE; ret = AddAuthorization (name_len, name, data_len, data); authFromXDMCP = FALSE; @@ -149,11 +154,11 @@ XdmAuthenticationInit (char *cookie, int cookie_len) } XdmcpGenerateKey (&rho); XdmcpRegisterAuthentication (XdmAuthenticationName, XdmAuthenticationNameLen, - (unsigned char *)&rho, + (char *)&rho, sizeof (rho), - XdmAuthenticationValidator, - XdmAuthenticationGenerator, - XdmAuthenticationAddAuth); + (ValidatorFunc)XdmAuthenticationValidator, + (GeneratorFunc)XdmAuthenticationGenerator, + (AddAuthorFunc)XdmAuthenticationAddAuth); } #endif /* XDMCP */ @@ -384,7 +389,7 @@ XdmCheckCookie (unsigned short cookie_length, char *cookie, if (!plain) return (XID) -1; for (auth = xdmAuth; auth; auth=auth->next) { - XdmcpUnwrap (cookie, (unsigned char *)&auth->key, plain, cookie_length); + XdmcpUnwrap ((unsigned char *)cookie, (unsigned char *)&auth->key, plain, cookie_length); if ((client = XdmAuthorizationValidate (plain, cookie_length, &auth->rho, xclient, reason)) != NULL) { client->next = xdmClients; @@ -429,7 +434,7 @@ XdmToID (unsigned short cookie_length, char *cookie) if (!plain) return (XID) -1; for (auth = xdmAuth; auth; auth=auth->next) { - XdmcpUnwrap (cookie, (unsigned char *)&auth->key, plain, cookie_length); + XdmcpUnwrap ((unsigned char *)cookie, (unsigned char *)&auth->key, plain, cookie_length); if ((client = XdmAuthorizationValidate (plain, cookie_length, &auth->rho, NULL, NULL)) != NULL) { free (client); |