diff options
Diffstat (limited to 'nx-X11/programs/Xserver/os/connection.c')
-rw-r--r-- | nx-X11/programs/Xserver/os/connection.c | 167 |
1 files changed, 0 insertions, 167 deletions
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)) { |