From 593b34655b6e9dc3bacef0e458dd66f97ea86f3dd231fb4c277cc72384152fad Mon Sep 17 00:00:00 2001 From: Larry Finger Date: Mon, 1 Apr 2024 18:10:32 +0000 Subject: [PATCH] Accepting request 1163957 from home:javispedro:branches:Virtualization - Setting 0660 as permissions of /dev/vboxusb directory itself was preventing access to this directory by any non-root user, even if member of vboxusers. This results in VBox UI failing to enable USB passthrough. Fix issue by removing all the workarounds for /dev/vboxusb/* as they should no longer be required. I have verified that with this USB passhtrough works on today's TW (real machine), as well as Leap 15.5 (on a VM) and today's Leap 15.6 beta (unfortunately, I couldn't get a nested VM to work on 15.6 at all -- but with this fix the UI can enumerate USB devices at least). Without this fix, VBox always shows "VirtualBox is not currently allowed to access USB devices. You can change this by adding your user to vboxusers [....]", and the UI cannot enumerate USB devices at all. OBS-URL: https://build.opensuse.org/request/show/1163957 OBS-URL: https://build.opensuse.org/package/show/Virtualization/virtualbox?expand=0&rev=732 --- vbox-usb-warning.diff | 20 -------------------- vboxdrv.sh | 4 ---- virtualbox.changes | 9 +++++++++ virtualbox.spec | 2 +- 4 files changed, 10 insertions(+), 25 deletions(-) diff --git a/vbox-usb-warning.diff b/vbox-usb-warning.diff index dcbe4f9..c8e9f8a 100644 --- a/vbox-usb-warning.diff +++ b/vbox-usb-warning.diff @@ -75,23 +75,3 @@ Index: VirtualBox-7.0.14/src/apps/VBoxUSB_DevRules/VBoxUSB_DevRules.cpp + return 1; +} + -Index: VirtualBox-7.0.14/src/VBox/Installer/linux/VBoxCreateUSBNode.sh -=================================================================== ---- VirtualBox-7.0.14.orig/src/VBox/Installer/linux/VBoxCreateUSBNode.sh -+++ VirtualBox-7.0.14/src/VBox/Installer/linux/VBoxCreateUSBNode.sh -@@ -47,12 +47,13 @@ case "$do_remove" in - exit 0 - fi - case "$group" in "") group="vboxusers";; esac -- mkdir /dev/vboxusb -m 0750 2>/dev/null -+ mkdir /dev/vboxusb -m 0660 2>/dev/null - chown root:$group /dev/vboxusb 2>/dev/null -- mkdir "$devdir" -m 0750 2>/dev/null -+ mkdir "$devdir" -m 0660 2>/dev/null - chown root:$group "$devdir" 2>/dev/null - mknod "$devpath" c $1 $2 -m 0660 2>/dev/null - chown root:$group "$devpath" 2>/dev/null -+ chmod 0660 "$devpath" 2 > /dev/null - ;; - 1) - rm -f "$devpath" diff --git a/vboxdrv.sh b/vboxdrv.sh index 65340f9..0079acb 100644 --- a/vboxdrv.sh +++ b/vboxdrv.sh @@ -60,10 +60,6 @@ fi [ -r /etc/default/virtualbox ] && . /etc/default/virtualbox -chmod "${DEVICE_MODE}" /etc/vboxusb/ -chmod "${DEVICE_MODE}" /etc/vboxusb/* -chmod "${DEVICE_MODE}" /etc/vboxusb/*/* - begin_msg() { test -n "${2}" && echo "${SCRIPTNAME}: ${1}." diff --git a/virtualbox.changes b/virtualbox.changes index 706e0dd..9bc69c7 100644 --- a/virtualbox.changes +++ b/virtualbox.changes @@ -1,3 +1,12 @@ +------------------------------------------------------------------- +Mon Apr 1 16:12:39 UTC 2024 - Javier de San Pedro + +- Setting 0660 as permissions of /dev/vboxusb directory itself was preventing + access to this directory by any non-root user, even if member of vboxusers. + This results in VBox UI failing to enable USB passthrough. + Fix issue by removing all the workarounds for /dev/vboxusb/* as they should + no longer be required. + ------------------------------------------------------------------- Thu Mar 28 17:26:16 UTC 2024 - Larry Finger diff --git a/virtualbox.spec b/virtualbox.spec index 33654c4..ec3f688 100644 --- a/virtualbox.spec +++ b/virtualbox.spec @@ -1,5 +1,5 @@ # -# spec file +# spec file for package virtualbox # # Copyright (c) 2024 SUSE LLC #