4900a45cd9
- The location of vboxconfig is wrong. Add file fixes_for_vboxconfig.patch to fix. Some errors in vboxdrv.sh are fixed. - Further fixes for builds on Leap 15.6. Fixes boo#1221496. Adds file fixes_for_leap15.6.patch OBS-URL: https://build.opensuse.org/request/show/1163381 OBS-URL: https://build.opensuse.org/package/show/Virtualization/virtualbox?expand=0&rev=730
98 lines
3.9 KiB
Diff
98 lines
3.9 KiB
Diff
Index: VirtualBox-7.0.14/src/apps/Makefile.kmk
|
|
===================================================================
|
|
--- VirtualBox-7.0.14.orig/src/apps/Makefile.kmk
|
|
+++ VirtualBox-7.0.14/src/apps/Makefile.kmk
|
|
@@ -30,5 +30,7 @@ include $(KBUILD_PATH)/subheader.kmk
|
|
|
|
include $(PATH_SUB_CURRENT)/VBoxPermissionMessage/Makefile.kmk
|
|
|
|
+include $(PATH_SUB_CURRENT)/VBoxUSB_DevRules/Makefile.kmk
|
|
+
|
|
include $(FILE_KBUILD_SUB_FOOTER)
|
|
|
|
Index: VirtualBox-7.0.14/src/apps/VBoxUSB_DevRules/Makefile.kmk
|
|
===================================================================
|
|
--- /dev/null
|
|
+++ VirtualBox-7.0.14/src/apps/VBoxUSB_DevRules/Makefile.kmk
|
|
@@ -0,0 +1,30 @@
|
|
+# $Id: Makefile.kmk 28800 2010-04-27 08:22:32Z vboxsync $
|
|
+## @file
|
|
+#
|
|
+# VBoxUSB_DevRules is wrapper for suse users
|
|
+#
|
|
+# This file is part of VirtualBox Open Source Edition (OSE), as
|
|
+# available from http://www.virtualbox.org. This file is free software;
|
|
+# you can redistribute it and/or modify it under the terms of the GNU
|
|
+# General Public License (GPL) as published by the Free Software
|
|
+# Foundation, in version 2 as it comes in the "COPYING" file of the
|
|
+# VirtualBox OSE distribution. VirtualBox OSE is distributed in the
|
|
+# hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
|
|
+#
|
|
+
|
|
+
|
|
+SUB_DEPTH = ../../..
|
|
+include $(KBUILD_PATH)/subheader.kmk
|
|
+
|
|
+PROGRAMS += VBoxUSB_DevRules
|
|
+
|
|
+VBoxUSB_DevRules_TEMPLATE = VBoxQtGuiExe
|
|
+VBoxUSB_DevRules_SOURCES = VBoxUSB_DevRules.cpp
|
|
+VBoxUSB_DevRules_QT_MODULES = Core Gui
|
|
+VBoxUSB_DevRules_QT_MODULES += Widgets
|
|
+
|
|
+#INSTALLS += VBoxUSB_DevRules
|
|
+
|
|
+include $(KBUILD_PATH)/subfooter.kmk
|
|
+
|
|
+
|
|
Index: VirtualBox-7.0.14/src/apps/VBoxUSB_DevRules/VBoxUSB_DevRules.cpp
|
|
===================================================================
|
|
--- /dev/null
|
|
+++ VirtualBox-7.0.14/src/apps/VBoxUSB_DevRules/VBoxUSB_DevRules.cpp
|
|
@@ -0,0 +1,25 @@
|
|
+#include <QtWidgets/QApplication>
|
|
+#include <QtWidgets/QMessageBox>
|
|
+#include <QtWidgets/QPushButton>+
|
|
+int main(int argc, char *argv[])
|
|
+{
|
|
+ QApplication app(argc, argv);
|
|
+ QMessageBox msgBox;
|
|
+ QPushButton *myYesButton = msgBox.addButton("Enable", QMessageBox::YesRole);
|
|
+ QPushButton *myNoButton = msgBox.addButton("Disable", QMessageBox::NoRole);
|
|
+ msgBox.setWindowTitle(QObject::tr("USB Rules and Permissions !"));
|
|
+ msgBox.setText(QObject::tr("USB passthrough requires read/write access to USB devices. "
|
|
+ "As a result, it opens a security hole.\n\n"
|
|
+ "Nonetheless, this feature is extremely useful and it may be worth the security risk. "
|
|
+ "Thus the code defaults to enabling it.\n\nIf you agree that the risk is acceptable, then click 'Enable'.\n"
|
|
+ "You should not be asked this question again when VB is updated. If you later change your mind, run 'rm ~/.config/virtualbox/*'\n\n"
|
|
+ "If you wish to disable USB passthrough to plug the security hole, then click 'Disable'. "
|
|
+ "You will be asked for the system password, and /etc/udev/rules.d/60-vboxdrv.rules will be changed.\n\n"
|
|
+ "These changes may not be preserved through VB updates, thus this screen may be displayed again at that time."));
|
|
+ msgBox.exec();
|
|
+ app.quit();
|
|
+ if (msgBox.clickedButton() == myYesButton)
|
|
+ return 0;
|
|
+ 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"
|