From 1e460026783e5058778216d43e30c6d3a5cec2a5 Mon Sep 17 00:00:00 2001 From: Mike Swanson Date: Mon, 2 Sep 2024 16:26:36 -0700 Subject: [PATCH] network: vde_switch does not require root Just a bit of erronous documentation. VDE's whole purpose was to run a networking stack as a user without requiring root; vde_switch defaults to setting the UID/GID of the socket to the user that initiated it with mode 0600: plenty good enough for most users (and 86Box usage). The default socket directory is already /tmp/vde.ctl, too, but might as well keep it in the documentation here so that it's more obvious to change. --- hardware/network.rst | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/hardware/network.rst b/hardware/network.rst index bb6b8cd..915adfd 100644 --- a/hardware/network.rst +++ b/hardware/network.rst @@ -96,18 +96,15 @@ Creating the virtual switch Before connecting 86Box, a virtual switch must be created with the ``vde_switch`` tool. -.. note:: ``vde_switch`` requires root privileges to *create* the switch. Applications will be able to connect to the switch with unprivileged (non-root) permissions. - .. code-block:: shell - vde_switch --mode 666 --numports 8 --mgmt /tmp/vde.mgmt --mgmtmode 666 -s /tmp/vde.ctl + vde_switch --numports 8 --mgmt /tmp/vde.mgmt -s /tmp/vde.ctl This command: * Creates the *management* socket at ``/tmp/vde.mgmt`` * Creates the *control* socket at ``/tmp/vde.ctl`` -* Sets the sockets' permissions to world read/write to allow unprivileged access -* Sets the number of switch ports to 8 +* Sets the number of switch ports to 8 (default is 32) Adding ``--daemon`` to the command will run ``vde_switch`` in the background.