From d9eeede52f2d5ba9dd6368d988a5d2abb3b8b4e5 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Thu, 12 Jan 2012 12:09:59 -0800 Subject: Revert "dix: Pull client-is-local flag up to the ClientRec" This reverts commit 49d38b75c8f3276cfce33ffe6b8c4fbeb1081b96. ABI change pended for 1.13 --- os/access.c | 9 ++++++++- os/connection.c | 2 +- os/osdep.h | 1 + 3 files changed, 10 insertions(+), 2 deletions(-) (limited to 'os') diff --git a/os/access.c b/os/access.c index ed13d0a0d..b609442de 100644 --- a/os/access.c +++ b/os/access.c @@ -1045,6 +1045,13 @@ ComputeLocalClient(ClientPtr client) return FALSE; } +Bool LocalClient(ClientPtr client) +{ + if (!client->osPrivate) + return FALSE; + return ((OsCommPtr)client->osPrivate)->local_client; +} + /* * Return the uid and gid of a connected local client * @@ -1202,7 +1209,7 @@ AuthorizedClient(ClientPtr client) if (rc != Success) return rc; - return client->local ? Success : BadAccess; + return LocalClient(client) ? Success : BadAccess; } /* Add a host to the access control list. This is the external interface diff --git a/os/connection.c b/os/connection.c index e1b77bb48..0e557a544 100644 --- a/os/connection.c +++ b/os/connection.c @@ -745,7 +745,7 @@ AllocNewConnection (XtransConnInfo trans_conn, int fd, CARD32 conn_time) free(oc); return NullClient; } - client->local = ComputeLocalClient(client); + oc->local_client = ComputeLocalClient(client); #if !defined(WIN32) ConnectionTranslation[fd] = client->index; #else diff --git a/os/osdep.h b/os/osdep.h index 52d2eadd9..3f774c2ac 100644 --- a/os/osdep.h +++ b/os/osdep.h @@ -162,6 +162,7 @@ typedef struct _osComm { XID auth_id; /* authorization id */ CARD32 conn_time; /* timestamp if not established, else 0 */ struct _XtransConnInfo *trans_conn; /* transport connection object */ + Bool local_client; } OsCommRec, *OsCommPtr; extern int FlushClient( -- cgit v1.2.3