mirror of
https://github.com/X11Libre/xserver.git
synced 2026-09-15 19:22:22 +00:00
General DIX static and dead code cleanup.
This commit is contained in:
parent
04b87d6dfa
commit
4b5802ddbd
18 changed files with 166 additions and 438 deletions
|
|
@ -234,8 +234,8 @@ static Bool NewHost(int /*family*/,
|
|||
int /*len*/,
|
||||
int /* addingLocalHosts */);
|
||||
|
||||
int LocalClientCredAndGroups(ClientPtr client, int *pUid, int *pGid,
|
||||
int **pSuppGids, int *nSuppGids);
|
||||
static int LocalClientCredAndGroups(ClientPtr client, int *pUid, int *pGid,
|
||||
int **pSuppGids, int *nSuppGids);
|
||||
|
||||
|
||||
/* XFree86 bug #156: To keep track of which hosts were explicitly requested in
|
||||
|
|
@ -1431,7 +1431,7 @@ LocalClientCred(ClientPtr client, int *pUid, int *pGid)
|
|||
*
|
||||
* Used by localuser & localgroup ServerInterpreted access control forms below
|
||||
*/
|
||||
int
|
||||
static int
|
||||
LocalClientCredAndGroups(ClientPtr client, int *pUid, int *pGid,
|
||||
int **pSuppGids, int *nSuppGids)
|
||||
{
|
||||
|
|
|
|||
20
os/auth.c
20
os/auth.c
|
|
@ -255,26 +255,6 @@ ResetAuthorization (void)
|
|||
ShouldLoadAuth = TRUE;
|
||||
}
|
||||
|
||||
XID
|
||||
AuthorizationToID (
|
||||
unsigned short name_length,
|
||||
char *name,
|
||||
unsigned short data_length,
|
||||
char *data)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = 0; i < NUM_AUTHORIZATION; i++) {
|
||||
if (protocols[i].name_length == name_length &&
|
||||
memcmp (protocols[i].name, name, (int) name_length) == 0 &&
|
||||
protocols[i].ToID)
|
||||
{
|
||||
return (*protocols[i].ToID) (data_length, data);
|
||||
}
|
||||
}
|
||||
return (XID) ~0L;
|
||||
}
|
||||
|
||||
int
|
||||
AuthorizationFromID (
|
||||
XID id,
|
||||
|
|
|
|||
13
os/io.c
13
os/io.c
|
|
@ -90,6 +90,11 @@ SOFTWARE.
|
|||
_X_EXPORT CallbackListPtr ReplyCallback;
|
||||
_X_EXPORT CallbackListPtr FlushCallback;
|
||||
|
||||
static ConnectionInputPtr AllocateInputBuffer(void);
|
||||
static ConnectionOutputPtr AllocateOutputBuffer(void);
|
||||
static xReqPtr PeekNextRequest(xReqPtr req, ClientPtr client, Bool readmore);
|
||||
static void SkipRequests(xReqPtr req, ClientPtr client, int numskipped);
|
||||
|
||||
/* check for both EAGAIN and EWOULDBLOCK, because some supposedly POSIX
|
||||
* systems are broken and return EWOULDBLOCK when they should return EAGAIN
|
||||
*/
|
||||
|
|
@ -635,7 +640,7 @@ ResetCurrentRequest(ClientPtr client)
|
|||
*
|
||||
**********************/
|
||||
|
||||
xReqPtr
|
||||
static xReqPtr
|
||||
PeekNextRequest(
|
||||
xReqPtr req, /* request we're starting from */
|
||||
ClientPtr client, /* client whose requests we're skipping */
|
||||
|
|
@ -697,7 +702,7 @@ PeekNextRequest(
|
|||
|
||||
_X_EXPORT CallbackListPtr SkippedRequestsCallback = NULL;
|
||||
|
||||
void
|
||||
static void
|
||||
SkipRequests(
|
||||
xReqPtr req, /* last request being skipped */
|
||||
ClientPtr client, /* client whose requests we're skipping */
|
||||
|
|
@ -1165,7 +1170,7 @@ FlushClient(ClientPtr who, OsCommPtr oc, char *extraBuf, int extraCount)
|
|||
return extraCount; /* return only the amount explicitly requested */
|
||||
}
|
||||
|
||||
ConnectionInputPtr
|
||||
static ConnectionInputPtr
|
||||
AllocateInputBuffer(void)
|
||||
{
|
||||
ConnectionInputPtr oci;
|
||||
|
|
@ -1186,7 +1191,7 @@ AllocateInputBuffer(void)
|
|||
return oci;
|
||||
}
|
||||
|
||||
ConnectionOutputPtr
|
||||
static ConnectionOutputPtr
|
||||
AllocateOutputBuffer(void)
|
||||
{
|
||||
ConnectionOutputPtr oco;
|
||||
|
|
|
|||
|
|
@ -210,10 +210,6 @@ extern void FreeOsBuffers(
|
|||
|
||||
#include "dix.h"
|
||||
|
||||
extern ConnectionInputPtr AllocateInputBuffer(void);
|
||||
|
||||
extern ConnectionOutputPtr AllocateOutputBuffer(void);
|
||||
|
||||
extern fd_set AllSockets;
|
||||
extern fd_set AllClients;
|
||||
extern fd_set LastSelectMask;
|
||||
|
|
@ -293,14 +289,12 @@ extern XID AuthSecurityCheck (AuthCheckArgs);
|
|||
/* in xdmcp.c */
|
||||
extern void XdmcpUseMsg (void);
|
||||
extern int XdmcpOptions(int argc, char **argv, int i);
|
||||
extern void XdmcpSetAuthentication (ARRAY8Ptr name);
|
||||
extern void XdmcpRegisterConnection (
|
||||
int type,
|
||||
char *address,
|
||||
int addrlen);
|
||||
extern void XdmcpRegisterAuthorizations (void);
|
||||
extern void XdmcpRegisterAuthorization (char *name, int namelen);
|
||||
extern void XdmcpRegisterDisplayClass (char *name, int length);
|
||||
extern void XdmcpInit (void);
|
||||
extern void XdmcpReset (void);
|
||||
extern void XdmcpOpenDisplay(int sock);
|
||||
|
|
@ -313,8 +307,6 @@ extern void XdmcpRegisterAuthentication (
|
|||
ValidatorFunc Validator,
|
||||
GeneratorFunc Generator,
|
||||
AddAuthorFunc AddAuth);
|
||||
extern int XdmcpCheckAuthentication (ARRAY8Ptr Name, ARRAY8Ptr Data, int packet_type);
|
||||
extern int XdmcpAddAuthorization (ARRAY8Ptr name, ARRAY8Ptr data);
|
||||
|
||||
struct sockaddr_in;
|
||||
extern void XdmcpRegisterBroadcastAddress (struct sockaddr_in *addr);
|
||||
|
|
|
|||
58
os/xdmcp.c
58
os/xdmcp.c
|
|
@ -197,8 +197,6 @@ static void receive_packet(int /*socketfd*/);
|
|||
|
||||
static void send_packet(void);
|
||||
|
||||
extern void XdmcpDeadSession(char * /*reason*/);
|
||||
|
||||
static void timeout(void);
|
||||
|
||||
static void restart(void);
|
||||
|
|
@ -213,10 +211,23 @@ static void XdmcpWakeupHandler(
|
|||
int /*i*/,
|
||||
pointer /*LastSelectMask*/);
|
||||
|
||||
void XdmcpRegisterManufacturerDisplayID(
|
||||
char * /*name*/,
|
||||
int /*length*/);
|
||||
/*
|
||||
* Register the Manufacturer display ID
|
||||
*/
|
||||
|
||||
static ARRAY8 ManufacturerDisplayID;
|
||||
|
||||
static void
|
||||
XdmcpRegisterManufacturerDisplayID (char *name, int length)
|
||||
{
|
||||
int i;
|
||||
|
||||
XdmcpDisposeARRAY8 (&ManufacturerDisplayID);
|
||||
if (!XdmcpAllocARRAY8 (&ManufacturerDisplayID, length))
|
||||
return;
|
||||
for (i = 0; i < length; i++)
|
||||
ManufacturerDisplayID.data[i] = (CARD8) name[i];
|
||||
}
|
||||
|
||||
static unsigned short xdm_udp_port = XDM_UDP_PORT;
|
||||
static Bool OneSession = FALSE;
|
||||
|
|
@ -417,7 +428,7 @@ static ARRAY8Ptr AuthenticationName = &noAuthenticationName;
|
|||
static ARRAY8Ptr AuthenticationData = &noAuthenticationData;
|
||||
static AuthenticationFuncsPtr AuthenticationFuncs;
|
||||
|
||||
void
|
||||
static void
|
||||
XdmcpSetAuthentication (ARRAY8Ptr name)
|
||||
{
|
||||
int i;
|
||||
|
|
@ -549,7 +560,7 @@ XdmcpRegisterAuthorization (char *name, int namelen)
|
|||
|
||||
static ARRAY8 DisplayClass;
|
||||
|
||||
void
|
||||
static void
|
||||
XdmcpRegisterDisplayClass (char *name, int length)
|
||||
{
|
||||
int i;
|
||||
|
|
@ -561,24 +572,6 @@ XdmcpRegisterDisplayClass (char *name, int length)
|
|||
DisplayClass.data[i] = (CARD8) name[i];
|
||||
}
|
||||
|
||||
/*
|
||||
* Register the Manufacturer display ID
|
||||
*/
|
||||
|
||||
static ARRAY8 ManufacturerDisplayID;
|
||||
|
||||
void
|
||||
XdmcpRegisterManufacturerDisplayID (char *name, int length)
|
||||
{
|
||||
int i;
|
||||
|
||||
XdmcpDisposeARRAY8 (&ManufacturerDisplayID);
|
||||
if (!XdmcpAllocARRAY8 (&ManufacturerDisplayID, length))
|
||||
return;
|
||||
for (i = 0; i < length; i++)
|
||||
ManufacturerDisplayID.data[i] = (CARD8) name[i];
|
||||
}
|
||||
|
||||
/*
|
||||
* initialize XDMCP; create the socket, compute the display
|
||||
* number, set up the state machine
|
||||
|
|
@ -867,7 +860,7 @@ send_packet(void)
|
|||
* timeouts, or Keepalive failure.
|
||||
*/
|
||||
|
||||
void
|
||||
static void
|
||||
XdmcpDeadSession (char *reason)
|
||||
{
|
||||
ErrorF ("XDM: %s, declaring session dead\n", reason);
|
||||
|
|
@ -960,21 +953,16 @@ restart(void)
|
|||
send_packet();
|
||||
}
|
||||
|
||||
int
|
||||
XdmcpCheckAuthentication (
|
||||
ARRAY8Ptr Name,
|
||||
ARRAY8Ptr Data,
|
||||
int packet_type)
|
||||
static int
|
||||
XdmcpCheckAuthentication (ARRAY8Ptr Name, ARRAY8Ptr Data, int packet_type)
|
||||
{
|
||||
return (XdmcpARRAY8Equal (Name, AuthenticationName) &&
|
||||
(AuthenticationName->length == 0 ||
|
||||
(*AuthenticationFuncs->Validator) (AuthenticationData, Data, packet_type)));
|
||||
}
|
||||
|
||||
int
|
||||
XdmcpAddAuthorization (
|
||||
ARRAY8Ptr name,
|
||||
ARRAY8Ptr data)
|
||||
static int
|
||||
XdmcpAddAuthorization (ARRAY8Ptr name, ARRAY8Ptr data)
|
||||
{
|
||||
AddAuthorFunc AddAuth;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue