diff options
author | Eamon Walsh <ewalsh@tycho.nsa.gov> | 2008-06-13 21:59:09 -0400 |
---|---|---|
committer | Ulrich Sibiller <uli42@gmx.de> | 2016-10-06 21:16:17 +0200 |
commit | da5da2091dc47b031926c791135c83468f557e9d (patch) | |
tree | e0f468a41fcff3b19b3e2144d858ff065bb66028 /nx-X11/programs/Xserver/os | |
parent | b60f66bb9df6cbde57bcfb335701c175e0df2c74 (diff) | |
download | nx-libs-da5da2091dc47b031926c791135c83468f557e9d.tar.gz nx-libs-da5da2091dc47b031926c791135c83468f557e9d.tar.bz2 nx-libs-da5da2091dc47b031926c791135c83468f557e9d.zip |
Fix multiple warnings in os/xdmauth.c.
v1: Eamon Walsh
v2: backport to nx-libs 3.6.x (Ulrich Sibiller)
Diffstat (limited to 'nx-X11/programs/Xserver/os')
-rw-r--r-- | nx-X11/programs/Xserver/os/xdmauth.c | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/nx-X11/programs/Xserver/os/xdmauth.c b/nx-X11/programs/Xserver/os/xdmauth.c index 2e061d5e1..48e1da6df 100644 --- a/nx-X11/programs/Xserver/os/xdmauth.c +++ b/nx-X11/programs/Xserver/os/xdmauth.c @@ -69,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; @@ -89,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; } @@ -99,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; @@ -152,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 */ @@ -387,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; @@ -432,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); |