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
This commit is contained in:
Larry Finger 2024-04-01 18:10:32 +00:00 committed by Git OBS Bridge
parent 4900a45cd9
commit 593b34655b
4 changed files with 10 additions and 25 deletions

View File

@ -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"

View File

@ -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}."

View File

@ -1,3 +1,12 @@
-------------------------------------------------------------------
Mon Apr 1 16:12:39 UTC 2024 - Javier de San Pedro <dev.rpm@javispedro.com>
- 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 <Larry.Finger@gmail.com>

View File

@ -1,5 +1,5 @@
#
# spec file
# spec file for package virtualbox
#
# Copyright (c) 2024 SUSE LLC
#