Changeset 11725
- Timestamp:
- 08/28/08 00:21:47 (3 months ago)
- Files:
-
- trunk/Config.kmk (modified) (21 diffs)
- trunk/debian/LocalConfig.kmk (modified) (1 diff)
- trunk/debian/postinst (modified) (2 diffs)
- trunk/debian/rules (modified) (1 diff)
- trunk/include/VBox/sup.h (modified) (1 diff)
- trunk/include/iprt/err.h (modified) (1 diff)
- trunk/include/iprt/localipc.h (added)
- trunk/src/VBox/Debugger/Makefile.kmk (modified) (1 diff)
- trunk/src/VBox/Devices/Makefile.kmk (modified) (3 diffs)
- trunk/src/VBox/Devices/testcase/Makefile.kmk (modified) (1 diff)
- trunk/src/VBox/Frontends/VBoxBFE/Makefile.kmk (modified) (1 diff)
- trunk/src/VBox/Frontends/VBoxBFE/VBoxBFE.cpp (modified) (3 diffs)
- trunk/src/VBox/Frontends/VBoxBFE/VBoxBFEHardened.cpp (added)
- trunk/src/VBox/Frontends/VBoxHeadless/Makefile.kmk (modified) (3 diffs)
- trunk/src/VBox/Frontends/VBoxHeadless/VBoxHeadless.cpp (modified) (3 diffs)
- trunk/src/VBox/Frontends/VBoxHeadless/VBoxHeadlessHardened.cpp (added)
- trunk/src/VBox/Frontends/VBoxSDL/Makefile.kmk (modified) (2 diffs)
- trunk/src/VBox/Frontends/VBoxSDL/VBoxSDL.cpp (modified) (2 diffs)
- trunk/src/VBox/Frontends/VBoxSDL/VBoxSDLHardened.cpp (added)
- trunk/src/VBox/Frontends/VirtualBox/Makefile.kmk (modified) (5 diffs)
- trunk/src/VBox/Frontends/VirtualBox/src/hardenedmain.cpp (added)
- trunk/src/VBox/Frontends/VirtualBox/src/main.cpp (modified) (2 diffs)
- trunk/src/VBox/Frontends/VirtualBox4/Makefile.kmk (modified) (8 diffs)
- trunk/src/VBox/Frontends/VirtualBox4/src/hardenedmain.cpp (added)
- trunk/src/VBox/Frontends/VirtualBox4/src/main.cpp (modified) (2 diffs)
- trunk/src/VBox/HostDrivers/Support/Makefile.kmk (modified) (6 diffs)
- trunk/src/VBox/HostDrivers/Support/SUPLib.cpp (modified) (34 diffs)
- trunk/src/VBox/HostDrivers/Support/SUPLibInternal.h (modified) (3 diffs)
- trunk/src/VBox/HostDrivers/Support/SUPR3HardenedIPRT.cpp (added)
- trunk/src/VBox/HostDrivers/Support/SUPR3HardenedMain.cpp (added)
- trunk/src/VBox/HostDrivers/Support/SUPR3HardenedVerify.cpp (added)
- trunk/src/VBox/HostDrivers/Support/SUPSvc.cpp (added)
- trunk/src/VBox/HostDrivers/Support/SUPSvcGlobal.cpp (added)
- trunk/src/VBox/HostDrivers/Support/SUPSvcGrant.cpp (added)
- trunk/src/VBox/HostDrivers/Support/SUPSvcInternal.h (added)
- trunk/src/VBox/HostDrivers/Support/darwin/SUPDrv-darwin.cpp (modified) (2 diffs)
- trunk/src/VBox/HostDrivers/Support/darwin/SUPLib-darwin.cpp (modified) (17 diffs)
- trunk/src/VBox/HostDrivers/Support/freebsd/SUPDrv-freebsd.c (modified) (2 diffs)
- trunk/src/VBox/HostDrivers/Support/freebsd/SUPLib-freebsd.cpp (modified) (11 diffs)
- trunk/src/VBox/HostDrivers/Support/linux/Makefile (modified) (1 diff)
- trunk/src/VBox/HostDrivers/Support/linux/SUPDrv-linux.c (modified) (4 diffs)
- trunk/src/VBox/HostDrivers/Support/linux/SUPLib-linux.cpp (modified) (10 diffs)
- trunk/src/VBox/HostDrivers/Support/os2/SUPLib-os2.cpp (modified) (10 diffs)
- trunk/src/VBox/HostDrivers/Support/solaris/SUPDrv-solaris.c (modified) (5 diffs)
- trunk/src/VBox/HostDrivers/Support/solaris/SUPLib-solaris.cpp (modified) (8 diffs)
- trunk/src/VBox/HostDrivers/Support/solaris/mod.sh (modified) (2 diffs)
- trunk/src/VBox/HostDrivers/Support/win/SUPLib-win.cpp (modified) (19 diffs)
- trunk/src/VBox/HostDrivers/Support/win/SUPSvc-win.cpp (added)
- trunk/src/VBox/HostServices/GuestProperties/Makefile.kmk (modified) (1 diff)
- trunk/src/VBox/HostServices/SharedClipboard/Makefile.kmk (modified) (1 diff)
- trunk/src/VBox/HostServices/SharedFolders/Makefile.kmk (modified) (1 diff)
- trunk/src/VBox/HostServices/SharedFolders/testcase/Makefile.kmk (modified) (1 diff)
- trunk/src/VBox/Installer/linux/Makefile.kmk (modified) (6 diffs)
- trunk/src/VBox/Installer/linux/VBox.sh (modified) (2 diffs)
- trunk/src/VBox/Installer/solaris/Makefile.kmk (modified) (14 diffs)
- trunk/src/VBox/Installer/solaris/makepackage.sh (modified) (4 diffs)
- trunk/src/VBox/Installer/solaris/postinstall.sh (modified) (2 diffs)
- trunk/src/VBox/Installer/solaris/vboxdrv.sh (modified) (1 diff)
- trunk/src/VBox/Main/Makefile.kmk (modified) (7 diffs)
- trunk/src/VBox/Runtime/Makefile.kmk (modified) (3 diffs)
- trunk/src/VBox/Runtime/include/internal/magics.h (modified) (2 diffs)
- trunk/src/VBox/Runtime/r3/win/localipc-win.cpp (added)
- trunk/src/VBox/VMM/Makefile.kmk (modified) (1 diff)
- trunk/src/VBox/VMM/testcase/Makefile.kmk (modified) (2 diffs)
- trunk/src/libs/xpcom18a4/Makefile.kmk (modified) (5 diffs)
- trunk/src/recompiler/Makefile.kmk (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/Config.kmk
r11721 r11725 327 327 # Enable the new async completion manager 328 328 VBOX_WITH_PDM_ASYNC_COMPLETION = 1 329 # Enable use of the $ORIGIN rpath feature. This is the default on330 # Solaris, but not else where for various reasons (ld.so, dist builds).331 ifeq ($(KBUILD_TARGET),solaris)332 VBOX_WITH_ORIGIN = 1333 endif334 329 # Temporary switch for enabling / disabling the new USB code on Darwin. 335 330 VBOX_WITH_NEW_USB_CODE_ON_DARWIN=1 … … 354 349 if1of ($(KBUILD_TARGET), solaris) 355 350 VBOX_WITH_PYTHON = 1 351 endif 352 # Enables hardening. 353 # Most developers will want to disable this in their LocalConfig.kmk. 354 VBOX_WITH_HARDENING = 1 355 # Where the application files are (going to be) installed. 356 #VBOX_PATH_APP_PRIVATE = /usr/lib/virtualbox 357 ifdef VBOX_WITH_HARDENING 358 if1of ($(KBUILD_TARGET), solaris) 359 VBOX_PATH_APP_PRIVATE = /opt/VirtualBox 360 else ifeq ($(KBUILD_TARGET),darwin) 361 VBOX_PATH_APP_PRIVATE = /Applications/VirtualBox.app/Contents/MacOS 362 endif 363 endif 364 # Where the architecture specific application files are (going to be) installed. 365 #VBOX_PATH_APP_PRIVATE_ARCH = /usr/lib/virtualbox 366 ifdef VBOX_WITH_HARDENING 367 if1of ($(KBUILD_TARGET), darwin solaris) 368 VBOX_PATH_APP_PRIVATE_ARCH = $(VBOX_PATH_APP_PRIVATE) 369 endif 370 endif 371 # Where the shared libraries are (going to be) installed. 372 #VBOX_PATH_SHARED_LIBS = /usr/lib 373 ifdef VBOX_WITH_HARDENING 374 if1of ($(KBUILD_TARGET), darwin solaris) 375 VBOX_PATH_SHARED_LIBS = $(VBOX_PATH_APP_PRIVATE) 376 endif 377 endif 378 # Where the documentation is (going to be) installed. 379 #VBOX_PATH_APP_DOCS = /usr/share/doc/virtualbox 380 ifdef VBOX_WITH_HARDENING 381 if1of ($(KBUILD_TARGET), darwin solaris) 382 VBOX_PATH_APP_DOCS = $(VBOX_PATH_APP_PRIVATE) 383 endif 384 endif 385 # The DT_RPATH/DT_RUNPATH to embed into the binaries (ELF). 386 # (This one is used for all binaries, there is no need to adjust this 387 # depending on the location of the object.) 388 #VBOX_WITH_RUNPATH = /usr/lib/virtualbox 389 ifdef VBOX_WITH_HARDENING 390 if1of ($(KBUILD_TARGET), solaris) 391 VBOX_WITH_RUNPATH = $(VBOX_PATH_APP_PRIVATE) 392 endif 393 endif 394 # Enable use of the $ORIGIN DT_RPATH/DT_RUNPATH feature (ELF). 395 # Because of the setuid usage on all ELF platforms when hardening the build 396 # things gets a bit complicated since the $ORIGIN+setuid policy differs. 397 #VBOX_WITH_ORIGIN=1 398 ifdef VBOX_WITH_HARDENING 399 if1of ($(KBUILD_TARGET), linux) 400 VBOX_WITH_ORIGIN = 1 401 endif 402 else if1of ($(KBUILD_TARGET), solaris) ## @todo add all the ELF dudes here! 403 VBOX_WITH_ORIGIN = 1 404 endif 405 # Enable the system wide support service/daemon. 406 # Work in progress, but required for hardening on Windows. 407 #VBOX_WITH_SUPSVC = 1 408 ifdef VBOX_WITH_HARDENING 409 if1of ($(KBUILD_TARGET), win) 410 VBOX_WITH_SUPSVC = 1 411 endif 356 412 endif 357 413 … … 412 468 VBOX_WITH_PDM_ASYNC_COMPLETION= 413 469 VBOX_WITH_KCHMVIEWER= 470 VBOX_WITH_HARDENING= 414 471 endif 415 472 … … 426 483 VBOX_WITH_PDM_ASYNC_COMPLETION= 427 484 VBOX_WITH_KCHMVIEWER= 485 VBOX_WITH_HARDENING= 428 486 endif 429 487 … … 499 557 VBOX_WITH_AHCI= 500 558 VBOX_WITH_PDM_ASYNC_COMPLETION= 559 if1of ($(KBUILD_TARGET), darwin) 560 # Disable hardening cause it'll cause unnecessary trouble. 561 VBOX_WITH_HARDENING= 562 endif 501 563 endif 502 564 … … 569 631 ifndef VBOX_WITH_QT4GUI 570 632 VBOX_WITH_KCHMVIEWER= 633 endif 634 635 # 636 # Check for incompatible combinations. 637 # 638 ifdef VBOX_WITH_RUNPATH 639 ifdef VBOX_WITH_ORIGIN 640 $(error VBOX_WITH_RUNPATH and VBOX_WITH_ORIGIN are mutually exclusive (lazy bird)) 641 endif 571 642 endif 572 643 … … 855 926 DEFS += VBOX_WITH_64_BITS_GUESTS 856 927 endif 928 ifdef VBOX_WITH_HARDENING 929 DEFS += VBOX_WITH_HARDENING 930 endif 931 ifdef VBOX_PATH_APP_PRIVATE 932 DEFS += RTPATH_APP_PRIVATE=\"$(VBOX_PATH_APP_PRIVATE)\" 933 endif 934 ifdef VBOX_PATH_APP_PRIVATE_ARCH 935 DEFS += RTPATH_APP_PRIVATE_ARCH=\"$(VBOX_PATH_APP_PRIVATE_ARCH)\" 936 endif 937 ifdef VBOX_PATH_SHARED_LIBS 938 DEFS += RTPATH_SHARED_LIBS=\"$(VBOX_PATH_SHARED_LIBS)\" 939 endif 940 ifdef VBOX_PATH_APP_DOCS 941 DEFS += RTPATH_APP_DOCS=\"$(VBOX_PATH_APP_DOCS)\" 942 endif 857 943 ## @todo eliminate these guys. 858 944 ifdef VBOX_WITH_INTERNAL_NETWORKING … … 987 1073 LIB_SETTINGS = $(PATH_LIB)/VBoxSettings.lib 988 1074 endif 1075 VBOX_LIB_SUPHARDENED = $(PATH_LIB)/SUPR3HardenedStatic$(VBOX_SUFF_LIB) 989 1076 990 1077 # The kprofile build automagically links with kProfile. … … 1131 1218 VBOX_DARWIN_DEF_SDK_LDFLAGS := -mmacosx-version-min=$(VBOX_DEF_MACOSX_VERSION_MIN) -Wl,-syslibroot,$(VBOX_PATH_MACOSX_SDK) $(VBOX_DARWIN_CLASSIC_LINKER) 1132 1219 endif # target=darwin 1220 1221 # 1222 # Macro switching between @executable_path and /Applications/VirtualBox.app 1223 # depending on whether the build is hardened or not (dylib install_name) 1224 # 1225 ifndef VBOX_DYLD_EXECUTABLE_PATH 1226 ifdef VBOX_WITH_HARDENING 1227 VBOX_DYLD_EXECUTABLE_PATH = $(VBOX_PATH_APP_PRIVATE_ARCH) 1228 else 1229 VBOX_DYLD_EXECUTABLE_PATH = @executable_path 1230 endif 1231 endif 1133 1232 1134 1233 # … … 2109 2208 TEMPLATE_VBOXR3EXE_CXXFLAGS.kprofile = $(TEMPLATE_VBOXR3EXE_CXXFLAGS.krelease) 2110 2209 endif 2111 ifdef VBOX_WITH_ORIGIN 2210 ifdef VBOX_WITH_RUNPATH 2211 TEMPLATE_VBOXR3EXE_LDFLAGS += '$(VBOX_GCC_RPATH_OPT)$(VBOX_WITH_RUNPATH)' 2212 else ifdef VBOX_WITH_ORIGIN 2112 2213 TEMPLATE_VBOXR3EXE_LDFLAGS += '$(VBOX_GCC_RPATH_OPT)$$(VBOX_ORIGIN)' 2214 TEMPLATE_VBOXR3EXE_LDFLAGS.linux += -Wl,-z,origin 2113 2215 endif 2114 2216 endif … … 2157 2259 2158 2260 # 2261 # Template for building hardened Ring-3 executables. 2262 # 2263 TEMPLATE_VBOXR3HARDENEDEXE = Hardened VBox Ring-3 EXE 2264 TEMPLATE_VBOXR3HARDENEDEXE_EXTENDS = VBOXR3EXE 2265 TEMPLATE_VBOXR3HARDENEDEXE_LIBS = $(VBOX_LIB_SUPHARDENED) $(TEMPLATE_VBOXR3EXE_LIBS) 2266 TEMPLATE_VBOXR3HARDENEDEXE_LDFLAGS.darwin = $(TEMPLATE_VBOXR3EXE_LDFLAGS.darwin) -framework IOKit 2267 2268 # 2269 # Template for building hardened Ring-3 libraries. 2270 # 2271 TEMPLATE_VBOXR3HARDENEDLIB = Hardened VBox Ring-3 LIB 2272 TEMPLATE_VBOXR3HARDENEDLIB_EXTENDS = VBOXR3HARDENEDEXE 2273 TEMPLATE_VBOXR3HARDENEDLIB_LIBS = $(NO_SUCH_VARIABLE) 2274 2275 # 2159 2276 # Ring-3 testcase. 2160 2277 # This is the VBOXR3EXE template only with a different install dir. … … 2164 2281 TEMPLATE_VBOXR3TSTEXE_INST = $(INST_TESTCASE) 2165 2282 TEMPLATE_VBOXR3TSTEXE_LIBS = $(LIB_RUNTIME) $(TEMPLATE_VBOXR3EXE_LIBS) 2166 ifdef VBOX_WITH_ORIGIN 2167 TEMPLATE_VBOXR3TSTEXE_LDFLAGS= '$(VBOX_GCC_RPATH_OPT)$$(VBOX_ORIGIN)/..' $(TEMPLATE_VBOXR3EXE_LDFLAGS) 2283 ifdef VBOX_WITH_RUNPATH 2284 TEMPLATE_VBOXR3TSTEXE_LDFLAGS = '$(VBOX_GCC_RPATH_OPT)$(VBOX_WITH_RUNPATH)' $(TEMPLATE_VBOXR3EXE_LDFLAGS) 2285 else ifdef VBOX_WITH_ORIGIN 2286 TEMPLATE_VBOXR3TSTEXE_LDFLAGS = '$(VBOX_GCC_RPATH_OPT)$$(VBOX_ORIGIN)/..' $(TEMPLATE_VBOXR3EXE_LDFLAGS) 2168 2287 endif 2169 2288 ifeq ($(KBUILD_TARGET),win) … … 2373 2492 TEMPLATE_VBOXMAINEXE_CXXFLAGS += $(VBOX_DARWIN_DEF_SDK_CXXFLAGS) 2374 2493 TEMPLATE_VBOXMAINEXE_OBJCFLAGS += $(VBOX_DARWIN_DEF_SDK_OBJCFLAGS) 2375 TEMPLATE_VBOXMAINEXE_LDFLAGS += $(VBOX_DARWIN_DEF_SDK_LDFLAGS) -bind_at_load -framework Carbon 2494 TEMPLATE_VBOXMAINEXE_LDFLAGS.darwin += -bind_at_load 2495 TEMPLATE_VBOXMAINEXE_LDFLAGS += $(VBOX_DARWIN_DEF_SDK_LDFLAGS) -framework Carbon 2376 2496 TEMPLATE_VBOXMAINEXE_LIBS = $(LIB_RUNTIME) 2377 2497 else if1of ($(KBUILD_TARGET), freebsd netbsd openbsd) … … 2386 2506 TEMPLATE_VBOXMAINEXE_LIBS = 2387 2507 endif 2388 ifdef VBOX_WITH_ORIGIN 2508 ifdef VBOX_WITH_RUNPATH 2509 TEMPLATE_VBOXMAINEXE_LDFLAGS += '$(VBOX_GCC_RPATH_OPT)$(VBOX_WITH_RUNPATH)' 2510 else ifdef VBOX_WITH_ORIGIN 2389 2511 TEMPLATE_VBOXMAINEXE_LDFLAGS += '$(VBOX_GCC_RPATH_OPT)$$(VBOX_ORIGIN)' 2512 TEMPLATE_VBOXMAINEXE_LDFLAGS.linux += -Wl,-z,origin 2390 2513 endif 2391 2514 … … 2421 2544 # This differs from VBOXMAINEXE only in PIC handling and similar DLL stuff. 2422 2545 # 2423 2424 2546 TEMPLATE_VBOXMAINDLL = VBox Main Component (shared library) 2425 2547 TEMPLATE_VBOXMAINDLL_EXTENDS = VBOXMAINEXE … … 2432 2554 endif 2433 2555 endif 2434 ifeq ($(KBUILD_TARGET),darwin) 2435 TEMPLATE_VBOXMAINDLL_LDFLAGS = $(filter-out -bind_at_load,$(TEMPLATE_VBOXMAINEXE_LDFLAGS)) \ 2556 TEMPLATE_VBOXMAINDLL_LDFLAGS.darwin = $(filter-out -bind_at_load,$(TEMPLATE_VBOXMAINEXE_LDFLAGS.darwin)) \ 2436 2557 -current_version $(VBOX_VERSION_MAJOR).$(VBOX_VERSION_MINOR).$(VBOX_VERSION_BUILD) 2437 endif 2558 2559 # 2560 # Template identical to VBOXMAINDLL except for where the stuff is 2561 # installed when using XPCOM (components/). 2562 # 2563 # Note! In the hardened build this gets a bit ugly since $ORIGIN/.. 2564 # doesn't work. So, we use $ORIGIN there and let the installers 2565 # handle the symlinking. 2566 # 2567 # (No difference when building against COM on Windows.) 2568 # 2569 TEMPLATE_VBOXMAINCOMP = VBox Main COM/XPCOM Component (shared library) 2570 TEMPLATE_VBOXMAINCOMP_EXTENDS = VBOXMAINEXE 2571 ifn1of ($(KBUILD_TARGET), win) ## WARNING! Linux used to be excluded too, so this may cause trouble. 2572 TEMPLATE_VBOXMAINCOMP_INST = $(INST_BIN)components/ 2573 endif 2574 ifeq ($(filter-out solaris.x86 %.amd64,$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH)),) 2575 ifneq ($(KBUILD_TARGET),win) 2576 TEMPLATE_VBOXMAINCOMP_DEFS = PIC $(TEMPLATE_VBOXMAINEXE_DEFS) 2577 TEMPLATE_VBOXMAINCOMP_CFLAGS = -fPIC $(TEMPLATE_VBOXMAINEXE_CFLAGS) 2578 TEMPLATE_VBOXMAINCOMP_CXXFLAGS = -fPIC $(TEMPLATE_VBOXMAINEXE_CXXFLAGS) 2579 ifdef VBOX_WITH_ORIGIN 2580 ifndef VBOX_WITH_HARDENING 2581 TEMPLATE_VBOXMAINCOMP_LDFLAGS = -fPIC $(filter-out '$(VBOX_GCC_RPATH_OPT)$$(VBOX_ORIGIN)',$(TEMPLATE_VBOXMAINEXE_LDFLAGS)) '$(VBOX_GCC_RPATH_OPT)$$(VBOX_ORIGIN)/..' 2582 endif 2583 endif 2584 ifndef TEMPLATE_VBOXMAINCOMP_LDFLAGS 2585 TEMPLATE_VBOXMAINCOMP_LDFLAGS = -fPIC $(TEMPLATE_VBOXMAINEXE_LDFLAGS) 2586 endif 2587 endif 2588 endif 2589 ifdef VBOX_WITH_ORIGIN 2590 ifndef TEMPLATE_VBOXMAINCOMP_LDFLAGS 2591 ifndef VBOX_WITH_HARDENING 2592 TEMPLATE_VBOXMAINCOMP_LDFLAGS = $(filter-out '$(VBOX_GCC_RPATH_OPT)$$(VBOX_ORIGIN)',$(TEMPLATE_VBOXMAINEXE_LDFLAGS)) '$(VBOX_GCC_RPATH_OPT)$$(VBOX_ORIGIN)/..' 2593 endif 2594 endif 2595 endif 2596 TEMPLATE_VBOXMAINCOMP_LDFLAGS.darwin = $(filter-out -bind_at_load,$(TEMPLATE_VBOXMAINEXE_LDFLAGS.darwin)) \ 2597 -current_version $(VBOX_VERSION_MAJOR).$(VBOX_VERSION_MINOR).$(VBOX_VERSION_BUILD) 2438 2598 2439 2599 # … … 2464 2624 TEMPLATE_VBOXMAINCLIENTEXE_CXXFLAGS.linux = $(TEMPLATE_VBOXMAINEXE_CXXFLAGS.linux) \ 2465 2625 -pthread 2466 ifeq ($(KBUILD_TARGET),darwin)2467 TEMPLATE_VBOXMAINCLIENTEXE_LDFLAGS = $(TEMPLATE_VBOXMAINEXE_LDFLAGS) -bind_at_load -framework Carbon2468 endif2469 2626 endif 2470 2627 … … 2484 2641 endif 2485 2642 endif 2486 ifeq ($(KBUILD_TARGET),darwin) 2487 TEMPLATE_VBOXMAINCLIENTDLL_LDFLAGS = $(filter-out -bind_at_load,$(TEMPLATE_VBOXMAINCLIENTEXE_LDFLAGS)) 2488 endif 2643 TEMPLATE_VBOXMAINCLIENTDLL_LDFLAGS.darwin = $(filter-out -bind_at_load,$(TEMPLATE_VBOXMAINCLIENTEXE_LDFLAGS.darwin)) 2489 2644 2490 2645 … … 2572 2727 TEMPLATE_VBOXQTGUIEXE_CXXFLAGS += $(VBOX_DARWIN_DEF_SDK_CXXFLAGS) 2573 2728 TEMPLATE_VBOXQTGUIEXE_OBJCFLAGS += $(VBOX_DARWIN_DEF_SDK_OBJCFLAGS) 2574 TEMPLATE_VBOXQTGUIEXE_LDFLAGS += $(VBOX_DARWIN_DEF_SDK_LDFLAGS) -framework Carbon -framework QuickTime-bind_at_load2729 TEMPLATE_VBOXQTGUIEXE_LDFLAGS.darwin += -bind_at_load 2575 2730 TEMPLATE_VBOXQTGUIEXE_LIBS += 2576 2731 TEMPLATE_VBOXQTGUIEXE_LIBPATH += … … 2605 2760 endif 2606 2761 endif 2607 ifdef VBOX_WITH_ORIGIN 2762 ifdef VBOX_WITH_RUNPATH 2763 ifeq ($(KBUILD_TARGET),solaris) 2764 TEMPLATE_VBOXQTGUIEXE_LDFLAGS += '$(VBOX_GCC_RPATH_OPT)$(VBOX_WITH_RUNPATH):$(VBOX_WITH_RUNPATH)/qtgcc/lib' 2765 else 2766 TEMPLATE_VBOXQTGUIEXE_LDFLAGS += '$(VBOX_GCC_RPATH_OPT)$(VBOX_WITH_RUNPATH)' 2767 endif 2768 else ifdef VBOX_WITH_ORIGIN 2608 2769 ifeq ($(KBUILD_TARGET),solaris) 2609 2770 TEMPLATE_VBOXQTGUIEXE_LDFLAGS += '$(VBOX_GCC_RPATH_OPT)$$(VBOX_ORIGIN):$$(VBOX_ORIGIN)/qtgcc/lib' … … 2644 2805 TEMPLATE_VBOXQTGUI_LIBS = $(filter-out $(QTMAIN),$(TEMPLATE_VBOXQTGUIEXE_LIBS)) 2645 2806 ifeq ($(KBUILD_TARGET),darwin) 2646 TEMPLATE_VBOXQTGUI_LDFLAGS = $(filter-out -framework Carbon -framework QuickTime -bind_at_load,$(TEMPLATE_VBOXQTGUIEXE_LDFLAGS)) \2807 TEMPLATE_VBOXQTGUI_LDFLAGS.darwin = $(filter-out -bind_at_load,$(TEMPLATE_VBOXQTGUIEXE_LDFLAGS.darwin)) \ 2647 2808 -current_version $(VBOX_VERSION_MAJOR).$(VBOX_VERSION_MINOR).$(VBOX_VERSION_BUILD) 2648 2809 endif trunk/debian/LocalConfig.kmk
r8171 r11725 26 26 KBUILD_MSG_STYLE := brief 27 27 28 DEFS += RTPATH_APP_DOCS=\"$(VBOX_PATH_PACKAGE_DOCS)\" 29 DEFS += RTPATH_APP_PRIVATE_ARCH=\"/usr/lib/virtualbox-ose\" 30 DEFS += RTPATH_APP_PRIVATE=\"/usr/share/virtualbox-ose\" 31 DEFS += RTPATH_SHARED_LIBS=\"/usr/lib\" 28 VBOX_WITH_HARDENING := 1 29 VBOX_WITH_ORIGIN := 30 VBOX_PATH_APP_PRIVATE_ARCH := /usr/lib/virtualbox-ose 31 VBOX_PATH_SHARED_LIBS := $(VBOX_PATH_APP_PRIVATE_ARCH) 32 VBOX_WITH_RUNPATH := $(VBOX_PATH_APP_PRIVATE_ARCH) 33 VBOX_PATH_APP_PRIVATE := /usr/share/virtualbox-ose 34 VBOX_PATH_APP_DOCS = $(VBOX_PATH_PACKAGE_DOCS) trunk/debian/postinst
r9190 r11725 39 39 udev_ver=`expr "$udev_out" : '[^0-9]*\([0-9]*\)'` 40 40 if [ "$udev_ver" = "" -o "$udev_ver" -lt 55 ]; then 41 echo 'KERNEL="vboxdrv", NAME="vboxdrv", OWNER="root", GROUP=" vboxusers", MODE="0660"' \41 echo 'KERNEL="vboxdrv", NAME="vboxdrv", OWNER="root", GROUP="root", MODE="0600"' \ 42 42 > /etc/udev/rules.d/60-vboxdrv.rules 43 43 else 44 echo 'KERNEL=="vboxdrv", NAME="vboxdrv", OWNER="root", GROUP=" vboxusers", MODE="0660"' \44 echo 'KERNEL=="vboxdrv", NAME="vboxdrv", OWNER="root", GROUP="root", MODE="0600"' \ 45 45 > /etc/udev/rules.d/60-vboxdrv.rules 46 46 fi … … 90 90 fi 91 91 92 # The starters need to be Suid root. They drop the privileges before starting 93 # the real frontend. 94 if ! dpkg-statoverride --list /usr/lib/virtualbox-ose/VirtualBox > /dev/nnull 2>&1; then 95 chmod 4711 /usr/lib/virtualbox-ose/VirtualBox 96 fi 97 if ! dpkg-statoverride --list /usr/lib/virtualbox-ose/VBoxHeadless > /dev/nnull 2>&1; then 98 chmod 4711 /usr/lib/virtualbox-ose/VBoxHeadless 99 fi 100 if ! dpkg-statoverride --list /usr/lib/virtualbox-ose/VBoxSDL > /dev/nnull 2>&1; then 101 chmod 4711 /usr/lib/virtualbox-ose/VBoxSDL 102 fi 103 92 104 #DEBHELPER# 93 105 trunk/debian/rules
r11524 r11725 167 167 mv $(archdir)/VBoxXPCOMIPCD $(prefix)/usr/lib/$(package) 168 168 mv $(archdir)/components $(prefix)/usr/lib/$(package)/components 169 mv $(archdir)/*.so $(prefix)/usr/lib 170 mv $(archdir)/*.so.4 $(prefix)/usr/lib || true169 mv $(archdir)/*.so $(prefix)/usr/lib/$(package) 170 mv $(archdir)/*.so.4 $(prefix)/usr/lib/$(package) || true 171 171 mv $(archdir)/sdk $(prefix)/usr/share/$(package) 172 172 $(if $(HEADLESS),,mv $(archdir)/nls $(prefix)/usr/share/$(package)) trunk/include/VBox/sup.h
r10377 r11725 312 312 313 313 /** 314 * Secure main. 315 * 316 * This is used for the set-user-ID-on-execute binaries on unixy systems 317 * and when using the open-vboxdrv-via-root-service setup on Windows. 318 * 319 * This function will perform the integrity checks of the VirtualBox 320 * installation, open the support driver, open the root service (later), 321 * and load the DLL corresponding to \a pszProgName and execute its main 322 * function. 323 * 324 * @returns Return code appropriate for main(). 325 * 326 * @param pszProgName The program name. This will be used to figure out which 327 * DLL/SO/DYLIB to load and execute. 328 * @param fFlags Flags. 329 * @param argc The argument count. 330 * @param argv The argument vector. 331 * @param envp The environment vector. 332 */ 333 DECLHIDDEN(int) SUPR3HardenedMain(const char *pszProgName, uint32_t fFlags, int argc, char **argv, char **envp); 334 335 /** @name SUPR3SecureMain flags. 336 * @{ */ 337 /** Don't open the device. (Intended for VirtualBox without -startvm.) */ 338 #define SUPSECMAIN_FLAGS_DONT_OPEN_DEV RT_BIT_32(0) 339 /** @} */ 340 341 /** 314 342 * Initializes the support library. 315 343 * Each succesful call to SUPInit() must be countered by a trunk/include/iprt/err.h
r11562 r11725 449 449 /** The timer can't be stopped because i's already suspended. */ 450 450 #define VERR_TIMER_SUSPENDED (-69) 451 /** The operation was cancelled by the user . */451 /** The operation was cancelled by the user (copy) or another thread (local ipc). */ 452 452 #define VERR_CANCELLED (-70) 453 453 /** Failed to initialize a memory object. trunk/src/VBox/Debugger/Makefile.kmk
r10052 r11725 121 121 VBoxDbgStats.cpp 122 122 123 VBoxDbg_LDFLAGS.darwin = -install_name @executable_path/VBoxDbg.dylib123 VBoxDbg_LDFLAGS.darwin = -install_name $(VBOX_DYLD_EXECUTABLE_PATH)/VBoxDbg.dylib 124 124 125 125 VBoxDbg_LIBS = \ trunk/src/VBox/Devices/Makefile.kmk
r11721 r11725 102 102 $(L4_LIBDIR)/libl4sys.p.a 103 103 endif 104 VBoxDDU_LDFLAGS.darwin = -install_name @executable_path/VBoxDDU.dylib104 VBoxDDU_LDFLAGS.darwin = -install_name $(VBOX_DYLD_EXECUTABLE_PATH)/VBoxDDU.dylib 105 105 ifdef VBOX_WITH_USB 106 106 ifdef VBOX_WITH_NEW_USB_CODE_ON_DARWIN … … 190 190 VBoxDD_LIBS.darwin += \ 191 191 $(LIB_REM) 192 VBoxDD_LDFLAGS.darwin = -install_name @executable_path/VBoxDD.dylib \192 VBoxDD_LDFLAGS.darwin = -install_name $(VBOX_DYLD_EXECUTABLE_PATH)/VBoxDD.dylib \ 193 193 -framework CoreAudio \ 194 194 -framework IOKit \ … … 230 230 endif 231 231 VBoxDD2_LIBS.darwin += $(LIB_REM) 232 VBoxDD2_LDFLAGS.darwin = -install_name @executable_path/VBoxDD2.dylib232 VBoxDD2_LDFLAGS.darwin = -install_name $(VBOX_DYLD_EXECUTABLE_PATH)/VBoxDD2.dylib 233 233 VBoxDD2_LDFLAGS.linux = -Wl,--no-undefined 234 234 VBoxDD2_LDFLAGS.l4 = -Wl,--no-undefined trunk/src/VBox/Devices/testcase/Makefile.kmk
r11721 r11725 115 115 $(PATH_TARGET)/tstDeviceStructSizeGC.h: $$(INSTARGET_tstDeviceStructSizeGC) 116 116 $(call MSG_GENERATE,,$@) 117 $(QUIET)$(REDIRECT) -wo $@ -- $(INSTARGET_tstDeviceStructSizeGC)117 $(QUIET)$(REDIRECT) -wo $@ $(if $(eq $(KBUILD_TARGET),darwin),-E 'DYLD_LIBRARY_PATH=$(dir $^)') -- $^ 118 118 119 119 # 3. run it. 120 120 $(PATH_TARGET)/tstDeviceStructSize.run: $$(INSTARGET_tstDeviceStructSize) 121 121 $(QUIET)$(RM) -f $@ 122 $ ^122 $(if $(eq $(KBUILD_TARGET),darwin),$(REDIRECT) -E 'DYLD_LIBRARY_PATH=$(dir $^)' --) $^ 123 123 $(QUIET)$(APPEND) "$@" "done" 124 124 trunk/src/VBox/Frontends/VBoxBFE/Makefile.kmk
r10058 r11725 28 28 include $(KBUILD_PATH)/subheader.kmk 29 29 30 PROGRAMS += VBoxBFE 30 # 31 # Targets. 32 # 33 ifdef VBOX_WITH_HARDENING 34 ifneq ($(KBUILD_TARGET),darwin) # No hardened VBoxBFE on darwin (.m). 35 PROGRAMS += VBoxBFEHardened 36 DLLS += VBoxBFE 37 endif 38 else 39 PROGRAMS += VBoxBFE 40 endif 41 42 # 43 # Hardened VBoxBFE. 44 # 45 VBoxBFEHardened_TEMPLATE = VBOXR3HARDENEDEXE 46 VBoxBFEHardened_SOURCES = VBoxBFEHardened.cpp 47 VBoxBFEHardened_NAME = VBoxBFE 48 31 49 32 50 # 33 51 # VBoxBFE 34 52 # 35 VBoxBFE_TEMPLATE = VBOXR3NPEXE 53 VBoxBFE_TEMPLATE = 54 VBoxBFE_TEMPLATE := $(if $(VBOX_WITH_HARDENING),VBOXR3NP,VBOXR3NPEXE) 36 55 #ifdef VBOX_WITH_SECURELABEL 37 56 #VBoxBFE_DEFS += VBOX_SECURELABEL trunk/src/VBox/Frontends/VBoxBFE/VBoxBFE.cpp
r11158 r11725 415 415 416 416 /** entry point */ 417 int main(int argc, char **argv)417 extern "C" DECLEXPORT(int) TrustedMain (int argc, char **argv, char **envp) 418 418 { 419 #ifdef RT_OS_L4420 #ifndef L4API_l4v2onv4421 /* clear Fiasco kernel trace buffer */422 fiasco_tbuf_clear();423 #endif424 /* set the environment. Must be done before the runtime is425 initialised. Yes, it really must. */426 for (int i = 0; i < argc; i++)427 if (strcmp(argv[i], "-env") == 0)428 {429 if (++i >= argc)430 return SyntaxError("missing argument to -env (format: var=value)!\n");431 /* add it to the environment */432 if (putenv(argv[i]) != 0)433 return SyntaxError("Error setting environment string %s.\n", argv[i]);434 }435 #endif /* RT_OS_L4 */436 437 /*438 * Before we do *anything*, we initialize the runtime.439 */440 int rc = RTR3Init();441 if (VBOX_FAILURE(rc))442 return FatalError("RTR3Init failed rc=%Vrc\n", rc);443 444 445 419 bool fFullscreen = false; 446 420 #ifdef VBOX_VRDP … … 455 429 uint32_t u32MaxVRAM; 456 430 #endif 431 int rc = VINF_SUCCESS; 457 432 458 433 RTPrintf("VirtualBox Simple SDL GUI built %s %s\n", __DATE__, __TIME__); … … 1011 986 1012 987 988 #ifndef VBOX_WITH_HARDENING 989 /** 990 * Main entry point. 991 */ 992 int main(int argc, char **argv) 993 { 994 # ifdef RT_OS_L4 995 # ifndef L4API_l4v2onv4 996 /* clear Fiasco kernel trace buffer */ 997 fiasco_tbuf_clear(); 998 # endif 999 /* set the environment. Must be done before the runtime is 1000 initialised. Yes, it really must. */ 1001 for (int i = 0; i < argc; i++) 1002 if (strcmp(argv[i], "-env") == 0) 1003 { 1004 if (++i >= argc) 1005 return SyntaxError("missing argument to -env (format: var=value)!\n"); 1006 /* add it to the environment */ 1007 if (putenv(argv[i]) != 0) 1008 return SyntaxError("Error setting environment string %s.\n", argv[i]); 1009 } 1010 # endif /* RT_OS_L4 */ 1011 1012 /* 1013 * Before we do *anything*, we initialize the runtime. 1014 */ 1015 int rc = RTR3Init(); 1016 if (VBOX_FAILURE(rc)) 1017 return FatalError("RTR3Init failed rc=%Vrc\n", rc); 1018 1019 return TrustedMain(argc, argv, NULL); 1020 } 1021 #endif /* !VBOX_WITH_HARDENING */ 1022 1013 1023 1014 1024 /** trunk/src/VBox/Frontends/VBoxHeadless/Makefile.kmk
r10058 r11725 28 28 include $(KBUILD_PATH)/subheader.kmk 29 29 30 PROGRAMS += VBoxHeadless31 30 include $(PATH_SUB_CURRENT)/testcase/Makefile.kmk 32 31 ifdef VBOX_WITH_FFMPEG … … 34 33 endif 35 34 36 VBoxHeadless_TEMPLATE = VBOXMAINCLIENTEXE 35 # 36 # Targets. 37 # 38 ifdef VBOX_WITH_HARDENING 39 PROGRAMS += VBoxHeadlessHardened 40 DLLS += VBoxHeadless 41 else 42 PROGRAMS += VBoxHeadless 43 endif 44 45 46 # 47 # Hardened VBoxHeadless. 48 # 49 VBoxHeadlessHardened_TEMPLATE = VBOXR3HARDENEDEXE 50 VBoxHeadlessHardened_SOURCES = VBoxHeadlessHardened.cpp 51 VBoxHeadlessHardened_NAME = VBoxHeadless 52 53 54 # 55 # VBoxHeadless 56 # 57 VBoxHeadless_TEMPLATE := $(if $(VBOX_WITH_HARDENING),VBOXMAINCLIENTDLL,VBOXMAINCLIENTEXE) 37 58 VBoxHeadless_DEFS = VBOX_FFMPEG 38 59 VBoxHeadless_SOURCES = VBoxHeadless.cpp … … 41 62 VBoxHeadless_SOURCES += Framebuffer.cpp 42 63 endif 64 ifdef VBOX_WITH_HARDENING 65 VBoxHeadless_LDFLAGS.darwin += -install_name $(VBOX_DYLD_EXECUTABLE_PATH)/VBoxHeadless.dylib 66 endif 43 67 44 68 include $(KBUILD_PATH)/subfooter.kmk trunk/src/VBox/Frontends/VBoxHeadless/VBoxHeadless.cpp
r11442 r11725 406 406 * Entry point. 407 407 */ 408 int main (int argc, char **argv)408 extern "C" DECLEXPORT (int) TrustedMain (int argc, char **argv, char **envp) 409 409 { 410 410 #ifdef VBOX_WITH_VRDP … … 430 430 /** @todo this should really be taken care of in Main. */ 431 431 RTEnvUnset("DISPLAY"); 432 // initialize VBox Runtime433 RTR3Init(true, ~(size_t)0);434 432 435 433 LogFlow (("VBoxHeadless STARTED.\n")); … … 938 936 } 939 937 938 939 #ifndef VBOX_WITH_HARDENING 940 /** 941 * Main entry point. 942 */ 943 int main (int argc, char **argv, char **envp) 944 { 945 // initialize VBox Runtime 946 RTR3Init (true, ~(size_t)0); 947 return TrustedMain (argc, argv, envp); 948 } 949 #endif /* !VBOX_WITH_HARDENING */ 950 trunk/src/VBox/Frontends/VBoxSDL/Makefile.kmk
r11673 r11725 28 28 include $(KBUILD_PATH)/subheader.kmk 29 29 30 PROGRAMS += VBoxSDL tstSDL 30 31 # 32 # Targets. 33 # 34 ifdef VBOX_WITH_HARDENING 35 ifneq ($(KBUILD_TARGET),darwin) # No hardened VBoxSDL on darwin. 36 PROGRAMS += VBoxSDLHardened 37 DLLS += VBoxSDL 38 endif 39 else 40 PROGRAMS += VBoxSDL 41 endif 42 PROGRAMS += tstSDL 43 44 45 # 46 # Hardened VBoxSDL 47 # 48 VBoxSDLHardened_TEMPLATE = VBOXR3HARDENEDEXE 49 VBoxSDLHardened_SOURCES = VBoxSDLHardened.cpp 50 VBoxSDLHardened_NAME = VBoxSDL 31 51 32 52 … … 34 54 # VBoxSDL 35 55 # 36 37 VBoxSDL_TEMPLATE = VBOXMAINCLIENTEXE 56 VBoxSDL_TEMPLATE := $(if $(VBOX_WITH_HARDENING),VBOXMAINCLIENTDLL,VBOXMAINCLIENTEXE) 38 57 VBoxSDL_SDKS = LIBSDL 39 58 VBoxSDL_SOURCES = \ trunk/src/VBox/Frontends/VBoxSDL/VBoxSDL.cpp
r11661 r11725 946 946 947 947 /** entry point */ 948 int main(int argc, char *argv[]) 948 extern "C" 949 DECLEXPORT(int) TrustedMain(int argc, char **argv, char **envp) 949 950 { 950 /*951 * Before we do *anything*, we initialize the runtime.952 */953 int rcRT = RTR3Init(true, ~(size_t)0);954 if (VBOX_FAILURE(rcRT))955 {956 RTPrintf("Error: RTR3Init failed rcRC=%d\n", rcRT);957 return 1;958 }959 960 951 #ifdef VBOXSDL_WITH_X11 961 952 /* … … 2926 2917 return FAILED (rc) ? 1 : 0; 2927 2918 } 2919 2920 2921 #ifndef VBOX_WITH_HARDENING 2922 /** 2923 * Main entry point 2924 */ 2925 int main(int argc, char **argv) 2926 { 2927 /* 2928 * Before we do *anything*, we initialize the runtime. 2929 */ 2930 int rcRT = RTR3Init(true, ~(size_t)0); 2931 if (VBOX_FAILURE(rcRT)) 2932 { 2933 RTPrintf("Error: RTR3Init failed rcRC=%d\n", rcRT); 2934 return 1; 2935 } 2936 return TrustedMain(argc, argv, NULL); 2937 } 2938 #endif /* !VBOX_WITH_HARDENING */ 2939 2928 2940 2929 2941 /** trunk/src/VBox/Frontends/VirtualBox/Makefile.kmk
r10637 r11725 34 34 # The targets. 35 35 # 36 PROGRAMS = VirtualBox 36 ifdef VBOX_WITH_HARDENING 37 PROGRAMS += VirtualBox3Hardened 38 DLLS += VirtualBox 39 else 40 PROGRAMS += VirtualBox 41 endif 37 42 ifeq ($(filter-out freebsd linux openbsd netbsd solaris,$(KBUILD_TARGET)),) # X11 38 DLLS = VBoxKeyboard339 OTHERS = $(PATH_BIN)/vboxkeyboard3.tar.gz43 DLLS += VBoxKeyboard3 44 OTHERS += $(PATH_BIN)/vboxkeyboard3.tar.gz 40 45 endif 41 46 DLLS.os2 += VBoxHlp 42 47 ifndef USE_KBUILD_QT3_UNIT 43 INSTALLS = VirtualBox.nls48 INSTALLS += VirtualBox.nls 44 49 endif 45 50 … … 104 109 $(call MSG_TOOL,tar/gzip,,$@) 105 110 $(QUIET)cd $(PATH_TARGET) && tar -chf - $(addprefix $(SOURCE_DIRECTORY)/,$(subst $(DIRECTORY_PREFIX),,$(VBoxKeyboard3_TARSOURCES))) | gzip - > $@ 111 112 113 # 114 # Hardened VirtualBox4. 115 # 116 VirtualBox3Hardened_TEMPLATE = VBOXR3HARDENEDEXE 117 VirtualBox3Hardened_SOURCES = src/hardenedmain.cpp 118 VirtualBox3Hardened_NAME = VirtualBox3 119 ifeq ($(KBUILD_TARGET),darwin) ## @todo use .darwin when ticket 36 has been fixed. 120 #VirtualBox3Hardened_INST.darwin = $(INST_BIN)VirtualBox3 $(INST_BIN)VirtualBoxVM3 121 VirtualBox3Hardened_INST = $(INST_BIN)VirtualBox3 $(INST_BIN)VirtualBoxVM3 122 endif 106 123 107 124 … … 163 180 # VirtualBox - The GUI program. 164 181 # 165 VirtualBox_TEMPLATE = VBOXQTGUIEXE182 VirtualBox_TEMPLATE := $(if $(VBOX_WITH_HARDENING),VBOXQTGUI,VBOXQTGUIEXE) 166 183 VirtualBox_NAME = VirtualBox3 184 ifndef VBOX_WITH_HARDENING # For the launch trick we need different inode numbers. 185 ifeq ($(KBUILD_TARGET),darwin) ## @todo use .darwin when ticket 36 has been fixed. 186 #VirtualBox_INST.darwin = $(INST_BIN)VirtualBox3 $(INST_BIN)VirtualBoxVM3 187 VirtualBox_INST = $(INST_BIN)VirtualBox3 $(INST_BIN)VirtualBoxVM3 188 endif 189 endif 167 190 ifdef USE_KBUILD_QT3_UNIT 168 191 USES += qt3 … … 177 200 endif 178 201 179 ifeq ($(KBUILD_TARGET),darwin) 180 # For the launch trick we need different inode numbers. 181 VirtualBox_INST = $(INST_BIN)VirtualBox3 $(INST_BIN)VirtualBoxVM3 182 # For testing iChat Theater stuff change the sdk path (HACK ALERT) 183 ifdef VBOX_WITH_ICHAT_THEATER 184 VBOX_PATH_MACOSX_SDK = /Developer/SDKs/MacOSX10.5.sdk 185 endif 186 endif # darwin 202 # For testing iChat Theater stuff change the sdk path (HACK ALERT) 203 ifdef VBOX_WITH_ICHAT_THEATER 204 VBOX_PATH_MACOSX_SDK = /Developer/SDKs/MacOSX10.5.sdk 205 endif 187 206 188 207 # Import translation sources … … 405 424 endif 406 425 VirtualBox_LDFLAGS.os2 = -Zlinker /PM:PM -Zno-fork 407 VirtualBox_LDFLAGS.darwin = -framework IOKit 426 VirtualBox_LDFLAGS.darwin = \ 427 -framework IOKit -framework Carbon -framework QuickTime \ 428 $(if $(VBOX_WITH_HARDENING),-install_name $(VBOX_DYLD_EXECUTABLE_PATH)/VirtualBox3.dylib) 408 429 ifdef VBOX_WITH_ICHAT_THEATER 409 430 VirtualBox_LDFLAGS.darwin += -framework Foundation -framework AppKit -framework InstantMessage -framework QuartzCore trunk/src/VBox/Frontends/VirtualBox/src/main.cpp
r8155 r11725 114 114 } 115 115 116 int main (int argc, char **argv)116 extern "C" DECLEXPORT(int) TrustedMain (int argc, char **argv, char **envp) 117 117 { 118 /* Initialize VBox Runtime. Initialize the Suplib+GC as well only if we119 * are really about to start a VM. Don't do this if we are only starting120 * the selector window. */121 bool fInitGC = false;122 for (int i = 0; i < argc; i++)123 {124 if (!::strcmp(argv[i], "-startvm" ))125 {126 fInitGC = true;127 break;128 }129 }130 RTR3Init (fInitGC, ~(size_t)0);131 132 118 LogFlowFuncEnter(); 133 119 … … 281 267 return rc; 282

