dri3: Refuse to work for remote clients (v2)

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)

Reviewed-by: Keith Packard <keithp@keithp.com>
This commit is contained in:
Michel Dänzer 2015-12-08 12:52:17 +09:00 committed by Michel Dänzer
parent 6070a749d9
commit 43eb5b6047
1 changed files with 4 additions and 0 deletions

View File

@ -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);