wayland-server: log an error for events with wrong client objects
authorDerek Foreman <derekf@osg.samsung.com>
Tue, 24 Jan 2017 18:07:21 +0000 (12:07 -0600)
committerPekka Paalanen <pekka.paalanen@collabora.co.uk>
Wed, 25 Jan 2017 12:59:02 +0000 (14:59 +0200)
commitde908658945ef8e13b27b32a7a69f14b3f9356df
tree97fa9babfbf00698b99e6fc98a56a9bd4d942734
parentefae9532e82e1faeb737fe0d3cf5932026ce1e6f
wayland-server: log an error for events with wrong client objects

Check that all the objects in an event belong to the same client as
the resource posting it.  This prevents a compositor from accidentally
mixing client objects and posting an event that causes a client to
abort with a cryptic message.

Instead the client will now be disconnected as it is when the compositor
tries to send a null for a non-nullable object, and a log message
will be printed by the compositor.

Reviewed-by: Yong Bakos <ybakos@humanoriented.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
src/wayland-server.c