diff options
author | Michel Dänzer <michel.daenzer@amd.com> | 2015-12-08 12:52:17 +0900 |
---|---|---|
committer | Michel Dänzer <michel@daenzer.net> | 2016-03-01 11:59:51 +0900 |
commit | 43eb5b6047c9b35c337e553ec054f08bdc835abb (patch) | |
tree | 25029c9cfbd2a0d82289132f097d427d11618054 | |
parent | 6070a749d953951bacbfb149c5c36451293aad35 (diff) |
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>
-rw-r--r-- | dri3/dri3_request.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/dri3/dri3_request.c b/dri3/dri3_request.c index 2d7558863..2b3622148 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); |