meson.build: drop duplicate 'sparc64' entry
[qemu/ar7.git] / docs / tools / virtfs-proxy-helper.rst
blob6cdeedf8e93ddd93190153871dd67d235a8069cc
1 QEMU 9p virtfs proxy filesystem helper
2 ======================================
4 Synopsis
5 --------
7 **virtfs-proxy-helper** [*OPTIONS*]
9 Description
10 -----------
12 Pass-through security model in QEMU 9p server needs root privilege to do
13 few file operations (like chown, chmod to any mode/uid:gid).  There are two
14 issues in pass-through security model:
16 - TOCTTOU vulnerability: Following symbolic links in the server could
17   provide access to files beyond 9p export path.
19 - Running QEMU with root privilege could be a security issue.
21 To overcome above issues, following approach is used: A new filesystem
22 type 'proxy' is introduced. Proxy FS uses chroot + socket combination
23 for securing the vulnerability known with following symbolic links.
24 Intention of adding a new filesystem type is to allow qemu to run
25 in non-root mode, but doing privileged operations using socket IO.
27 Proxy helper (a stand alone binary part of qemu) is invoked with
28 root privileges. Proxy helper chroots into 9p export path and creates
29 a socket pair or a named socket based on the command line parameter.
30 QEMU and proxy helper communicate using this socket. QEMU proxy fs
31 driver sends filesystem request to proxy helper and receives the
32 response from it.
34 The proxy helper is designed so that it can drop root privileges except
35 for the capabilities needed for doing filesystem operations.
37 Options
38 -------
40 The following options are supported:
42 .. program:: virtfs-proxy-helper
44 .. option:: -h
46   Display help and exit
48 .. option:: -p, --path PATH
50   Path to export for proxy filesystem driver
52 .. option:: -f, --fd SOCKET_ID
54   Use given file descriptor as socket descriptor for communicating with
55   qemu proxy fs drier. Usually a helper like libvirt will create
56   socketpair and pass one of the fds as parameter to this option.
58 .. option:: -s, --socket SOCKET_FILE
60   Creates named socket file for communicating with qemu proxy fs driver
62 .. option:: -u, --uid UID
64   uid to give access to named socket file; used in combination with -g.
66 .. option:: -g, --gid GID
68   gid to give access to named socket file; used in combination with -u.
70 .. option:: -n, --nodaemon
72   Run as a normal program. By default program will run in daemon mode