[RFC,xserver] dri3: Refuse to work for remote clients

Submitted by Michel Dänzer on Dec. 8, 2015, 9:20 a.m.

Details

Message ID 1449566410-16516-1-git-send-email-michel@daenzer.net
State Superseded
Headers show
Series "dri3: Refuse to work for remote clients" ( rev: 1 ) in X.org

Not browsing as part of any series.

Commit Message

Michel Dänzer Dec. 8, 2015, 9:20 a.m.
From: Michel Dänzer <michel.daenzer@amd.com>

---

Unfortunately, this doesn't help for DRI3 clients hanging waiting for the
reply from the DRI3Open request with display connections forwarded via
SSH (see https://bugs.freedesktop.org/show_bug.cgi?id=93261), because the
SSH proxy client appears local to the X server. This is an attempt to
gather ideas for how that problem should be addressed.

 dri3/dri3_request.c | 4 ++++
 1 file changed, 4 insertions(+)

Patch hide | download patch | download mbox

diff --git a/dri3/dri3_request.c b/dri3/dri3_request.c
index 2d75588..73d1b53 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 BadRequest;
     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 BadRequest;
     if (stuff->data >= DRI3NumberRequests || !sproc_dri3_vector[stuff->data])
         return BadRequest;
     return (*sproc_dri3_vector[stuff->data]) (client);