aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/programs/Xserver/os
diff options
context:
space:
mode:
Diffstat (limited to 'nx-X11/programs/Xserver/os')
-rw-r--r--nx-X11/programs/Xserver/os/access.c4
-rw-r--r--nx-X11/programs/Xserver/os/connection.c167
-rw-r--r--nx-X11/programs/Xserver/os/io.c80
-rw-r--r--nx-X11/programs/Xserver/os/osdep.h26
-rw-r--r--nx-X11/programs/Xserver/os/utils.c3
5 files changed, 0 insertions, 280 deletions
diff --git a/nx-X11/programs/Xserver/os/access.c b/nx-X11/programs/Xserver/os/access.c
index 05dfaf38a..d2bf972fe 100644
--- a/nx-X11/programs/Xserver/os/access.c
+++ b/nx-X11/programs/Xserver/os/access.c
@@ -1390,10 +1390,6 @@ Bool LocalClient(ClientPtr client)
return FALSE;
}
#endif
-#ifdef LBX
- if (!((OsCommPtr)client->osPrivate)->trans_conn)
- return FALSE;
-#endif
if (!_XSERVTransGetPeerAddr (((OsCommPtr)client->osPrivate)->trans_conn,
&notused, &alen, &from))
{
diff --git a/nx-X11/programs/Xserver/os/connection.c b/nx-X11/programs/Xserver/os/connection.c
index bb2cff952..2df92bf91 100644
--- a/nx-X11/programs/Xserver/os/connection.c
+++ b/nx-X11/programs/Xserver/os/connection.c
@@ -151,12 +151,6 @@ extern __const__ int _nfiles;
#define _SECURITY_SERVER
#include <nx-X11/extensions/security.h>
#endif
-#ifdef LBX
-#include "colormapst.h"
-#include "propertyst.h"
-#include "lbxserve.h"
-#include "osdep.h"
-#endif
#ifdef X_NOT_POSIX
#define Pid_t int
@@ -297,12 +291,10 @@ int ListenTransCount;
static void ErrorConnMax(XtransConnInfo /* trans_conn */);
-#ifndef LBX
static
void CloseDownFileDescriptor(
OsCommPtr /*oc*/
);
-#endif
static XtransConnInfo
@@ -691,64 +683,13 @@ ClientAuthorized(ClientPtr client,
char *reason = NULL;
XtransConnInfo trans_conn;
int restore_trans_conn = 0;
- ClientPtr lbxpc = NULL;
priv = (OsCommPtr)client->osPrivate;
trans_conn = priv->trans_conn;
-#ifdef LBX
- if (!trans_conn) {
- /*
- * Since trans_conn is NULL, this must be a proxy's client for
- * which we have NO address. Therefore, we will temporarily
- * set the client's trans_conn to the proxy's trans_conn and
- * after CheckAuthorization the client's trans_conn will be
- * restored.
- *
- * If XDM-AUTHORIZATION-1 is being used, CheckAuthorization
- * will eventually call XdmAuthorizationValidate and this
- * later function may use the client's trans_conn to get the
- * client's address. Since a XDM-AUTH-1 auth string includes
- * the client's address, this address is compared to the address
- * in the client's trans_conn. If the proxy and client are
- * on the same host, the comparison will fail; otherwise the
- * comparison will fail and the client will not be authorized
- * to connect to the server.
- *
- * The basis for this additional code is to prevent a
- * NULL pointer dereference of the client's trans_conn.
- * The fundamental problem - the fact that the client's
- * trans_conn is NULL - is because the NewClient
- * request in version 1.0 of the LBX protocol does not
- * send the client's address to the server. When the
- * spec is changed and the client's address is sent to
- * server in the NewClient request, this additional code
- * should be removed.
- *
- * See defect number XWSog08218 for more information.
- */
- lbxpc = LbxProxyClient(priv->proxy);
- trans_conn = ((OsCommPtr)lbxpc->osPrivate)->trans_conn;
- priv->trans_conn = trans_conn;
- restore_trans_conn = 1;
- }
-#endif
-
auth_id = CheckAuthorization (proto_n, auth_proto,
string_n, auth_string, client, &reason);
-#ifdef LBX
- if (! priv->trans_conn) {
- if (auth_id == (XID) ~0L && !GetAccessControl())
- auth_id = ((OsCommPtr)lbxpc->osPrivate)->auth_id;
-#ifdef XCSECURITY
- else if (auth_id != (XID) ~0L && !SecuritySameLevel(lbxpc, auth_id)) {
- auth_id = (XID) ~0L;
- reason = "Client trust level differs from that of LBX Proxy";
- }
-#endif
- }
-#endif
if (auth_id == (XID) ~0L)
{
if (
@@ -760,9 +701,6 @@ ClientAuthorized(ClientPtr client,
&family, &fromlen, &from) != -1)
{
if (
-#ifdef LBX
- !trans_conn ||
-#endif
InvalidHost ((struct sockaddr *) from, fromlen, client))
AuthAudit(client, FALSE, (struct sockaddr *) from,
fromlen, proto_n, auth_proto, auth_id);
@@ -779,14 +717,6 @@ ClientAuthorized(ClientPtr client,
}
if (auth_id == (XID) ~0L) {
-#ifdef LBX
- /*
- * Restore client's trans_conn state
- */
- if (restore_trans_conn) {
- priv->trans_conn = NULL;
- }
-#endif
if (reason)
return reason;
else
@@ -817,34 +747,16 @@ ClientAuthorized(ClientPtr client,
* true purpose of the selfhosts list is to see who may change the
* access control list.
*/
-#ifdef LBX
- if (restore_trans_conn) {
- priv->trans_conn = NULL;
- }
-#endif
return((char *)NULL);
}
static ClientPtr
-#ifdef LBX
-AllocNewConnection (XtransConnInfo trans_conn, int fd, CARD32 conn_time,
- int (*Flush)(
- ClientPtr /*who*/, OsCommPtr /*oc*/,
- char * /*extraBuf*/, int /*extraCount*/),
- void (*Close)(
- ClientPtr /*client*/),
- LbxProxyPtr proxy)
-#else
AllocNewConnection (XtransConnInfo trans_conn, int fd, CARD32 conn_time)
-#endif
{
OsCommPtr oc;
ClientPtr client;
if (
-#ifdef LBX
- trans_conn &&
-#endif
#ifndef WIN32
fd >= lastfdesc
#else
@@ -861,20 +773,11 @@ AllocNewConnection (XtransConnInfo trans_conn, int fd, CARD32 conn_time)
oc->output = (ConnectionOutputPtr)NULL;
oc->auth_id = None;
oc->conn_time = conn_time;
-#ifdef LBX
- oc->proxy = proxy;
- oc->Flush = Flush;
- oc->Close = Close;
- oc->largereq = (ConnectionInputPtr) NULL;
-#endif
if (!(client = NextAvailableClient((void *)oc)))
{
xfree (oc);
return NullClient;
}
-#ifdef LBX
- if (trans_conn)
-#endif
{
#if !defined(WIN32)
ConnectionTranslation[fd] = client->index;
@@ -901,39 +804,6 @@ AllocNewConnection (XtransConnInfo trans_conn, int fd, CARD32 conn_time)
return client;
}
-#ifdef LBX
-
-int
-ClientConnectionNumber (ClientPtr client)
-{
- OsCommPtr oc = (OsCommPtr) client->osPrivate;
-
- return oc->fd;
-}
-
-ClientPtr
-AllocLbxClientConnection (ClientPtr client, LbxProxyPtr proxy)
-{
- OsCommPtr oc = (OsCommPtr) client->osPrivate;
-
- return AllocNewConnection ((XtransConnInfo)NULL, oc->fd, GetTimeInMillis(),
- LbxFlushClient, LbxCloseClient, proxy);
-}
-
-void
-LbxProxyConnection (ClientPtr client, LbxProxyPtr proxy)
-{
- OsCommPtr oc = (OsCommPtr) client->osPrivate;
-
- FlushClient(client, oc, (char *)NULL, 0);
- oc->proxy = proxy;
- oc->Flush = LbxFlushClient;
- oc->Close = LbxCloseClient;
- LbxPrimeInput(client, proxy);
-}
-
-#endif
-
/*****************
* EstablishNewConnections
* If anyone is waiting on listened sockets, accept them.
@@ -1013,10 +883,6 @@ EstablishNewConnections(ClientPtr clientUnused, void * closure)
_XSERVTransSetOption(new_trans_conn, TRANS_NONBLOCKING, 1);
if (!AllocNewConnection (new_trans_conn, newconn, connect_time
-#ifdef LBX
- , StandardFlushClient,
- CloseDownFileDescriptor, (LbxProxyPtr)NULL
-#endif
))
{
ErrorConnMax(new_trans_conn);
@@ -1086,27 +952,17 @@ ErrorConnMax(XtransConnInfo trans_conn)
* Remove this file descriptor and it's I/O buffers, etc.
************/
-#ifdef LBX
-void
-CloseDownFileDescriptor(ClientPtr client)
-#else
static void
CloseDownFileDescriptor(OsCommPtr oc)
-#endif
{
-#ifdef LBX
- OsCommPtr oc = (OsCommPtr) client->osPrivate;
-#endif
int connection = oc->fd;
if (oc->trans_conn) {
_XSERVTransDisconnect(oc->trans_conn);
_XSERVTransClose(oc->trans_conn);
}
-#ifndef LBX
FreeOsBuffers(oc);
xfree(oc);
-#endif
#ifndef WIN32
ConnectionTranslation[connection] = 0;
#else
@@ -1201,13 +1057,7 @@ CloseDownConnection(ClientPtr client)
#ifdef XDMCP
XdmcpCloseDisplay(oc->fd);
#endif
-#ifndef LBX
CloseDownFileDescriptor(oc);
-#else
- (*oc->Close) (client);
- FreeOsBuffers(oc);
- xfree(oc);
-#endif
client->osPrivate = (void *)NULL;
if (auditTrailLevel > 1)
AuditF("client %d disconnected\n", client->index);
@@ -1296,17 +1146,8 @@ IgnoreClient (ClientPtr client)
{
OsCommPtr oc = (OsCommPtr)client->osPrivate;
int connection = oc->fd;
-#ifdef LBX
- LbxClientPtr lbxClient = LbxClient(client);
-#endif
isItTimeToYield = TRUE;
-#ifdef LBX
- if (lbxClient) {
- lbxClient->ignored = TRUE;
- return;
- }
-#endif
if (!GrabInProgress || FD_ISSET(connection, &AllClients))
{
if (FD_ISSET (connection, &ClientsWithInput))
@@ -1340,14 +1181,6 @@ AttendClient (ClientPtr client)
{
OsCommPtr oc = (OsCommPtr)client->osPrivate;
int connection = oc->fd;
-#ifdef LBX
- LbxClientPtr lbxClient = LbxClient(client);
-
- if (lbxClient) {
- lbxClient->ignored = FALSE;
- return;
- }
-#endif
if (!GrabInProgress || GrabInProgress == client->index ||
FD_ISSET(connection, &GrabImperviousClients))
{
diff --git a/nx-X11/programs/Xserver/os/io.c b/nx-X11/programs/Xserver/os/io.c
index ccfc01dfe..fefe3007f 100644
--- a/nx-X11/programs/Xserver/os/io.c
+++ b/nx-X11/programs/Xserver/os/io.c
@@ -85,11 +85,6 @@ SOFTWARE.
#include "opaque.h"
#include "dixstruct.h"
#include "misc.h"
-#ifdef LBX
-#include "colormapst.h"
-#include "propertyst.h"
-#include "lbxserve.h"
-#endif
CallbackListPtr ReplyCallback;
CallbackListPtr FlushCallback;
@@ -200,26 +195,9 @@ OsCommPtr AvailableInput = (OsCommPtr)NULL;
#define YieldControlDeath() \
{ timesThisConnection = 0; }
-#ifdef hpux_not_tog
-#define LBX_NEED_OLD_SYMBOL_FOR_LOADABLES
-#endif
-
-#ifdef LBX
-#ifdef LBX_NEED_OLD_SYMBOL_FOR_LOADABLES
-#undef ReadRequestFromClient
int
ReadRequestFromClient(ClientPtr client)
{
- return (*client->readRequest)(client);
-}
-#endif
-int
-StandardReadRequestFromClient(ClientPtr client)
-#else
-int
-ReadRequestFromClient(ClientPtr client)
-#endif
-{
OsCommPtr oc = (OsCommPtr)client->osPrivate;
ConnectionInputPtr oci = oc->input;
int fd = oc->fd;
@@ -368,13 +346,6 @@ ReadRequestFromClient(ClientPtr client)
YieldControlDeath();
return -1;
}
-#ifdef LBX
- if (oc->proxy && oc->proxy->compHandle)
- result = (*oc->proxy->streamOpts.streamCompRead)(fd,
- (unsigned char *)oci->buffer + oci->bufcnt,
- oci->size - oci->bufcnt);
- else
-#endif
result = _XSERVTransRead(oc->trans_conn, oci->buffer + oci->bufcnt,
oci->size - oci->bufcnt);
if (result <= 0)
@@ -382,18 +353,8 @@ ReadRequestFromClient(ClientPtr client)
if ((result < 0) && ETEST(errno))
{
#if defined(SVR4) && defined(i386) && !defined(sun)
-#if defined(LBX) && 0
- /*
- * For LBX connections, we can get a valid EWOULDBLOCK
- * There is probably a better way of distinguishing LBX
- * connections, but this works. (DHD)
- */
- extern int LbxRead();
- if (oc->Read == LbxRead)
-#else
if (0)
#endif
-#endif
{
YieldControlNoInput();
return 0;
@@ -610,18 +571,6 @@ ResetCurrentRequest(ClientPtr client)
int fd = oc->fd;
register xReq *request;
int gotnow, needed;
-#ifdef LBX
- LbxClientPtr lbxClient = LbxClient(client);
-
- if (lbxClient) {
- LbxSetForBlock(lbxClient);
- if (!oci) {
- AppendFakeRequest(client,
- client->requestBuffer, client->req_len << 2);
- return;
- }
- }
-#endif
if (AvailableInput == oc)
AvailableInput = (OsCommPtr)NULL;
oci->lenLastReq = 0;
@@ -851,9 +800,6 @@ FlushAllOutput(void)
continue;
oc = (OsCommPtr)client->osPrivate;
if (
-#ifdef LBX
- !oc->proxy &&
-#endif
FD_ISSET(oc->fd, &ClientsWithInput))
{
FD_SET(oc->fd, &OutputPending); /* set the bit again */
@@ -875,9 +821,6 @@ FlushAllOutput(void)
continue;
oc = (OsCommPtr)client->osPrivate;
if (
-#ifdef LBX
- !oc->proxy &&
-#endif
FD_ISSET(oc->fd, &ClientsWithInput))
{
FD_SET(oc->fd, &newOutputPending); /* set the bit again */
@@ -1055,22 +998,8 @@ WriteToClient (ClientPtr who, int count, char *buf)
*
**********************/
-#ifdef LBX
-#ifdef LBX_NEED_OLD_SYMBOL_FOR_LOADABLES
-#undef FlushClient
-int
-FlushClient(ClientPtr who, OsCommPtr oc, char *extraBuf, int extraCount)
-{
- return (*oc->Flush)(who, oc, extraBuf, extraCount);
-}
-#endif
-int
-StandardFlushClient(ClientPtr who, OsCommPtr oc,
- char *extraBuf, int extraCount)
-#else
int
FlushClient(ClientPtr who, OsCommPtr oc, char *extraBuf, int extraCount)
-#endif
{
ConnectionOutputPtr oco = oc->output;
int connection = oc->fd;
@@ -1274,9 +1203,6 @@ AllocateOutputBuffer(void)
}
oco->size = BUFSIZE;
oco->count = 0;
-#ifdef LBX
- oco->nocompress = FALSE;
-#endif
return oco;
}
@@ -1318,12 +1244,6 @@ FreeOsBuffers(OsCommPtr oc)
oco->count = 0;
}
}
-#ifdef LBX
- if ((oci = oc->largereq)) {
- xfree(oci->buffer);
- xfree(oci);
- }
-#endif
}
void
diff --git a/nx-X11/programs/Xserver/os/osdep.h b/nx-X11/programs/Xserver/os/osdep.h
index e0c5de3a8..acf832e1c 100644
--- a/nx-X11/programs/Xserver/os/osdep.h
+++ b/nx-X11/programs/Xserver/os/osdep.h
@@ -143,9 +143,6 @@ typedef struct _connectionOutput {
int size;
unsigned char *buf;
int count;
-#ifdef LBX
- Bool nocompress;
-#endif
} ConnectionOutput, *ConnectionOutputPtr;
#ifdef K5AUTH
@@ -158,10 +155,6 @@ typedef struct _k5_state {
} k5_state;
#endif
-#ifdef LBX
-typedef struct _LbxProxy *OsProxyPtr;
-#endif
-
struct _osComm;
#define AuthInitArgs void
@@ -202,33 +195,14 @@ typedef struct _osComm {
#endif
CARD32 conn_time; /* timestamp if not established, else 0 */
struct _XtransConnInfo *trans_conn; /* transport connection object */
-#ifdef LBX
- OsProxyPtr proxy;
- ConnectionInputPtr largereq;
- OsCloseFunc Close;
- OsFlushFunc Flush;
-#endif
} OsCommRec, *OsCommPtr;
-#ifdef LBX
-#define FlushClient(who, oc, extraBuf, extraCount) \
- (*(oc)->Flush)(who, oc, extraBuf, extraCount)
-extern int StandardFlushClient(
- ClientPtr /*who*/,
- OsCommPtr /*oc*/,
- char* /*extraBuf*/,
- int /*extraCount*/
-);
-extern int LbxFlushClient(ClientPtr /*who*/, OsCommPtr /*oc*/,
- char * /*extraBuf*/, int /*extraCount*/);
-#else
extern int FlushClient(
ClientPtr /*who*/,
OsCommPtr /*oc*/,
char* /*extraBuf*/,
int /*extraCount*/
);
-#endif
extern void FreeOsBuffers(
OsCommPtr /*oc*/
diff --git a/nx-X11/programs/Xserver/os/utils.c b/nx-X11/programs/Xserver/os/utils.c
index 84cd3b575..d85ab83c8 100644
--- a/nx-X11/programs/Xserver/os/utils.c
+++ b/nx-X11/programs/Xserver/os/utils.c
@@ -171,9 +171,6 @@ Bool noDPMSExtension = FALSE;
#ifdef GLXEXT
Bool noGlxExtension = FALSE;
#endif
-#ifdef LBX
-Bool noLbxExtension = FALSE;
-#endif
#ifdef SCREENSAVER
Bool noScreenSaverExtension = FALSE;
#endif