[PATCH 35/37] Ignore local-only requests from remote clients
Daniel Stone
daniel at fooishbar.org
Tue Jun 28 12:27:51 PDT 2011
Even though we hide local-only extensions from remote clients in the
extension list, make doubly sure they can't make a local-only request.
Signed-off-by: Daniel Stone <daniel at fooishbar.org>
---
dix/dispatch.c | 11 +++++++----
1 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/dix/dispatch.c b/dix/dispatch.c
index 192c8c3..835a4e4 100644
--- a/dix/dispatch.c
+++ b/dix/dispatch.c
@@ -427,10 +427,13 @@ Dispatch(void)
if (result > (maxBigRequestSize << 2))
result = BadLength;
else {
- result = XaceHookDispatch(client, MAJOROP);
- if (result == Success)
- result = (* client->requestVector[MAJOROP])(client);
- XaceHookAuditEnd(client, result);
+ ExtensionEntry *ext = GetExtensionEntry(MAJOROP);
+ if (!ext || !ext->localOnly || LocalClient(client)) {
+ result = XaceHookDispatch(client, MAJOROP);
+ if (result == Success)
+ result = (* client->requestVector[MAJOROP])(client);
+ XaceHookAuditEnd(client, result);
+ }
}
#ifdef XSERVER_DTRACE
XSERVER_REQUEST_DONE(LookupMajorName(MAJOROP), MAJOROP,
--
1.7.5.4
More information about the xorg-devel
mailing list