qemu/io
Anthony Harivel 95fa0c79a0 qio: add support for SO_PEERCRED for socket channel
The function qio_channel_get_peercred() returns a pointer to the
credentials of the peer process connected to this socket.

This credentials structure is defined in <sys/socket.h> as follows:

struct ucred {
	pid_t pid;    /* Process ID of the sending process */
	uid_t uid;    /* User ID of the sending process */
	gid_t gid;    /* Group ID of the sending process */
};

The use of this function is possible only for connected AF_UNIX stream
sockets and for AF_UNIX stream and datagram socket pairs.

On platform other than Linux, the function return 0.

Signed-off-by: Anthony Harivel <aharivel@redhat.com>
Link: https://lore.kernel.org/r/20240522153453.1230389-2-aharivel@redhat.com
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2024-07-22 13:47:41 +02:00
..
channel-buffer.c io: Add support for MSG_PEEK for socket channel 2023-02-06 19:22:56 +01:00
channel-command.c io: follow coroutine AioContext in qio_channel_yield() 2023-09-07 20:32:11 -05:00
channel-file.c io: Stop using qemu_open_old in channel-file 2024-06-21 09:47:22 -03:00
channel-null.c io: follow coroutine AioContext in qio_channel_yield() 2023-09-07 20:32:11 -05:00
channel-socket.c qio: add support for SO_PEERCRED for socket channel 2024-07-22 13:47:41 +02:00
channel-tls.c qio: Inherit follow_coroutine_ctx across TLS 2024-05-29 18:30:31 -05:00
channel-util.c io: follow coroutine AioContext in qio_channel_yield() 2023-09-07 20:32:11 -05:00
channel-watch.c win32: avoid mixing SOCKET and file descriptor space 2023-03-13 15:39:31 +04:00
channel-websock.c qio: Inherit follow_coroutine_ctx across TLS 2024-05-29 18:30:31 -05:00
channel.c qio: add support for SO_PEERCRED for socket channel 2024-07-22 13:47:41 +02:00
dns-resolver.c build-sys: add HAVE_IPPROTO_MPTCP 2021-09-30 15:30:25 +02:00
meson.build Revert "meson: Propagate gnutls dependency" 2024-07-03 18:41:26 +02:00
net-listener.c io: Stop appending -listen to net listeners 2023-11-07 14:54:56 +00:00
task.c io: Fix Lesser GPL version number 2020-10-29 09:57:37 +00:00
trace-events io: add trace event when cancelling TLS handshake 2024-02-09 12:50:31 +00:00
trace.h trace: switch position of headers to what Meson requires 2020-08-21 06:18:24 -04:00