David Marchand 09c2856301 vhost: validate FDs attached to messages
Some message handlers do not expect any file descriptor attached as
ancillary data.
Provide a common way to enforce this by adding a accepts_fd boolean in
the message handler structure. When a message handler sets accepts_fd to
true, it is responsible for calling validate_msg_fds with a right
expected file descriptor count.
This will avoid leaking some file descriptor by mistake when adding
support for new vhost user message types.

Signed-off-by: David Marchand <david.marchand@redhat.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
2022-05-09 21:39:58 +02:00
..
2022-02-22 14:47:49 +01:00
2021-08-17 08:37:52 +02:00
2022-02-22 14:47:41 +01:00
2022-02-27 18:58:47 +01:00
2022-03-15 02:14:27 +01:00
2022-02-22 13:10:39 +01:00
2022-02-22 13:10:39 +01:00
2021-10-24 13:37:43 +02:00
2022-02-22 13:10:39 +01:00
2022-02-22 14:47:49 +01:00
2022-02-22 13:10:39 +01:00
2022-02-22 13:10:39 +01:00
2021-08-17 08:37:52 +02:00
2022-02-22 14:47:49 +01:00
2022-02-22 13:10:39 +01:00
2022-02-22 13:10:39 +01:00
2022-02-22 13:10:39 +01:00
2022-02-22 13:10:39 +01:00
2022-02-22 13:10:39 +01:00
2022-02-22 13:10:39 +01:00
2022-02-22 13:10:39 +01:00