[PATCH 36/37] Remove LocalClient checks from local-only extensions
Daniel Stone
daniel at fooishbar.org
Tue Jun 28 12:27:52 PDT 2011
We already hide the extension from clients and deny their requests, so I
doubt we'll be needing the LocalClient() check anymore.
Signed-off-by: Daniel Stone <daniel at fooishbar.org>
---
hw/kdrive/ephyr/ephyrdriext.c | 9 +--------
hw/xfree86/common/xf86DGA.c | 3 ---
hw/xfree86/dri/xf86dri.c | 9 +--------
hw/xfree86/dri2/dri2ext.c | 6 ------
hw/xquartz/applewm.c | 11 -----------
hw/xquartz/xpr/appledri.c | 14 --------------
6 files changed, 2 insertions(+), 50 deletions(-)
diff --git a/hw/kdrive/ephyr/ephyrdriext.c b/hw/kdrive/ephyr/ephyrdriext.c
index 38335c4..ced483e 100644
--- a/hw/kdrive/ephyr/ephyrdriext.c
+++ b/hw/kdrive/ephyr/ephyrdriext.c
@@ -588,7 +588,7 @@ ProcXF86DRIQueryDirectRenderingCapable (register ClientPtr client)
}
rep.isCapable = isCapable;
- if (!LocalClient(client) || client->swapped)
+ if (client->swapped)
rep.isCapable = 0;
if (client->swapped) {
@@ -1253,13 +1253,6 @@ ProcXF86DRIDispatch (register ClientPtr client)
EPHYR_LOG ("leave\n") ;
return ProcXF86DRIQueryDirectRenderingCapable(client);
}
- }
-
- if (!LocalClient(client))
- return DRIErrorBase + XF86DRIClientNotLocal;
-
- switch (stuff->data)
- {
case X_XF86DRIOpenConnection: {
EPHYR_LOG ("leave\n") ;
return ProcXF86DRIOpenConnection(client);
diff --git a/hw/xfree86/common/xf86DGA.c b/hw/xfree86/common/xf86DGA.c
index 1661106..a3f4334 100644
--- a/hw/xfree86/common/xf86DGA.c
+++ b/hw/xfree86/common/xf86DGA.c
@@ -2136,9 +2136,6 @@ ProcXDGADispatch (ClientPtr client)
{
REQUEST(xReq);
- if (!LocalClient(client))
- return DGAErrorBase + XF86DGAClientNotLocal;
-
#ifdef DGA_REQ_DEBUG
if (stuff->data <= X_XDGACreateColormap)
fprintf (stderr, " DGA %s\n", dgaMinor[stuff->data]);
diff --git a/hw/xfree86/dri/xf86dri.c b/hw/xfree86/dri/xf86dri.c
index 740c83b..660330e 100644
--- a/hw/xfree86/dri/xf86dri.c
+++ b/hw/xfree86/dri/xf86dri.c
@@ -132,7 +132,7 @@ ProcXF86DRIQueryDirectRenderingCapable(
}
rep.isCapable = isCapable;
- if (!LocalClient(client) || client->swapped)
+ if (client->swapped)
rep.isCapable = 0;
if (client->swapped) {
@@ -557,13 +557,6 @@ ProcXF86DRIDispatch (
return ProcXF86DRIQueryVersion(client);
case X_XF86DRIQueryDirectRenderingCapable:
return ProcXF86DRIQueryDirectRenderingCapable(client);
- }
-
- if (!LocalClient(client))
- return DRIErrorBase + XF86DRIClientNotLocal;
-
- switch (stuff->data)
- {
case X_XF86DRIOpenConnection:
return ProcXF86DRIOpenConnection(client);
case X_XF86DRICloseConnection:
diff --git a/hw/xfree86/dri2/dri2ext.c b/hw/xfree86/dri2/dri2ext.c
index 2734748..43e2a04 100644
--- a/hw/xfree86/dri2/dri2ext.c
+++ b/hw/xfree86/dri2/dri2ext.c
@@ -544,12 +544,6 @@ ProcDRI2Dispatch (ClientPtr client)
switch (stuff->data) {
case X_DRI2QueryVersion:
return ProcDRI2QueryVersion(client);
- }
-
- if (!LocalClient(client))
- return BadRequest;
-
- switch (stuff->data) {
case X_DRI2Connect:
return ProcDRI2Connect(client);
case X_DRI2Authenticate:
diff --git a/hw/xquartz/applewm.c b/hw/xquartz/applewm.c
index 6aa6421..e3b7e5e 100644
--- a/hw/xquartz/applewm.c
+++ b/hw/xquartz/applewm.c
@@ -629,13 +629,6 @@ ProcAppleWMDispatch (
{
case X_AppleWMQueryVersion:
return ProcAppleWMQueryVersion(client);
- }
-
- if (!LocalClient(client))
- return WMErrorBase + AppleWMClientNotLocal;
-
- switch (stuff->data)
- {
case X_AppleWMSelectInput:
return ProcAppleWMSelectInput(client);
case X_AppleWMDisableUpdate:
@@ -694,10 +687,6 @@ SProcAppleWMDispatch (
{
REQUEST(xReq);
- /* It is bound to be non-local when there is byte swapping */
- if (!LocalClient(client))
- return WMErrorBase + AppleWMClientNotLocal;
-
/* only local clients are allowed WM access */
switch (stuff->data)
{
diff --git a/hw/xquartz/xpr/appledri.c b/hw/xquartz/xpr/appledri.c
index 8149cd1..9df717c 100644
--- a/hw/xquartz/xpr/appledri.c
+++ b/hw/xquartz/xpr/appledri.c
@@ -131,9 +131,6 @@ ProcAppleDRIQueryDirectRenderingCapable(
}
rep.isCapable = isCapable;
- if (!LocalClient(client))
- rep.isCapable = 0;
-
WriteToClient(client,
sizeof(xAppleDRIQueryDirectRenderingCapableReply), (char *)&rep);
return Success;
@@ -331,13 +328,6 @@ ProcAppleDRIDispatch (
return ProcAppleDRIQueryVersion(client);
case X_AppleDRIQueryDirectRenderingCapable:
return ProcAppleDRIQueryDirectRenderingCapable(client);
- }
-
- if (!LocalClient(client))
- return DRIErrorBase + AppleDRIClientNotLocal;
-
- switch (stuff->data)
- {
case X_AppleDRIAuthConnection:
return ProcAppleDRIAuthConnection(client);
case X_AppleDRICreateSurface:
@@ -385,10 +375,6 @@ SProcAppleDRIDispatch (
{
REQUEST(xReq);
- /* It is bound to be non-local when there is byte swapping */
- if (!LocalClient(client))
- return DRIErrorBase + AppleDRIClientNotLocal;
-
/* only local clients are allowed DRI access */
switch (stuff->data)
{
--
1.7.5.4
More information about the xorg-devel
mailing list