server: add PID race condition disclaimer to wl_client_get_credentials
authorSimon Ser <contact@emersion.fr>
Tue, 31 May 2022 17:23:38 +0000 (19:23 +0200)
committerSimon Ser <contact@emersion.fr>
Wed, 15 Jun 2022 07:57:12 +0000 (07:57 +0000)
PIDs are re-used and cannot be used to reliably check the identity of
a Wayland client.

Signed-off-by: Simon Ser <contact@emersion.fr>
src/wayland-server.c

index 732f153..4bcc9ae 100644 (file)
@@ -578,6 +578,9 @@ err_client:
  * SO_PEERCRED, on the client socket fd.  All the pointers can be
  * NULL, if the caller is not interested in a particular ID.
  *
+ * Note, process IDs are subject to race conditions and are not a reliable way
+ * to identify a client.
+ *
  * Be aware that for clients that a compositor forks and execs and
  * then connects using socketpair(), this function will return the
  * credentials for the compositor.  The credentials for the socketpair