diff options
author | Peter Hutterer <peter@cs.unisa.edu.au> | 2007-10-05 12:19:03 +0930 |
---|---|---|
committer | Peter Hutterer <peter@cs.unisa.edu.au> | 2007-10-05 12:19:40 +0930 |
commit | ff2351246da30b56a3a8f90654993c41b8eb3921 (patch) | |
tree | e1626a76d09574194124dcda0d4e7beeb351332f | |
parent | ab88cb8d2e7c1410f9ed2be928b38f176b132e11 (diff) |
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.
-rw-r--r-- | dix/devices.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/dix/devices.c b/dix/devices.c index 24eaa4b1d..7cf82eead 100644 --- a/dix/devices.c +++ b/dix/devices.c @@ -2184,6 +2184,9 @@ ProcQueryKeymap(ClientPtr client) /* Pair the keyboard to the pointer device. Keyboard events will follow the * 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 PairDevices(ClientPtr client, DeviceIntPtr ptr, DeviceIntPtr kbd) @@ -2193,7 +2196,7 @@ PairDevices(ClientPtr client, DeviceIntPtr ptr, DeviceIntPtr kbd) if (!pairingClient) RegisterPairingClient(client); - else if (pairingClient != client) + else if (client && pairingClient != client) return BadAccess; if (kbd->spriteInfo->spriteOwner) |