VirtualBox

Changeset 52424 in vbox for trunk/src


Ignore:
Timestamp:
Aug 20, 2014 3:25:37 AM (11 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
95604
Message:

Only VirtualBox.dll has a TrustedError method, so add a flag to advertise it so we don't wast a lot of effort with VBoxHeadless, VBoxSDL and others that doesn't have it.

Location:
trunk/src/VBox
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/hardenedmain.cpp

    r49892 r52424  
    5757        }
    5858
    59     return SUPR3HardenedMain("VirtualBox", fFlags, argc, argv, envp);
     59    return SUPR3HardenedMain("VirtualBox", fFlags | SUPSECMAIN_FLAGS_TRUSTED_ERROR, argc, argv, envp);
    6060}
    6161
  • trunk/src/VBox/HostDrivers/Support/SUPR3HardenedMain.cpp

    r52403 r52424  
    135135/** The program name. */
    136136static const char      *g_pszSupLibHardenedProgName;
     137/** The flags passed to SUPR3HardenedMain. */
     138static uint32_t         g_fSupHardenedMain;
    137139
    138140#ifdef SUP_HARDENED_SUID
     
    15381540{
    15391541    /*
     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    /*
    15401550     * Construct the name.
    15411551     */
     
    16461656     */
    16471657    g_pszSupLibHardenedProgName = pszProgName;
     1658    g_fSupHardenedMain          = fFlags;
    16481659    g_SupPreInitData.u32Magic     = SUPPREINITDATA_MAGIC;
    16491660    g_SupPreInitData.Data.hDevice = SUP_HDEVICE_NIL;
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette