server: add PID race condition disclaimer to wl_client_get_credentials

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>
This commit is contained in:
Simon Ser 2022-05-31 19:23:38 +02:00
parent 2fb4cdebbe
commit 7eb00b070d

View 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