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

Michel Dänzer michel at daenzer.net
Wed Dec 16 23:45:35 PST 2015


On 12.12.2015 22:23, Mark Kettenis wrote:
>>
>> @@ -1116,6 +1116,27 @@ ComputeLocalClient(ClientPtr client)
>>      return FALSE;
>>  }
>>  
>> +/* Is client on the local host */
>> +Bool
>> +ComputeLocalClient(ClientPtr client)
>> +{
>> +    if (!xtransLocalClient(client))
>> +        return FALSE;
>> +
>> +#ifndef WIN32
>> +    /* If the executable name is "ssh", consider this client not local */
>> +    if (client->clientIds->cmdname) {
> 
> Isn't it better to use GetClientCmdName() here to keep avoid a
> potential null-pointer dereference?  Actually include/client.h tells
> you you shuld ;).

You're right, fixed in v3.


-- 
Earthling Michel Dänzer               |               http://www.amd.com
Libre software enthusiast             |             Mesa and X developer


More information about the xorg-devel mailing list