Am 08.12.2015 19:55, schrieb Adam Jackson:
> 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.
>
> Signed-off-by: Adam Jackson <[email protected]>
> ---
> os/access.c | 19 ++++++++++++++++---
> 1 file changed, 16 insertions(+), 3 deletions(-)
>
> diff --git a/os/access.c b/os/access.c
> index 10a48c3..f9619ae 100644
> --- a/os/access.c
> +++ b/os/access.c
> @@ -1081,9 +1081,8 @@ ResetHosts(const char *display)
> }
> }
>
> -/* Is client on the local host */
> -Bool
> -ComputeLocalClient(ClientPtr client)
> +static Bool
> +xtransLocalClient(ClientPtr client)
> {
> int alen, family, notused;
> Xtransaddr *from = NULL;
> @@ -1116,6 +1115,20 @@ ComputeLocalClient(ClientPtr client)
> return FALSE;
> }
>
unfortunately, that means if my client is called
"the_exceptional_secure_shell" it would break, right ?
there i would ask, could that be made on option ?
(default value e.g. ssh) other programms may benefit
also.
re,
wh
> +/* Is client on the local host */
> +Bool
> +ComputeLocalClient(ClientPtr client)
> +{
> + if (!xtransLocalClient(client))
> + return FALSE;
> +
> + if (client->clientIds)
> + if (!strncmp(client->clientIds->cmdname, "ssh", 3))
> + return FALSE;
> +
> + return TRUE;
> +}
> +
> /*
> * Return the uid and all gids of a connected local client
> * Allocates a LocalClientCredRec - caller must call FreeLocalClientCreds
_______________________________________________
[email protected]: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel