Add SCM_RIGHTS support to unix socket character devices
commitf8f8e7e6ddd1928f9c75f989728afb4c2dc27bea
authorMark McLoughlin <markmc@redhat.com>
Wed, 22 Jul 2009 08:11:39 +0000 (22 09:11 +0100)
committerAnthony Liguori <aliguori@us.ibm.com>
Wed, 29 Jul 2009 16:47:09 +0000 (29 11:47 -0500)
treeb15e972104b31fb91e74405609fed34cfcad0169
parent58cc6b7a5a664b83022f234458b50a0f263a6e03
Add SCM_RIGHTS support to unix socket character devices

If a file descriptor is passed via a message with SCM_RIGHTS ancillary
data on a unix socket, store the file descriptor for use in the
chr_read() handler. Close the file descriptor if it was not used.

The qemu_chr_get_msgfd() API provides access to the passed descriptor.

Signed-off-by: Mark McLoughlin <markmc@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
qemu-char.c
qemu-char.h