os: auth: consolidate GenerateAuthorization()

No need for having two implementations in os/ vs xwin.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
Enrico Weigelt, metux IT consult 2025-03-10 10:16:43 +01:00
parent 0da8fc466d
commit 73abb7150d
2 changed files with 0 additions and 25 deletions

View File

@ -57,23 +57,6 @@ static unsigned int g_uiAuthDataLen = 0;
static char *g_pAuthData = NULL;
static xcb_auth_info_t auth_info;
/*
* Code to generate a MIT-MAGIC-COOKIE-1, copied from under XCSECURITY
*/
#ifndef XCSECURITY
XID
GenerateAuthorization(unsigned name_length,
const char *name,
unsigned data_length,
const char *data,
unsigned *data_length_return, char **data_return)
{
return MitGenerateCookie(data_length, data,
FakeClientID(0), data_length_return, data_return);
}
#endif
/*
* Generate authorization cookie for internal server clients
*/

View File

@ -59,9 +59,7 @@ struct protocol {
AuthRstCFunc Reset; /* delete all authorization data entries */
AuthFromIDFunc FromID; /* convert ID to cookie */
AuthRemCFunc Remove; /* remove a specific cookie */
#ifdef XCSECURITY
AuthGenCFunc Generate;
#endif
};
static struct protocol protocols[] = {
@ -72,9 +70,7 @@ static struct protocol protocols[] = {
.Reset = MitResetCookie,
.FromID = MitFromID,
.Remove = MitRemoveCookie,
#ifdef XCSECURITY
.Generate = MitGenerateCookie
#endif
},
#ifdef HASXDMAUTH
{
@ -281,8 +277,6 @@ AddAuthorization(unsigned name_length, const char *name,
return 0;
}
#ifdef XCSECURITY
XID
GenerateAuthorization(unsigned name_length,
const char *name,
@ -304,8 +298,6 @@ GenerateAuthorization(unsigned name_length,
return -1;
}
#endif /* XCSECURITY */
void
GenerateRandomData(int len, char *buf)
{