virtiofsd: use /proc/self/fd/ O_PATH file descriptor
commit9f59d175e2ca96f0b87f534dba69ea547dd35945
authorStefan Hajnoczi <stefanha@redhat.com>
Tue, 12 Mar 2019 15:48:50 +0000 (12 15:48 +0000)
committerDr. David Alan Gilbert <dgilbert@redhat.com>
Thu, 23 Jan 2020 16:41:36 +0000 (23 16:41 +0000)
tree452aeb234fbf8b3cd70e38c93edf6149feb12d58
parent752272da2b68a2312f0e11fc5303015a6c3ee1ac
virtiofsd: use /proc/self/fd/ O_PATH file descriptor

Sandboxing will remove /proc from the mount namespace so we can no
longer build string paths into "/proc/self/fd/...".

Keep an O_PATH file descriptor so we can still re-open fds via
/proc/self/fd.

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
tools/virtiofsd/passthrough_ll.c