VirtualBox

Changeset 39086 in vbox for trunk/src/VBox/HostDrivers


Ignore:
Timestamp:
Oct 24, 2011 9:39:47 AM (13 years ago)
Author:
vboxsync
Message:

Dis,SrvPciRaw,Sup: warning fixes.

Location:
trunk/src/VBox/HostDrivers/Support
Files:
2 edited

Legend:

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

    r37955 r39086  
    580580static int supCallVMMR0ExFake(PVMR0 pVMR0, unsigned uOperation, uint64_t u64Arg, PSUPVMMR0REQHDR pReqHdr)
    581581{
    582     AssertMsgFailed(("%d\n", uOperation));
     582    AssertMsgFailed(("%d\n", uOperation)); NOREF(pVMR0); NOREF(uOperation); NOREF(u64Arg); NOREF(pReqHdr);
    583583    return VERR_NOT_SUPPORTED;
    584584}
     
    587587SUPR3DECL(int) SUPR3CallVMMR0Fast(PVMR0 pVMR0, unsigned uOperation, VMCPUID idCpu)
    588588{
     589    NOREF(pVMR0);
    589590    if (RT_LIKELY(uOperation == SUP_VMMR0_DO_RAW_RUN))
    590591        return suplibOsIOCtlFast(&g_supLibData, SUP_IOCTL_FAST_DO_RAW_RUN, idCpu);
     
    10401041    AssertPtrNullReturn(paPages, VERR_INVALID_POINTER);
    10411042    AssertMsgReturn(cPages > 0 && cPages <= VBOX_MAX_ALLOC_PAGE_COUNT, ("cPages=%zu\n", cPages), VERR_PAGE_COUNT_OUT_OF_RANGE);
     1043    AssertReturn(!fFlags, VERR_INVALID_PARAMETER);
    10421044
    10431045    /* fake */
     
    15381540    return rc;
    15391541#else
     1542    NOREF(pszDirPath); NOREF(fRecursive); NOREF(fCheckFiles);
    15401543    return VINF_SUCCESS;
    15411544#endif
     
    16151618                                                    const char *pszSymbol, unsigned uSymbol, RTUINTPTR *pValue, void *pvUser)
    16161619{
     1620    NOREF(hLdrMod); NOREF(pvUser); NOREF(uSymbol);
    16171621    AssertPtr(pValue);
    16181622    AssertPtr(pvUser);
     
    17541758        pArgs->cbStrings += strlen(pszSymbol) + 1;
    17551759    }
     1760    NOREF(hLdrMod); NOREF(uSymbol);
    17561761    return VINF_SUCCESS;
    17571762}
     
    17861791        pArgs->psz += cbCopy;
    17871792    }
     1793    NOREF(hLdrMod); NOREF(uSymbol);
    17881794    return VINF_SUCCESS;
    17891795}
     
    22322238SUPR3DECL(int) SUPR3HardenedLdrLoadPlugIn(const char *pszFilename, PRTLDRMOD phLdrMod, PRTERRINFO pErrInfo)
    22332239{
    2234     int rc;
    2235 
    22362240    /*
    22372241     * Validate input.
     
    22472251     * Verify the image file.
    22482252     */
    2249     rc = supR3HardenedVerifyFile(pszFilename, RTHCUINTPTR_MAX, pErrInfo);
     2253    int rc = supR3HardenedVerifyFile(pszFilename, RTHCUINTPTR_MAX, pErrInfo);
    22502254    if (RT_FAILURE(rc))
    22512255    {
  • trunk/src/VBox/HostDrivers/Support/SUPR3HardenedVerify.cpp

    r37344 r39086  
    278278     */
    279279    int rc = supR3HardenedMakePath(pFile->enmDir, pszDst, cchDst, fFatal);
    280     if (RT_SUCCESS(rc))
     280    if (RT_SUCCESS(rc) && fWithFilename)
    281281    {
    282282        size_t cchFile = strlen(pFile->pszFile);
     
    456456    {
    457457        char szPath[RTPATH_MAX];
    458         rc = supR3HardenedMakeFilePath(pFile, szPath, sizeof(szPath), true, fFatal);
     458        rc = supR3HardenedMakeFilePath(pFile, szPath, sizeof(szPath), true /*fWithFilename*/, fFatal);
    459459        if (RT_SUCCESS(rc))
    460460        {
     
    11351135#if defined(RT_OS_WINDOWS)
    11361136    /** @todo Windows hardening. */
     1137    NOREF(pFsObjState); NOREF(fDir); NOREF(fRelaxed); NOREF(pszPath); NOREF(pErrInfo);
    11371138    return VINF_SUCCESS;
    11381139
    11391140#elif defined(RT_OS_OS2)
    11401141    /* No hardening here - it's a single user system. */
     1142    NOREF(pFsObjState); NOREF(fDir); NOREF(fRelaxed); NOREF(pszPath); NOREF(pErrInfo);
    11411143    return VINF_SUCCESS;
    11421144
     
    11861188           full access. So, to work around we relax the hardening a bit and
    11871189           permit grand parents and beyond to be group writable by admin. */
    1188         if (pFsObjState->Stat.st_gid != 80 /*admin*/) /** @todo dynamically resolve the admin group? */
     1190        if (!fRelaxed || pFsObjState->Stat.st_gid != 80 /*admin*/) /** @todo dynamically resolve the admin group? */
    11891191#elif defined(RT_OS_FREEBSD)
    11901192        /* HACK ALERT: PC-BSD 9 has group-writable application directory,
    1191            similar to OS X and their /Applications directory (see above). */
    1192         if (pFsObjState->Stat.st_gid != 5 /*operators*/)
     1193           similar to OS X and their /Applications directory (see above).
     1194           On FreeBSD root is normally the only member of this group. */
     1195        /** @todo Can we test for fRelaxed here like on the mac or is the 'operator'
     1196         *        group the owner of the immediate installation directory? More
     1197         *        details would be greatly appreciated as this HACK affects real FreeBSD
     1198         *        as well as the PC-BSD fork! */
     1199        if (pFsObjState->Stat.st_gid != 5 /*operator*/)
    11931200#endif
    11941201            return supR3HardenedSetError3(VERR_SUPLIB_WRITE_NON_SYS_GROUP, pErrInfo,
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