server: Add an API to get the file descriptor for a client
authorSung-Jin Park <input.hacker@gmail.com>
Thu, 14 Jan 2016 07:03:43 +0000 (16:03 +0900)
committerBryce Harrington <bryce@osg.samsung.com>
Tue, 19 Jan 2016 22:52:54 +0000 (14:52 -0800)
commiteb52bb8e14f4d1ed3564abbb48ef3ddd28b115c0
tree2877a7e3e9afe34340c158fb3e3785d1ba43d708
parent7ed00c1de77afbab23f4908fbd9d60ec070c209b
server: Add an API to get the file descriptor for a client

This adds an API to get the file descriptor for a client.
The client file descriptor can be used for a wayland compositor to validate
a request from a client if there are any additional information provided from
the client's file descriptor.

For instance, this will be helpful in some linux distributions, in which SELinux
or SMACK is enabled. In those environments, each file (including socket) will have
each security contexts in its inode as xattr member variable. A wayland compositor
can validate a client request by getting the file descriptor of the client and
by checking the security contexts associated with the file descriptor.

Signed-off-by: Sung-Jin Park <input.hacker@gmail.com>
src/connection.c
src/wayland-private.h
src/wayland-server-core.h
src/wayland-server.c