2017-06-09 00:26:55 +02:00
|
|
|
Index: VirtualBox-5.1.22/src/apps/Makefile.kmk
|
2015-11-08 10:13:53 +01:00
|
|
|
===================================================================
|
2017-06-09 00:26:55 +02:00
|
|
|
--- VirtualBox-5.1.22.orig/src/apps/Makefile.kmk
|
|
|
|
+++ VirtualBox-5.1.22/src/apps/Makefile.kmk
|
|
|
|
@@ -31,5 +31,7 @@ endif
|
2017-12-11 18:20:16 +01:00
|
|
|
|
2015-11-08 10:13:53 +01:00
|
|
|
include $(PATH_SUB_CURRENT)/VBoxPermissionMessage/Makefile.kmk
|
2017-12-11 18:20:16 +01:00
|
|
|
|
2015-11-08 10:13:53 +01:00
|
|
|
+include $(PATH_SUB_CURRENT)/VBoxUSB_DevRules/Makefile.kmk
|
|
|
|
+
|
|
|
|
include $(FILE_KBUILD_SUB_FOOTER)
|
2017-12-11 18:20:16 +01:00
|
|
|
|
2017-06-09 00:26:55 +02:00
|
|
|
Index: VirtualBox-5.1.22/src/apps/VBoxUSB_DevRules/Makefile.kmk
|
2015-11-08 10:13:53 +01:00
|
|
|
===================================================================
|
2017-06-09 00:26:55 +02:00
|
|
|
--- /dev/null
|
|
|
|
+++ VirtualBox-5.1.22/src/apps/VBoxUSB_DevRules/Makefile.kmk
|
2016-07-26 18:15:55 +02:00
|
|
|
@@ -0,0 +1,33 @@
|
2015-11-08 10:13:53 +01:00
|
|
|
+# $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
|
|
|
|
+
|
2016-07-26 18:15:55 +02:00
|
|
|
+VBoxUSB_DevRules_TEMPLATE = VBOXQTGUIEXE
|
2015-11-08 10:13:53 +01:00
|
|
|
+VBoxUSB_DevRules_SOURCES = VBoxUSB_DevRules.cpp
|
|
|
|
+VBoxUSB_DevRules_QT_MODULES = Core Gui
|
2016-07-26 18:15:55 +02:00
|
|
|
+ifdef VBOX_WITH_QTGUI_V5
|
|
|
|
+ # Qt5 requires additional modules:
|
|
|
|
+ VBoxUSB_DevRules_QT_MODULES += Widgets
|
|
|
|
+endif # VBOX_WITH_QTGUI_V5
|
2015-11-08 10:13:53 +01:00
|
|
|
+
|
|
|
|
+#INSTALLS += VBoxUSB_DevRules
|
|
|
|
+
|
|
|
|
+include $(KBUILD_PATH)/subfooter.kmk
|
|
|
|
+
|
|
|
|
+
|
2017-06-09 00:26:55 +02:00
|
|
|
Index: VirtualBox-5.1.22/src/apps/VBoxUSB_DevRules/VBoxUSB_DevRules.cpp
|
2015-11-08 10:13:53 +01:00
|
|
|
===================================================================
|
2017-06-09 00:26:55 +02:00
|
|
|
--- /dev/null
|
|
|
|
+++ VirtualBox-5.1.22/src/apps/VBoxUSB_DevRules/VBoxUSB_DevRules.cpp
|
|
|
|
@@ -0,0 +1,26 @@
|
2016-07-26 18:15:55 +02:00
|
|
|
+#include <QtWidgets/QApplication>
|
|
|
|
+#include <QtWidgets/QMessageBox>
|
2017-06-09 00:26:55 +02:00
|
|
|
+#include <QtWidgets/QPushButton>
|
|
|
|
+
|
2015-11-08 10:13:53 +01:00
|
|
|
+int main(int argc, char *argv[])
|
|
|
|
+{
|
|
|
|
+ QApplication app(argc, argv);
|
|
|
|
+ QMessageBox msgBox;
|
2017-06-09 00:26:55 +02:00
|
|
|
+ QPushButton *myYesButton = msgBox.addButton("Enable", QMessageBox::YesRole);
|
|
|
|
+ QPushButton *myNoButton = msgBox.addButton("Disable", QMessageBox::NoRole);
|
|
|
|
+ msgBox.setWindowTitle(QObject::tr("USB Rules and Permissions !"));
|
2017-12-11 18:20:16 +01:00
|
|
|
+ msgBox.setText(QObject::tr("USB passthrough opens a security hole. "
|
2017-06-09 00:26:55 +02:00
|
|
|
+ "Please read \nhttps://bugzilla.novell.com/show_bug.cgi?id=664520\n"
|
2017-12-11 18:20:16 +01:00
|
|
|
+ "to understand the problem.\n\nWe regard USB passthrough to be extremely useful and worth the security risk. "
|
|
|
|
+ "Thus the code defaults to enabling this feature. If you agree that the risk is acceptable, then click 'Enable'.\n"
|
2017-06-09 00:26:55 +02:00
|
|
|
+ "You will not be asked this question again when VB is updated. If you later change your mind, run 'rm ~/.vbox/*'\n\n"
|
2017-12-11 18:20:16 +01:00
|
|
|
+ "If you wish to disable USB passthrough to plug the security hole, then click 'Disable'. "
|
2017-06-09 00:26:55 +02:00
|
|
|
+ "You will be asked for the system password, and /etc/udev/rules.d/60-vboxdrv.rules will be changed.\n"
|
|
|
|
+ "These changes cannot be preserved through VB updates, thus this screen will be displayed again at that time."));
|
|
|
|
+ msgBox.exec();
|
2015-11-08 10:13:53 +01:00
|
|
|
+ app.quit();
|
2017-06-09 00:26:55 +02:00
|
|
|
+ if (msgBox.clickedButton() == myYesButton)
|
|
|
|
+ return 0;
|
|
|
|
+ return 1;
|
2015-11-08 10:13:53 +01:00
|
|
|
+}
|
|
|
|
+
|