]> git.proxmox.com Git - qemu.git/commit - qemu-char.c
Add SCM_RIGHTS support to unix socket character devices
authorMark McLoughlin <markmc@redhat.com>
Wed, 22 Jul 2009 08:11:39 +0000 (09:11 +0100)
committerAnthony Liguori <aliguori@us.ibm.com>
Mon, 27 Jul 2009 13:39:28 +0000 (08:39 -0500)
commit7d1740590b6550b2b8ab4901e4f0b704d9733383
treef193c3ae6b89a9ed5b0c3609a73319ba77bdeb60
parent9977c8943a56b06908555ea6d1706142a3c9da4d
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