[PATCH xserver] os: Treat ssh as a non-local client (v3)

Adam Jackson ajax at nwnk.net
Tue Jan 12 10:43:45 PST 2016


On Thu, 2015-12-17 at 16:41 +0900, Michel Dänzer wrote:
> From: Adam Jackson <ajax at redhat.com>
> 
> 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.
> 
> v2: (Michel Dänzer)
>     * Only match "ssh" itself, not other executable names starting with
>       that prefix.
>     * Ignore executable path for the match.
> v3: (Michel Dänzer)
>     * Use GetClientCmdName (Mark Kettenis)
>     * Perform check on Windows as well, but only ignore path on Cygwin
>       (Martin Peres, Emil Velikov, Jon Turney)

But this doesn't work reliably, which is why I used strncmp in the
first place. See my original test report:

http://lists.freedesktop.org/archives/xorg-devel/2015-December/048164.html

Note that cmdname is not always "ssh".  Are we honestly concerned that
some client's name is prefixed with "ssh" and _isn't_ ssh or something
acting like it?

- ajax


More information about the xorg-devel mailing list