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:
		
							parent
							
								
									6070a749d9
								
							
						
					
					
						commit
						43eb5b6047
					
				| 
						 | 
					@ -312,6 +312,8 @@ int
 | 
				
			||||||
proc_dri3_dispatch(ClientPtr client)
 | 
					proc_dri3_dispatch(ClientPtr client)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    REQUEST(xReq);
 | 
					    REQUEST(xReq);
 | 
				
			||||||
 | 
					    if (!client->local)
 | 
				
			||||||
 | 
					        return BadMatch;
 | 
				
			||||||
    if (stuff->data >= DRI3NumberRequests || !proc_dri3_vector[stuff->data])
 | 
					    if (stuff->data >= DRI3NumberRequests || !proc_dri3_vector[stuff->data])
 | 
				
			||||||
        return BadRequest;
 | 
					        return BadRequest;
 | 
				
			||||||
    return (*proc_dri3_vector[stuff->data]) (client);
 | 
					    return (*proc_dri3_vector[stuff->data]) (client);
 | 
				
			||||||
| 
						 | 
					@ -405,6 +407,8 @@ int
 | 
				
			||||||
sproc_dri3_dispatch(ClientPtr client)
 | 
					sproc_dri3_dispatch(ClientPtr client)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    REQUEST(xReq);
 | 
					    REQUEST(xReq);
 | 
				
			||||||
 | 
					    if (!client->local)
 | 
				
			||||||
 | 
					        return BadMatch;
 | 
				
			||||||
    if (stuff->data >= DRI3NumberRequests || !sproc_dri3_vector[stuff->data])
 | 
					    if (stuff->data >= DRI3NumberRequests || !sproc_dri3_vector[stuff->data])
 | 
				
			||||||
        return BadRequest;
 | 
					        return BadRequest;
 | 
				
			||||||
    return (*sproc_dri3_vector[stuff->data]) (client);
 | 
					    return (*sproc_dri3_vector[stuff->data]) (client);
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue