[PATCH xserver] Xext/shm: Refuse to work for remote clients
Adam Jackson
ajax at nwnk.net
Mon Jun 4 19:26:07 UTC 2018
On Mon, 2018-06-04 at 16:47 +0300, Alexander Volkov wrote:
> diff --git a/Xext/shm.c b/Xext/shm.c
> index fc8441c43..41ab0e2b6 100644
> --- a/Xext/shm.c
> +++ b/Xext/shm.c
> @@ -1302,6 +1302,10 @@ static int
> ProcShmDispatch(ClientPtr client)
> {
> REQUEST(xReq);
> +
> + if (!client->local)
> + return BadRequest;
> +
> switch (stuff->data) {
> case X_ShmQueryVersion:
> return ProcShmQueryVersion(client);
This check (and its mate in the swapped path) should follow the example
of DRI2, where we allow QueryVersion but nothing else. Client code
tends not to expect FooQueryVersion to throw an error. Cairo, for
example:
https://cgit.freedesktop.org/cairo/tree/src/cairo-xlib-surface-shm.c#n362
- ajax
More information about the xorg-devel
mailing list