diff options
author | marha <marha@users.sourceforge.net> | 2010-05-15 16:28:11 +0000 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2010-05-15 16:28:11 +0000 |
commit | c38dead3ea7e177728d90cd815cf4eead0c9f534 (patch) | |
tree | b809dba1dc9013bb1e67a5ee388f2dd217dc0f88 /xorg-server/os/xdmauth.c | |
parent | 6083a94d68878c9ad5f59b28bd07e4738e9fb7b4 (diff) | |
download | vcxsrv-c38dead3ea7e177728d90cd815cf4eead0c9f534.tar.gz vcxsrv-c38dead3ea7e177728d90cd815cf4eead0c9f534.tar.bz2 vcxsrv-c38dead3ea7e177728d90cd815cf4eead0c9f534.zip |
xserver git update 15/5/2010
Diffstat (limited to 'xorg-server/os/xdmauth.c')
-rw-r--r-- | xorg-server/os/xdmauth.c | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/xorg-server/os/xdmauth.c b/xorg-server/os/xdmauth.c index 7834b56f8..b58d1d7cc 100644 --- a/xorg-server/os/xdmauth.c +++ b/xorg-server/os/xdmauth.c @@ -239,7 +239,7 @@ XdmClientAuthTimeout (long now) prev->next = next;
else
xdmClients = next;
- xfree (client);
+ free(client);
}
else
prev = client;
@@ -259,20 +259,20 @@ XdmAuthorizationValidate (unsigned char *plain, int length, *reason = "Bad XDM authorization key length";
return NULL;
}
- client = xalloc (sizeof (XdmClientAuthRec));
+ client = malloc(sizeof (XdmClientAuthRec));
if (!client)
return NULL;
XdmClientAuthDecode (plain, client);
if (!XdmcpCompareKeys (&client->rho, rho))
{
- xfree (client);
+ free(client);
if (reason)
*reason = "Invalid XDM-AUTHORIZATION-1 key (failed key comparison)";
return NULL;
}
for (i = 18; i < 24; i++)
if (plain[i] != 0) {
- xfree (client);
+ free(client);
if (reason)
*reason = "Invalid XDM-AUTHORIZATION-1 key (failed NULL check)";
return NULL;
@@ -287,15 +287,15 @@ XdmAuthorizationValidate (unsigned char *plain, int length, #if defined(TCPCONN) || defined(STREAMSCONN)
if (family == FamilyInternet &&
memcmp((char *)addr, client->client, 4) != 0) {
- xfree (client);
- xfree (addr);
+ free(client);
+ free(addr);
if (reason)
*reason = "Invalid XDM-AUTHORIZATION-1 key (failed address comparison)";
return NULL;
}
#endif
- xfree (addr);
+ free(addr);
}
}
now = time(0);
@@ -308,7 +308,7 @@ XdmAuthorizationValidate (unsigned char *plain, int length, XdmClientAuthTimeout (now);
if (abs (client->time - now) > TwentyMinutes)
{
- xfree (client);
+ free(client);
if (reason)
*reason = "Excessive XDM-AUTHORIZATION-1 time offset";
return NULL;
@@ -317,7 +317,7 @@ XdmAuthorizationValidate (unsigned char *plain, int length, {
if (XdmClientAuthCompare (existing, client))
{
- xfree (client);
+ free(client);
if (reason)
*reason = "XDM authorization key matches an existing client!";
return NULL;
@@ -363,7 +363,7 @@ XdmAddCookie (unsigned short data_length, const char *data, XID id) /* the first octet of the key must be zero */
if (key_bits[0] != '\0')
return 0;
- new = xalloc (sizeof (XdmAuthorizationRec));
+ new = malloc(sizeof (XdmAuthorizationRec));
if (!new)
return 0;
new->next = xdmAuth;
@@ -385,7 +385,7 @@ XdmCheckCookie (unsigned short cookie_length, const char *cookie, /* Auth packets must be a multiple of 8 bytes long */
if (cookie_length & 7)
return (XID) -1;
- plain = xalloc (cookie_length);
+ plain = malloc(cookie_length);
if (!plain)
return (XID) -1;
for (auth = xdmAuth; auth; auth=auth->next) {
@@ -394,11 +394,11 @@ XdmCheckCookie (unsigned short cookie_length, const char *cookie, {
client->next = xdmClients;
xdmClients = client;
- xfree (plain);
+ free(plain);
return auth->id;
}
}
- xfree (plain);
+ free(plain);
return (XID) -1;
}
@@ -411,13 +411,13 @@ XdmResetCookie (void) for (auth = xdmAuth; auth; auth=next_auth)
{
next_auth = auth->next;
- xfree (auth);
+ free(auth);
}
xdmAuth = 0;
for (client = xdmClients; client; client=next_client)
{
next_client = client->next;
- xfree (client);
+ free(client);
}
xdmClients = (XdmClientAuthPtr) 0;
return 1;
@@ -430,21 +430,21 @@ XdmToID (unsigned short cookie_length, char *cookie) XdmClientAuthPtr client;
unsigned char *plain;
- plain = xalloc (cookie_length);
+ plain = malloc(cookie_length);
if (!plain)
return (XID) -1;
for (auth = xdmAuth; auth; auth=auth->next) {
XdmcpUnwrap ((unsigned char *)cookie, (unsigned char *)&auth->key, plain, cookie_length);
if ((client = XdmAuthorizationValidate (plain, cookie_length, &auth->rho, NULL, NULL)) != NULL)
{
- xfree (client);
- xfree (cookie);
- xfree (plain);
+ free(client);
+ free(cookie);
+ free(plain);
return auth->id;
}
}
- xfree (cookie);
- xfree (plain);
+ free(cookie);
+ free(plain);
return (XID) -1;
}
@@ -489,7 +489,7 @@ XdmRemoveCookie (unsigned short data_length, const char *data) XdmcpCompareKeys (key_bits, &auth->key))
{
xdmAuth = auth->next;
- xfree (auth);
+ free(auth);
return 1;
}
}
|