dix: When pairing, only check for access right if client is set.
If the pairing client is not set, then the pairing is initiated internally (e.g. when a new keyboard device is configured). In this case we _must_ pair regardless of who is the pairing client.
This commit is contained in:
parent
ab88cb8d2e
commit
ff2351246d
|
@ -2184,6 +2184,9 @@ ProcQueryKeymap(ClientPtr client)
|
||||||
|
|
||||||
/* Pair the keyboard to the pointer device. Keyboard events will follow the
|
/* Pair the keyboard to the pointer device. Keyboard events will follow the
|
||||||
* pointer sprite.
|
* pointer sprite.
|
||||||
|
* If the client is set, the request to pair comes from some client. In this
|
||||||
|
* case, we need to check for access. If the client is NULL, it's from an
|
||||||
|
* internal automatic pairing, we must always permit this.
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
PairDevices(ClientPtr client, DeviceIntPtr ptr, DeviceIntPtr kbd)
|
PairDevices(ClientPtr client, DeviceIntPtr ptr, DeviceIntPtr kbd)
|
||||||
|
@ -2193,7 +2196,7 @@ PairDevices(ClientPtr client, DeviceIntPtr ptr, DeviceIntPtr kbd)
|
||||||
|
|
||||||
if (!pairingClient)
|
if (!pairingClient)
|
||||||
RegisterPairingClient(client);
|
RegisterPairingClient(client);
|
||||||
else if (pairingClient != client)
|
else if (client && pairingClient != client)
|
||||||
return BadAccess;
|
return BadAccess;
|
||||||
|
|
||||||
if (kbd->spriteInfo->spriteOwner)
|
if (kbd->spriteInfo->spriteOwner)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user