Changeset 52424 in vbox
- Timestamp:
- Aug 20, 2014 3:25:37 AM (11 years ago)
- svn:sync-xref-src-repo-rev:
- 95604
- Location:
- trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/sup.h
r52392 r52424 743 743 * 744 744 * This is exported as "TrustedError" by the dynamic libraries which contains 745 * the "real" application binary for which the hardened stub is built. 745 * the "real" application binary for which the hardened stub is built. The 746 * hardened main() must specify SUPSECMAIN_FLAGS_TRUSTED_ERROR when calling 747 * SUPR3HardenedMain. 746 748 * 747 749 * @param pszWhere Where the error occurred (function name). … … 777 779 DECLHIDDEN(int) SUPR3HardenedMain(const char *pszProgName, uint32_t fFlags, int argc, char **argv, char **envp); 778 780 779 /** @name SUPR3 SecureMain flags.781 /** @name SUPR3HardenedMain flags. 780 782 * @{ */ 781 783 /** Don't open the device. (Intended for VirtualBox without -startvm.) */ 782 784 #define SUPSECMAIN_FLAGS_DONT_OPEN_DEV RT_BIT_32(0) 785 /** The hardened DLL has a "TrustedError" function (see FNSUPTRUSTEDERROR). */ 786 #define SUPSECMAIN_FLAGS_TRUSTED_ERROR RT_BIT_32(1) 783 787 /** @} */ 784 788 -
trunk/src/VBox/Frontends/VirtualBox/src/hardenedmain.cpp
r49892 r52424 57 57 } 58 58 59 return SUPR3HardenedMain("VirtualBox", fFlags , argc, argv, envp);59 return SUPR3HardenedMain("VirtualBox", fFlags | SUPSECMAIN_FLAGS_TRUSTED_ERROR, argc, argv, envp); 60 60 } 61 61 -
trunk/src/VBox/HostDrivers/Support/SUPR3HardenedMain.cpp
r52403 r52424 135 135 /** The program name. */ 136 136 static const char *g_pszSupLibHardenedProgName; 137 /** The flags passed to SUPR3HardenedMain. */ 138 static uint32_t g_fSupHardenedMain; 137 139 138 140 #ifdef SUP_HARDENED_SUID … … 1538 1540 { 1539 1541 /* 1542 * Don't bother if the main() function didn't advertise any TrustedError 1543 * export. It's both a waste of time and may trigger additional problems, 1544 * confusing or obscuring the original issue. 1545 */ 1546 if (!(g_fSupHardenedMain & SUPSECMAIN_FLAGS_TRUSTED_ERROR)) 1547 return NULL; 1548 1549 /* 1540 1550 * Construct the name. 1541 1551 */ … … 1646 1656 */ 1647 1657 g_pszSupLibHardenedProgName = pszProgName; 1658 g_fSupHardenedMain = fFlags; 1648 1659 g_SupPreInitData.u32Magic = SUPPREINITDATA_MAGIC; 1649 1660 g_SupPreInitData.Data.hDevice = SUP_HDEVICE_NIL;
Note:
See TracChangeset
for help on using the changeset viewer.