[PATCH] os: Treat ssh as a non-local client

Adam Jackson ajax at nwnk.net
Tue Dec 8 11:00:58 PST 2015


On Tue, 2015-12-08 at 13:55 -0500, Adam Jackson wrote:
> By the time we get to ComputeLocalClient, we've already done
> NextAvailableClient → ReserveClientIds → DetermineClientCmd (assuming
> we're built with #define CLIENTIDS), so we can look up the name of the
> client process and refuse to treat ssh's X forwarding as if it were
> local.

I have actually tested this by running xdpyinfo through ssh to Xvfb,
the result looks like:

Breakpoint 1, ProcQueryExtension (client=0x1ca1e20) at extension.c:253
253	    REQUEST_FIXED_SIZE(xQueryExtensionReq, stuff->nbytes);
(gdb) p *client->clientIds
$1 = {pid = 15888, 
  cmdname = 0x1f957f0 "ssh: /run/user/1000/ssh-control-ajax at localhost:22 [mux", cmdargs = 0x0}
(gdb) p client->local
$2 = 0

Or, with ssh -S none:

Breakpoint 1, ProcQueryExtension (client=0x1ca1e20) at extension.c:253
253	    REQUEST_FIXED_SIZE(xQueryExtensionReq, stuff->nbytes);
(gdb) p *client->clientIds
$1 = {pid = 16366, cmdname = 0x1f95910 "ssh", 
  cmdargs = 0x1f95930 "-S none -Y localhost"}
(gdb) p client->local
$2 = 0

- ajax


More information about the xorg-devel mailing list