aboutsummaryrefslogtreecommitdiffstats
path: root/src/connection.c
diff options
context:
space:
mode:
authorSung-Jin Park <input.hacker@gmail.com>2016-01-14 16:03:43 +0900
committerBryce Harrington <bryce@osg.samsung.com>2016-01-19 14:52:54 -0800
commiteb52bb8e14f4d1ed3564abbb48ef3ddd28b115c0 (patch)
tree2877a7e3e9afe34340c158fb3e3785d1ba43d708 /src/connection.c
parentconfigure.ac: bump to version 1.9.91 for the alpha release (diff)
downloadwayland-eb52bb8e14f4d1ed3564abbb48ef3ddd28b115c0.tar
wayland-eb52bb8e14f4d1ed3564abbb48ef3ddd28b115c0.tar.gz
wayland-eb52bb8e14f4d1ed3564abbb48ef3ddd28b115c0.tar.bz2
wayland-eb52bb8e14f4d1ed3564abbb48ef3ddd28b115c0.tar.lz
wayland-eb52bb8e14f4d1ed3564abbb48ef3ddd28b115c0.tar.xz
wayland-eb52bb8e14f4d1ed3564abbb48ef3ddd28b115c0.tar.zst
wayland-eb52bb8e14f4d1ed3564abbb48ef3ddd28b115c0.zip
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>
Diffstat (limited to 'src/connection.c')
-rw-r--r--src/connection.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/connection.c b/src/connection.c
index bc373f6..65b64e9 100644
--- a/src/connection.c
+++ b/src/connection.c
@@ -405,6 +405,12 @@ wl_message_count_arrays(const struct wl_message *message)
return arrays;
}
+int
+wl_connection_get_fd(struct wl_connection *connection)
+{
+ return connection->fd;
+}
+
static int
wl_connection_put_fd(struct wl_connection *connection, int32_t fd)
{