[PATCH xserver 2/2] dri3: Refuse to work for remote clients (v2)

Michel Dänzer michel at daenzer.net
Thu Jan 28 01:55:50 PST 2016


From: Michel Dänzer <michel.daenzer at amd.com>

Prevents clients forwarded via SSH from hanging while waiting for the
reply from the DRI3Open request.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=93261

v2: Return BadMatch instead of BadRequest (Keith Packard)
Signed-off-by: Michel Dänzer <michel.daenzer at amd.com>
---
 dri3/dri3_request.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/dri3/dri3_request.c b/dri3/dri3_request.c
index 2d75588..2b36221 100644
--- a/dri3/dri3_request.c
+++ b/dri3/dri3_request.c
@@ -312,6 +312,8 @@ int
 proc_dri3_dispatch(ClientPtr client)
 {
     REQUEST(xReq);
+    if (!client->local)
+        return BadMatch;
     if (stuff->data >= DRI3NumberRequests || !proc_dri3_vector[stuff->data])
         return BadRequest;
     return (*proc_dri3_vector[stuff->data]) (client);
@@ -405,6 +407,8 @@ int
 sproc_dri3_dispatch(ClientPtr client)
 {
     REQUEST(xReq);
+    if (!client->local)
+        return BadMatch;
     if (stuff->data >= DRI3NumberRequests || !sproc_dri3_vector[stuff->data])
         return BadRequest;
     return (*sproc_dri3_vector[stuff->data]) (client);
-- 
2.7.0



More information about the xorg-devel mailing list