summaryrefslogtreecommitdiff
path: root/Xi/xisetclientpointer.c
diff options
context:
space:
mode:
authorEamon Walsh <ewalsh@tycho.nsa.gov>2009-06-18 21:41:17 -0400
committerEamon Walsh <ewalsh@tycho.nsa.gov>2009-06-23 20:50:29 -0400
commit00bc8d34c68dab6c818cd1c7e03e9992d1d0cbfc (patch)
treea9d3ddac21d3be7068e16b0b31fc40a4ea75199a /Xi/xisetclientpointer.c
parent119b96667778391436998c76a68bf64e746c9e08 (diff)
Xi: check for Use permission on the device in SetClientPointer().
Presumably, some intelligent, XI2-aware management app will be calling XISetClientPointer on behalf of other clients; this check makes sure the target client has permission on the device. Requires changing the prototype to return status code instead of Bool. Signed-off-by: Eamon Walsh <ewalsh@tycho.nsa.gov> Acked-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'Xi/xisetclientpointer.c')
-rw-r--r--Xi/xisetclientpointer.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/Xi/xisetclientpointer.c b/Xi/xisetclientpointer.c
index 273618503..09db8ff75 100644
--- a/Xi/xisetclientpointer.c
+++ b/Xi/xisetclientpointer.c
@@ -98,10 +98,11 @@ ProcXISetClientPointer(ClientPtr client)
} else
targetClient = client;
- if (!SetClientPointer(targetClient, pDev))
+ rc = SetClientPointer(targetClient, pDev);
+ if (rc != Success)
{
client->errorValue = stuff->deviceid;
- return BadDevice;
+ return rc;
}
return Success;