aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/os/xdmauth.c
diff options
context:
space:
mode:
Diffstat (limited to 'xorg-server/os/xdmauth.c')
-rw-r--r--xorg-server/os/xdmauth.c44
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;
}
}