- Timestamp:
- Jul 11, 2014 2:57:40 AM (11 years ago)
- Location:
- trunk/src/VBox
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/HostDrivers/Support/SUPLib.cpp
r51770 r51978 1467 1467 1468 1468 1469 SUPR3DECL(int) SUPR3HardenedVerifyInit(void) 1470 { 1471 #ifdef RT_OS_WINDOWS 1472 if (g_cInits == 0) 1473 return suplibOsHardenedVerifyInit(); 1474 #endif 1475 return VINF_SUCCESS; 1476 } 1477 1478 1479 SUPR3DECL(int) SUPR3HardenedVerifyTerm(void) 1480 { 1481 #ifdef RT_OS_WINDOWS 1482 if (g_cInits == 0) 1483 return suplibOsHardenedVerifyTerm(); 1484 #endif 1485 return VINF_SUCCESS; 1486 } 1487 1488 1469 1489 SUPR3DECL(int) SUPR3HardenedVerifyFile(const char *pszFilename, const char *pszMsg, PRTFILE phFile) 1470 1490 { -
trunk/src/VBox/HostDrivers/Support/SUPLibInternal.h
r51909 r51978 334 334 int suplibOsInit(PSUPLIBDATA pThis, bool fPreInited, bool fUnrestricted); 335 335 int suplibOsTerm(PSUPLIBDATA pThis); 336 int suplibOsHardenedVerifyInit(void); 337 int suplibOsHardenedVerifyTerm(void); 336 338 int suplibOsIOCtl(PSUPLIBDATA pThis, uintptr_t uFunction, void *pvReq, size_t cbReq); 337 339 int suplibOsIOCtlFast(PSUPLIBDATA pThis, uintptr_t uFunction, uintptr_t idCpu); -
trunk/src/VBox/HostDrivers/Support/win/SUPLib-win.cpp
r51970 r51978 80 80 #endif 81 81 82 /******************************************************************************* 83 * Global Variables * 84 *******************************************************************************/ 85 static bool g_fHardenedVerifyInited = false; 86 87 88 int suplibOsHardenedVerifyInit(void) 89 { 90 if (!g_fHardenedVerifyInited) 91 { 92 #if defined(VBOX_WITH_HARDENING) && !defined(IN_SUP_HARDENED_R3) && !defined(IN_SUP_R3_STATIC) 93 supR3HardenedWinInitVersion(); 94 int rc = supHardenedWinInitImageVerifier(NULL); 95 if (RT_FAILURE(rc)) 96 return rc; 97 supR3HardenedWinResolveVerifyTrustApiAndHookThreadCreation(); 98 #endif 99 g_fHardenedVerifyInited = true; 100 } 101 return VINF_SUCCESS; 102 } 103 104 105 int suplibOsHardenedVerifyTerm(void) 106 { 107 /** @todo free resources... */ 108 return VINF_SUCCESS; 109 } 110 82 111 83 112 int suplibOsInit(PSUPLIBDATA pThis, bool fPreInited, bool fUnrestricted) … … 86 115 * Make sure the image verifier is fully initialized. 87 116 */ 88 #if defined(VBOX_WITH_HARDENING) && !defined(IN_SUP_HARDENED_R3) && !defined(IN_SUP_R3_STATIC) 89 supR3HardenedWinInitVersion(); 90 int rc = supHardenedWinInitImageVerifier(NULL); 117 int rc = suplibOsHardenedVerifyInit(); 91 118 if (RT_FAILURE(rc)) 92 119 return rc; 93 supR3HardenedWinResolveVerifyTrustApiAndHookThreadCreation();94 #endif95 120 96 121 /* … … 199 224 } 200 225 226 201 227 #ifndef IN_SUP_HARDENED_R3 202 228 -
trunk/src/VBox/Main/src-all/ExtPackManagerImpl.cpp
r51687 r51978 716 716 m->enmContext = a_enmContext; 717 717 m->fMadeReadyCall = false; 718 719 /* 720 * Make sure the SUPR3Hardened API works (ignoring errors for now). 721 */ 722 int rc = SUPR3HardenedVerifyInit(); 723 if (RT_FAILURE(rc)) 724 LogRel(("SUPR3HardenedVerifyInit failed: %Rrc\n", rc)); 718 725 719 726 /* -
trunk/src/VBox/Main/src-helper-apps/VBoxExtPackHelperApp.cpp
r51971 r51978 1787 1787 return RTMsgInitFailure(rc); 1788 1788 1789 #ifdef RT_OS_WINDOWS 1790 SUPR3InitEx(false /*fUnrestricted*/, NULL); /* Ignore return code, we only need the image verifier bits to work. */ 1791 #endif 1789 SUPR3HardenedVerifyInit(); 1792 1790 RTERRINFOSTATIC ErrInfo; 1793 1791 RTErrInfoInitStatic(&ErrInfo);
Note:
See TracChangeset
for help on using the changeset viewer.