VirtualBox

Ignore:
Timestamp:
Dec 15, 2010 4:45:42 PM (14 years ago)
Author:
vboxsync
Message:

*: added fFlags parameter to SUPR3HardenedLdrLoadAppPriv(), SUPR3HardenedLdrLoad() and RTLdrLoadEx(). VBoxSVC: slurp in VBoxVMM because it is required by the extension packs

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/HostDrivers/Support/SUPLib.cpp

    r34972 r35152  
    20832083 * @param   pszFilename     The full file name.
    20842084 * @param   phLdrMod        Where to store the handle to the loaded module.
     2085 * @param   fFlags          See RTLDFLAGS_.
    20852086 * @param   pszError        Where to return the loader error. Optional.
    20862087 * @param   cbError         The size of the buffer pointed to by @a pszError.
    20872088 */
    2088 static int supR3HardenedLdrLoadIt(const char *pszFilename, PRTLDRMOD phLdrMod, char *pszError, size_t cbError)
     2089static int supR3HardenedLdrLoadIt(const char *pszFilename, PRTLDRMOD phLdrMod, uint32_t fFlags, char *pszError, size_t cbError)
    20892090{
    20902091#ifdef VBOX_WITH_HARDENING
     
    21032104     * Try load it.
    21042105     */
    2105     return RTLdrLoadEx(pszFilename, phLdrMod, pszError, cbError);
    2106 }
    2107 
    2108 
    2109 SUPR3DECL(int) SUPR3HardenedLdrLoad(const char *pszFilename, PRTLDRMOD phLdrMod, char *pszError, size_t cbError)
     2106    return RTLdrLoadEx(pszFilename, phLdrMod, fFlags, pszError, cbError);
     2107}
     2108
     2109
     2110SUPR3DECL(int) SUPR3HardenedLdrLoad(const char *pszFilename, PRTLDRMOD phLdrMod, uint32_t fFlags, char *pszError, size_t cbError)
    21102111{
    21112112    /*
     
    21452146     * Pass it on to the common library loader.
    21462147     */
    2147     return supR3HardenedLdrLoadIt(pszFilename, phLdrMod, pszError, cbError);
    2148 }
    2149 
    2150 
    2151 SUPR3DECL(int) SUPR3HardenedLdrLoadAppPriv(const char *pszFilename, PRTLDRMOD phLdrMod, char *pszError, size_t cbError)
    2152 {
    2153     LogFlow(("SUPR3HardenedLdrLoadAppPriv: pszFilename=%p:{%s} phLdrMod=%p pszError=%p cbError=%zu\n", pszFilename, pszFilename, phLdrMod, pszError, cbError));
     2148    return supR3HardenedLdrLoadIt(pszFilename, phLdrMod, fFlags, pszError, cbError);
     2149}
     2150
     2151
     2152SUPR3DECL(int) SUPR3HardenedLdrLoadAppPriv(const char *pszFilename, PRTLDRMOD phLdrMod, uint32_t fFlags, char *pszError, size_t cbError)
     2153{
     2154    LogFlow(("SUPR3HardenedLdrLoadAppPriv: pszFilename=%p:{%s} phLdrMod=%p fFlags=%08x pszError=%p cbError=%zu\n", pszFilename, pszFilename, phLdrMod, fFlags, pszError, cbError));
    21542155
    21552156    /*
     
    22072208     * Pass it on to SUPR3HardenedLdrLoad.
    22082209     */
    2209     rc = SUPR3HardenedLdrLoad(szPath, phLdrMod, pszError, cbError);
     2210    rc = SUPR3HardenedLdrLoad(szPath, phLdrMod, fFlags, pszError, cbError);
    22102211
    22112212    LogFlow(("SUPR3HardenedLdrLoadAppPriv: returns %Rrc\n", rc));
     
    22442245     * Try load it.
    22452246     */
    2246     return RTLdrLoadEx(pszFilename, phLdrMod, pszErr, cbErr);
     2247    return RTLdrLoadEx(pszFilename, phLdrMod, 0 /*=fFlags*/, pszErr, cbErr);
    22472248}
    22482249
Note: See TracChangeset for help on using the changeset viewer.

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