summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app-emulation/virtualbox/files')
-rw-r--r--app-emulation/virtualbox/files/virtualbox-4-localconfig45
-rw-r--r--app-emulation/virtualbox/files/virtualbox-5.1.22-opengl_dlopen_fix.patch167
-rw-r--r--app-emulation/virtualbox/files/virtualbox-ose-3-wrapper104
3 files changed, 0 insertions, 316 deletions
diff --git a/app-emulation/virtualbox/files/virtualbox-4-localconfig b/app-emulation/virtualbox/files/virtualbox-4-localconfig
deleted file mode 100644
index 5138d9252698..000000000000
--- a/app-emulation/virtualbox/files/virtualbox-4-localconfig
+++ /dev/null
@@ -1,45 +0,0 @@
-# -*- Makefile -*-
-#
-# Overwrite some default kBuild settings
-#
-
-#
-# Copyright (C) 2006-2008 Sun Microsystems, Inc.
-#
-# 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 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.
-#
-
-# shut up wine complaining about unknown locale
-EXEC_X86_WIN32 := wine
-
-# don't build testcases to save time, they are not needed for the package
-VBOX_WITH_TESTCASES :=
-VBOX_WITH_TESTSUITE :=
-VBOX_DOCBOOK_WITH_LATEX := 1
-
-KBUILD_MSG_STYLE := brief
-
-## paths, origin, hardening
-VBOX_WITH_HARDENING := 1
-VBOX_WITH_ORIGIN :=
-VBOX_PATH_APP_PRIVATE_ARCH := /usr/MY_LIBDIR/virtualbox
-VBOX_PATH_SHARED_LIBS := $(VBOX_PATH_APP_PRIVATE_ARCH)
-VBOX_WITH_RUNPATH := $(VBOX_PATH_APP_PRIVATE_ARCH)
-VBOX_PATH_APP_PRIVATE := /usr/share/virtualbox
-VBOX_PATH_APP_DOCS = $(VBOX_PATH_PACKAGE_DOCS)
-
-## don't build unwanted/splitted stuff
-VBOX_WITHOUT_ADDITIONS := 1
-VBOX_WITH_VBOXDRV :=
-VBOX_WITH_VBOXBFE :=
-VBOX_WITH_KCHMVIEWER :=
-
-## don't build with -Werror
-VBOX_WITH_WARNINGS_AS_ERRORS :=
-
diff --git a/app-emulation/virtualbox/files/virtualbox-5.1.22-opengl_dlopen_fix.patch b/app-emulation/virtualbox/files/virtualbox-5.1.22-opengl_dlopen_fix.patch
deleted file mode 100644
index 71fa978ca6eb..000000000000
--- a/app-emulation/virtualbox/files/virtualbox-5.1.22-opengl_dlopen_fix.patch
+++ /dev/null
@@ -1,167 +0,0 @@
-Index: VirtualBox-5.1.22/src/VBox/HostDrivers/Support/posix/SUPR3HardenedMain-posix.cpp
-===================================================================
---- VirtualBox-5.1.22/src/VBox/HostDrivers/Support/posix/SUPR3HardenedMain-posix.cpp (revision 115126)
-+++ VirtualBox-5.1.22/src/VBox/HostDrivers/Support/posix/SUPR3HardenedMain-posix.cpp (revision 115307)
-@@ -341,6 +341,7 @@
- * Patch 64-bit hosts.
- */
- uint32_t cRipRelMovs = 0;
-+ uint32_t cRelCalls = 0;
-
- /* Just use the disassembler to skip 12 bytes or more, we might need to
- rewrite mov instructions using RIP relative addressing. */
-@@ -349,7 +350,8 @@
- cbInstr = 1;
- int rc = DISInstr(pbTarget + offJmpBack, DISCPUMODE_64BIT, &Dis, &cbInstr);
- if ( RT_FAILURE(rc)
-- || (Dis.pCurInstr->fOpType & DISOPTYPE_CONTROLFLOW)
-+ || ( Dis.pCurInstr->fOpType & DISOPTYPE_CONTROLFLOW
-+ && Dis.pCurInstr->uOpcode != OP_CALL)
- || ( Dis.ModRM.Bits.Mod == 0
- && Dis.ModRM.Bits.Rm == 5 /* wrt RIP */
- && Dis.pCurInstr->uOpcode != OP_MOV))
-@@ -357,15 +359,23 @@
-
- if (Dis.ModRM.Bits.Mod == 0 && Dis.ModRM.Bits.Rm == 5 /* wrt RIP */)
- cRipRelMovs++;
-+ if ( Dis.pCurInstr->uOpcode == OP_CALL
-+ && (Dis.pCurInstr->fOpType & DISOPTYPE_RELATIVE_CONTROLFLOW))
-+ cRelCalls++;
-
- offJmpBack += cbInstr;
- cbPatchMem += cbInstr;
- }
-
-+ /*
-+ * Each relative call requires extra bytes as it is converted to a pushq imm32
-+ * + mov [RSP+4], imm32 + a jmp qword [$+8 wrt RIP] to avoid clobbering registers.
-+ */
-+ cbPatchMem += cRelCalls * RT_ALIGN_32(13 + 6 + 8, 8);
- cbPatchMem += 14; /* jmp qword [$+8 wrt RIP] + 8 byte address to jump to. */
- cbPatchMem = RT_ALIGN_32(cbPatchMem, 8);
-
-- /* Allocate suitable exectuable memory available. */
-+ /* Allocate suitable executable memory available. */
- bool fConvRipRelMovs = false;
- uint8_t *pbPatchMem = supR3HardenedMainPosixExecMemAlloc(cbPatchMem, pbTarget, cRipRelMovs > 0);
- if (!pbPatchMem)
-@@ -396,7 +406,8 @@
- cbInstr = 1;
- int rc = DISInstr(pbTarget + offInsn, DISCPUMODE_64BIT, &Dis, &cbInstr);
- if ( RT_FAILURE(rc)
-- || (Dis.pCurInstr->fOpType & DISOPTYPE_CONTROLFLOW))
-+ || ( Dis.pCurInstr->fOpType & DISOPTYPE_CONTROLFLOW
-+ && Dis.pCurInstr->uOpcode != OP_CALL))
- return VERR_SUPLIB_UNEXPECTED_INSTRUCTION;
-
- if ( Dis.ModRM.Bits.Mod == 0
-@@ -439,6 +450,34 @@
- pbPatchMem += sizeof(int32_t);
- }
- }
-+ else if ( Dis.pCurInstr->uOpcode == OP_CALL
-+ && (Dis.pCurInstr->fOpType & DISOPTYPE_RELATIVE_CONTROLFLOW))
-+ {
-+ /* Convert to absolute jump. */
-+ uintptr_t uAddr = (uintptr_t)&pbTarget[offInsn + cbInstr] + (intptr_t)Dis.Param1.uValue;
-+
-+ /* Skip the push instructions till the return address is known. */
-+ uint8_t *pbPatchMemPush = pbPatchMem;
-+ pbPatchMem += 13;
-+
-+ *pbPatchMem++ = 0xff; /* jmp qword [$+8 wrt RIP] */
-+ *pbPatchMem++ = 0x25;
-+ *(uint32_t *)pbPatchMem = (uint32_t)(RT_ALIGN_PT(pbPatchMem + 4, 8, uint8_t *) - (pbPatchMem + 4));
-+ pbPatchMem = RT_ALIGN_PT(pbPatchMem + 4, 8, uint8_t *);
-+ *(uint64_t *)pbPatchMem = uAddr;
-+ pbPatchMem += sizeof(uint64_t);
-+
-+ /* Push the return address onto stack. Difficult on amd64 without clobbering registers... */
-+ uintptr_t uAddrReturn = (uintptr_t)pbPatchMem;
-+ *pbPatchMemPush++ = 0x68; /* push imm32 sign-extended as 64-bit*/
-+ *(uint32_t *)pbPatchMemPush = RT_LO_U32(uAddrReturn);
-+ pbPatchMemPush += sizeof(uint32_t);
-+ *pbPatchMemPush++ = 0xc7;
-+ *pbPatchMemPush++ = 0x44;
-+ *pbPatchMemPush++ = 0x24;
-+ *pbPatchMemPush++ = 0x04; /* movl [RSP+4], imm32 */
-+ *(uint32_t *)pbPatchMemPush = RT_HI_U32(uAddrReturn);
-+ }
- else
- {
- memcpy(pbPatchMem, pbTarget + offInsn, cbInstr);
-Index: VirtualBox-5.1.22/src/VBox/HostDrivers/Support/SUPR3HardenedVerify.cpp
-===================================================================
---- VirtualBox-5.1.22/src/VBox/HostDrivers/Support/SUPR3HardenedVerify.cpp (revision 115126)
-+++ VirtualBox-5.1.22/src/VBox/HostDrivers/Support/SUPR3HardenedVerify.cpp (revision 115307)
-@@ -86,6 +86,9 @@
- /** The max path length acceptable for a trusted path. */
- #define SUPR3HARDENED_MAX_PATH 260U
-
-+/** Enable to resolve symlinks using realpath() instead of cooking our own stuff. */
-+#define SUP_HARDENED_VERIFY_FOLLOW_SYMLINKS_USE_REALPATH 1
-+
- #ifdef RT_OS_SOLARIS
- # define dirfd(d) ((d)->d_fd)
- #endif
-@@ -1091,7 +1094,8 @@
- #endif
-
-
--#if defined(RT_OS_DARWIN) || defined(RT_OS_LINUX)
-+#ifndef SUP_HARDENED_VERIFY_FOLLOW_SYMLINKS_USE_REALPATH
-+# if defined(RT_OS_DARWIN) || defined(RT_OS_LINUX)
- /**
- * Copies the error message to the error buffer and returns @a rc.
- *
-@@ -1104,6 +1108,7 @@
- {
- return supR3HardenedSetErrorN(rc, pErrInfo, 1, pszMsg);
- }
-+# endif
- #endif
-
-
-@@ -1893,7 +1898,9 @@
- /*
- * Verify each component from the root up.
- */
-+#ifndef SUP_HARDENED_VERIFY_FOLLOW_SYMLINKS_USE_REALPATH
- uint32_t iLoops = 0;
-+#endif
- SUPR3HARDENEDFSOBJSTATE FsObjState;
- uint32_t iComponent = 0;
- while (iComponent < Info.cComponents)
-@@ -1915,6 +1922,24 @@
- if ( RT_SUCCESS(rc)
- && S_ISLNK(FsObjState.Stat.st_mode))
- {
-+#if SUP_HARDENED_VERIFY_FOLLOW_SYMLINKS_USE_REALPATH /* Another approach using realpath() and verifying the result when encountering a symlink. */
-+ char *pszFilenameResolved = realpath(pszFilename, NULL);
-+ if (pszFilenameResolved)
-+ {
-+ rc = supR3HardenedVerifyFile(pszFilenameResolved, hNativeFile, fMaybe3rdParty, pErrInfo);
-+ free(pszFilenameResolved);
-+ return rc;
-+ }
-+ else
-+ {
-+ int iErr = errno;
-+ supR3HardenedError(VERR_ACCESS_DENIED, false /*fFatal*/,
-+ "supR3HardenedVerifyFileFollowSymlinks: Failed to resolve the real path '%s': %s (%d)\n",
-+ pszFilename, strerror(iErr), iErr);
-+ return supR3HardenedSetError4(VERR_ACCESS_DENIED, pErrInfo,
-+ "realpath failed for '", pszFilename, "': ", strerror(iErr));
-+ }
-+#else
- /* Don't loop forever. */
- iLoops++;
- if (iLoops < 8)
-@@ -1989,6 +2014,7 @@
- else
- return supR3HardenedSetError3(VERR_TOO_MANY_SYMLINKS, pErrInfo,
- "Too many symbolic links: '", pszFilename, "'");
-+#endif
- }
- }
- if (RT_FAILURE(rc))
diff --git a/app-emulation/virtualbox/files/virtualbox-ose-3-wrapper b/app-emulation/virtualbox/files/virtualbox-ose-3-wrapper
deleted file mode 100644
index 6f2da490065d..000000000000
--- a/app-emulation/virtualbox/files/virtualbox-ose-3-wrapper
+++ /dev/null
@@ -1,104 +0,0 @@
-#!/bin/sh
-#
-# Sun VirtualBox
-#
-# Copyright (C) 2006-2009 Sun Microsystems, Inc.
-#
-# 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.
-#
-# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
-# Clara, CA 95054 USA or visit http://www.sun.com if you need
-# additional information or have any questions.
-#
-
-PATH="/usr/bin:/bin:/usr/sbin:/sbin"
-CONFIG="/etc/vbox/vbox.cfg"
-
-if [ ! -r "$CONFIG" ]; then
- echo "Could not find VirtualBox installation. Please reinstall."
- exit 1
-fi
-
-. "$CONFIG"
-
-# Note: This script must not fail if the module was not successfully installed
-# because the user might not want to run a VM but only change VM params!
-
-if [ "$1" = "shutdown" ]; then
- SHUTDOWN="true"
-elif ! lsmod|grep -q vboxdrv; then
- cat << EOF
-WARNING: The VirtualBox kernel modules are not loaded.
- Please load all the needed kernel modules by:
-
- for m in vbox{drv,netadp,netflt}; do modprobe \$m; done
-
- You will not be able to start VMs until this problem is fixed.
-EOF
-elif [ ! -c /dev/vboxdrv ]; then
- cat << EOF
-WARNING: The character device /dev/vboxdrv does not exist.
- Please try to reload all the needed kernel modules by:
-
- for m in vbox{netflt,netadp,drv}; do rmmod \$m; done
- for m in vbox{drv,netadp,netflt}; do modprobe \$m; done
-
- and if that is not successful, try to re-install the package by:
-
- emerge -1av app-emulation/virtualbox-modules
-
- You will not be able to start VMs until this problem is fixed.
-EOF
-fi
-
-SERVER_PID=`ps -U \`whoami\` | grep VBoxSVC | awk '{ print $1 }'`
-if [ -z "$SERVER_PID" ]; then
- # Server not running yet/anymore, cleanup socket path.
- # See IPC_GetDefaultSocketPath()!
- if [ -n "$LOGNAME" ]; then
- rm -rf /tmp/.vbox-$LOGNAME-ipc > /dev/null 2>&1
- else
- rm -rf /tmp/.vbox-$USER-ipc > /dev/null 2>&1
- fi
-fi
-
-if [ "$SHUTDOWN" = "true" ]; then
- if [ -n "$SERVER_PID" ]; then
- kill -TERM $SERVER_PID
- sleep 2
- fi
- exit 0
-fi
-
-APP=`which $0`
-APP=`basename $APP`
-APP=${APP##/*/}
-case "$APP" in
- VirtualBox)
- exec "$INSTALL_DIR/VirtualBox" "$@"
- ;;
- VBoxManage)
- exec "$INSTALL_DIR/VBoxManage" "$@"
- ;;
- VBoxSDL)
- exec "$INSTALL_DIR/VBoxSDL" "$@"
- ;;
- VBoxVRDP)
- exec "$INSTALL_DIR/VBoxHeadless" "$@"
- ;;
- VBoxHeadless)
- exec "$INSTALL_DIR/VBoxHeadless" "$@"
- ;;
- vboxwebsrv)
- exec "$INSTALL_DIR/vboxwebsrv" "$@"
- ;;
- *)
- echo "Unknown application - $APP"
- ;;
-esac