VirtualBox

Changeset 39086 in vbox


Ignore:
Timestamp:
Oct 24, 2011 9:39:47 AM (14 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
74518
Message:

Dis,SrvPciRaw,Sup: warning fixes.

Location:
trunk/src/VBox
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Bus/SrvPciRawR0.cpp

    r37810 r39086  
    4242#include <iprt/asm-amd64-x86.h>
    4343
     44
     45/*******************************************************************************
     46*   Structures and Typedefs                                                    *
     47*******************************************************************************/
    4448typedef struct PCIRAWSRVSTATE
    4549{
     
    8690static PCIRAWSRVSTATE g_State;
    8791
    88 /* Interrupt handler. Could be called in the interrupt context,
     92
     93/** Interrupt handler. Could be called in the interrupt context,
    8994 * depending on host OS implmenetation. */
    9095static DECLCALLBACK(bool) pcirawr0Isr(void* pContext, int32_t iHostIrq)
     
    114119
    115120    /**
    116      * @todo: RTSemEventSignal() docs claims that it's platform-dependent
     121     * @todo RTSemEventSignal() docs claims that it's platform-dependent
    117122     * if RTSemEventSignal() could be called from the ISR, but it seems IPRT
    118123     * doesn't provide primitives that guaranteed to work this way.
     
    502507{
    503508    PPCIRAWDEV  pThis = (PPCIRAWDEV)pvIns;
     509    NOREF(pvObj); NOREF(pvUnused);
    504510
    505511    /* Forcefully deinit. */
     
    677683    LogFlow(("pcirawr0UnmapRegion\n"));
    678684    int rc;
     685    NOREF(pSession); NOREF(pvAddressR3);
    679686
    680687    GET_PORT(TargetDevice);
     
    693700                            unsigned        cb)
    694701{
    695     /// @todo: add check that port fits into device range
     702    NOREF(pSession); NOREF(TargetDevice);
     703    /// @todo add check that port fits into device range
    696704    switch (cb)
    697705    {
     
    719727                           unsigned          cb)
    720728{
    721     /// @todo: add check that port fits into device range
     729    NOREF(pSession); NOREF(TargetDevice);
     730    /// @todo add check that port fits into device range
    722731    switch (cb)
    723732    {
     
    744753                            PCIRAWMEMLOC      *pValue)
    745754{
    746     /// @todo: add check that address fits into device range
     755    NOREF(pSession); NOREF(TargetDevice);
     756    /// @todo add check that address fits into device range
    747757#if 1
    748758    switch (pValue->cb)
     
    772782                             PCIRAWMEMLOC      *pValue)
    773783{
    774     /// @todo: add check that address fits into device range
     784    NOREF(pSession); NOREF(TargetDevice);
     785    /// @todo add check that address fits into device range
    775786#if 1
    776787    switch (pValue->cb)
  • trunk/src/VBox/Disassembler/DisasmCore.cpp

    r35346 r39086  
    485485    int index;
    486486    const OPCODE *fpop;
    487     unsigned size = 0, ModRM;
     487    unsigned size = 0;
     488    unsigned ModRM;
     489    NOREF(pOp);
    488490
    489491    ModRM = DISReadByte(pCpu, lpszCodeBlock);
     
    566568    const char **ppszSIBIndexReg;
    567569    const char **ppszSIBBaseReg;
     570    NOREF(lpszCodeBlock); NOREF(pOp);
    568571
    569572    scale = pCpu->SIB.Bits.Scale;
     
    637640    unsigned size = sizeof(uint8_t);
    638641    unsigned SIB;
     642    NOREF(pOp); NOREF(pParam);
    639643
    640644    SIB = DISReadByte(pCpu, lpszCodeBlock);
     
    669673    unsigned size = sizeof(uint8_t);
    670674    unsigned SIB;
     675    NOREF(pOp); NOREF(pParam);
    671676
    672677    SIB = DISReadByte(pCpu, lpszCodeBlock);
     
    10881093unsigned ParseIllegal(RTUINTPTR lpszCodeBlock, PCOPCODE pOp, POP_PARAMETER pParam, PDISCPUSTATE pCpu)
    10891094{
     1095    NOREF(lpszCodeBlock); NOREF(pOp); NOREF(pParam); NOREF(pCpu);
    10901096    AssertFailed();
    10911097    return 0;
     
    11901196    ////AssertMsgFailed(("??\n"));
    11911197    //nothing to do apparently
     1198    NOREF(lpszCodeBlock); NOREF(pOp); NOREF(pParam); NOREF(pCpu);
    11921199    return 0;
    11931200}
     
    11961203unsigned ParseImmByte(RTUINTPTR lpszCodeBlock, PCOPCODE pOp, POP_PARAMETER pParam, PDISCPUSTATE pCpu)
    11971204{
     1205    NOREF(pOp);
    11981206    pParam->parval = DISReadByte(pCpu, lpszCodeBlock);
    11991207    pParam->flags |= USE_IMMEDIATE8;
     
    12071215unsigned ParseImmByte_SizeOnly(RTUINTPTR lpszCodeBlock, PCOPCODE pOp, POP_PARAMETER pParam, PDISCPUSTATE pCpu)
    12081216{
     1217    NOREF(lpszCodeBlock); NOREF(pOp); NOREF(pParam); NOREF(pCpu);
    12091218    return sizeof(uint8_t);
    12101219}
     
    12131222unsigned ParseImmByteSX(RTUINTPTR lpszCodeBlock, PCOPCODE pOp, POP_PARAMETER pParam, PDISCPUSTATE pCpu)
    12141223{
     1224    NOREF(pOp);
    12151225    if (pCpu->opmode == CPUMODE_32BIT)
    12161226    {
     
    12411251unsigned ParseImmByteSX_SizeOnly(RTUINTPTR lpszCodeBlock, PCOPCODE pOp, POP_PARAMETER pParam, PDISCPUSTATE pCpu)
    12421252{
     1253    NOREF(lpszCodeBlock); NOREF(pOp); NOREF(pParam); NOREF(pCpu);
    12431254    return sizeof(uint8_t);
    12441255}
     
    12471258unsigned ParseImmUshort(RTUINTPTR lpszCodeBlock, PCOPCODE pOp, POP_PARAMETER pParam, PDISCPUSTATE pCpu)
    12481259{
     1260    NOREF(pOp);
    12491261    pParam->parval = DISReadWord(pCpu, lpszCodeBlock);
    12501262    pParam->flags |= USE_IMMEDIATE16;
     
    12581270unsigned ParseImmUshort_SizeOnly(RTUINTPTR lpszCodeBlock, PCOPCODE pOp, POP_PARAMETER pParam, PDISCPUSTATE pCpu)
    12591271{
     1272    NOREF(lpszCodeBlock); NOREF(pOp); NOREF(pParam); NOREF(pCpu);
    12601273    return sizeof(uint16_t);
    12611274}
     
    12641277unsigned ParseImmUlong(RTUINTPTR lpszCodeBlock, PCOPCODE pOp, POP_PARAMETER pParam, PDISCPUSTATE pCpu)
    12651278{
     1279    NOREF(pOp);
    12661280    pParam->parval = DISReadDWord(pCpu, lpszCodeBlock);
    12671281    pParam->flags |= USE_IMMEDIATE32;
     
    12751289unsigned ParseImmUlong_SizeOnly(RTUINTPTR lpszCodeBlock, PCOPCODE pOp, POP_PARAMETER pParam, PDISCPUSTATE pCpu)
    12761290{
     1291    NOREF(lpszCodeBlock); NOREF(pOp); NOREF(pParam); NOREF(pCpu);
    12771292    return sizeof(uint32_t);
    12781293}
     
    12811296unsigned ParseImmQword(RTUINTPTR lpszCodeBlock, PCOPCODE pOp, POP_PARAMETER pParam, PDISCPUSTATE pCpu)
    12821297{
     1298    NOREF(pOp);
    12831299    pParam->parval = DISReadQWord(pCpu, lpszCodeBlock);
    12841300    pParam->flags |= USE_IMMEDIATE64;
     
    12931309unsigned ParseImmQword_SizeOnly(RTUINTPTR lpszCodeBlock, PCOPCODE pOp, POP_PARAMETER pParam, PDISCPUSTATE pCpu)
    12941310{
     1311    NOREF(lpszCodeBlock); NOREF(pOp); NOREF(pParam); NOREF(pCpu);
    12951312    return sizeof(uint64_t);
    12961313}
     
    12991316unsigned ParseImmV(RTUINTPTR lpszCodeBlock, PCOPCODE pOp, POP_PARAMETER pParam, PDISCPUSTATE pCpu)
    13001317{
     1318    NOREF(pOp);
    13011319    if (pCpu->opmode == CPUMODE_32BIT)
    13021320    {
     
    13321350unsigned ParseImmV_SizeOnly(RTUINTPTR lpszCodeBlock, PCOPCODE pOp, POP_PARAMETER pParam, PDISCPUSTATE pCpu)
    13331351{
     1352    NOREF(lpszCodeBlock); NOREF(pOp); NOREF(pParam);
    13341353    if (pCpu->opmode == CPUMODE_32BIT)
    13351354        return sizeof(uint32_t);
    1336     else
    13371355    if (pCpu->opmode == CPUMODE_64BIT)
    13381356        return sizeof(uint64_t);
    1339 
    13401357    return sizeof(uint16_t);
    13411358}
     
    13441361unsigned ParseImmZ(RTUINTPTR lpszCodeBlock, PCOPCODE pOp, POP_PARAMETER pParam, PDISCPUSTATE pCpu)
    13451362{
     1363    NOREF(pOp);
    13461364    /* Word for 16-bit operand-size or doubleword for 32 or 64-bit operand-size. */
    13471365    if (pCpu->opmode == CPUMODE_16BIT)
     
    13781396unsigned ParseImmZ_SizeOnly(RTUINTPTR lpszCodeBlock, PCOPCODE pOp, POP_PARAMETER pParam, PDISCPUSTATE pCpu)
    13791397{
     1398    NOREF(lpszCodeBlock); NOREF(pOp); NOREF(pParam);
    13801399    /* Word for 16-bit operand-size or doubleword for 32 or 64-bit operand-size. */
    13811400    if (pCpu->opmode == CPUMODE_16BIT)
     
    13891408unsigned ParseImmBRel(RTUINTPTR lpszCodeBlock, PCOPCODE pOp, POP_PARAMETER pParam, PDISCPUSTATE pCpu)
    13901409{
     1410    NOREF(pOp);
    13911411    pParam->parval = DISReadByte(pCpu, lpszCodeBlock);
    13921412    pParam->flags |= USE_IMMEDIATE8_REL;
     
    14011421unsigned ParseImmBRel_SizeOnly(RTUINTPTR lpszCodeBlock, PCOPCODE pOp, POP_PARAMETER pParam, PDISCPUSTATE pCpu)
    14021422{
     1423    NOREF(lpszCodeBlock); NOREF(pOp); NOREF(pParam); NOREF(pCpu);
    14031424    return sizeof(char);
    14041425}
     
    14081429unsigned ParseImmVRel(RTUINTPTR lpszCodeBlock, PCOPCODE pOp, POP_PARAMETER pParam, PDISCPUSTATE pCpu)
    14091430{
     1431    NOREF(pOp);
    14101432    if (pCpu->opmode == CPUMODE_32BIT)
    14111433    {
     
    14431465unsigned ParseImmVRel_SizeOnly(RTUINTPTR lpszCodeBlock, PCOPCODE pOp, POP_PARAMETER pParam, PDISCPUSTATE pCpu)
    14441466{
     1467    NOREF(lpszCodeBlock); NOREF(pOp); NOREF(pParam);
    14451468    if (pCpu->opmode == CPUMODE_16BIT)
    14461469        return sizeof(int16_t);
     
    15251548unsigned ParseImmAddr_SizeOnly(RTUINTPTR lpszCodeBlock, PCOPCODE pOp, POP_PARAMETER pParam, PDISCPUSTATE pCpu)
    15261549{
     1550    NOREF(lpszCodeBlock); NOREF(pOp);
    15271551    if (pCpu->addrmode == CPUMODE_32BIT)
    15281552    {
     
    15571581unsigned ParseFixedReg(RTUINTPTR lpszCodeBlock, PCOPCODE pOp, POP_PARAMETER pParam, PDISCPUSTATE pCpu)
    15581582{
     1583    NOREF(lpszCodeBlock);
     1584
    15591585    /*
    15601586     * Sets up flags for stored in OPC fixed registers.
     
    16561682unsigned ParseXv(RTUINTPTR pu8CodeBlock, PCOPCODE pOp, POP_PARAMETER pParam, PDISCPUSTATE pCpu)
    16571683{
     1684    NOREF(pu8CodeBlock);
    16581685    disasmGetPtrString(pCpu, pOp, pParam);
    16591686    disasmAddString(pParam->szParam, (pCpu->addrmode == CPUMODE_32BIT) ? "DS:ESI" : "DS:SI");
     
    16821709unsigned ParseXb(RTUINTPTR pu8CodeBlock, PCOPCODE pOp, POP_PARAMETER pParam, PDISCPUSTATE pCpu)
    16831710{
     1711    NOREF(pu8CodeBlock); NOREF(pOp);
    16841712    disasmAddString(pParam->szParam, (pCpu->addrmode == CPUMODE_32BIT) ? "DS:ESI" : "DS:SI");
    16851713
     
    17071735unsigned ParseYv(RTUINTPTR pu8CodeBlock, PCOPCODE pOp, POP_PARAMETER pParam, PDISCPUSTATE pCpu)
    17081736{
     1737    NOREF(pu8CodeBlock);
    17091738    disasmGetPtrString(pCpu, pOp, pParam);
    17101739    disasmAddString(pParam->szParam, (pCpu->addrmode == CPUMODE_32BIT) ? "ES:EDI" : "ES:DI");
     
    17331762unsigned ParseYb(RTUINTPTR pu8CodeBlock, PCOPCODE pOp, POP_PARAMETER pParam, PDISCPUSTATE pCpu)
    17341763{
     1764    NOREF(pu8CodeBlock); NOREF(pOp);
    17351765    disasmAddString(pParam->szParam, (pCpu->addrmode == CPUMODE_32BIT) ? "ES:EDI" : "ES:DI");
    17361766
     
    17601790    const OPCODE *pOpcode;
    17611791    int           size    = sizeof(uint8_t);
     1792    NOREF(pOp); NOREF(pParam);
    17621793
    17631794    /* 2nd byte */
     
    18181849    const OPCODE *pOpcode;
    18191850    int           size    = sizeof(uint8_t);
     1851    NOREF(pOp); NOREF(pParam);
    18201852
    18211853    /* 3rd byte */
     
    18781910    const OPCODE *pOpcode;
    18791911    int           size    = sizeof(uint8_t);
     1912    NOREF(pOp); NOREF(pParam);
    18801913
    18811914    /* 3rd byte */
     
    19111944{
    19121945    unsigned size = 0;
     1946    NOREF(pParam);
    19131947
    19141948    if (pCpu->prefix & PREFIX_REP)
     
    19291963    int idx = (pCpu->opcode - 0x80) * 8;
    19301964    unsigned size = 0, modrm, reg;
     1965    NOREF(pParam);
    19311966
    19321967    modrm = DISReadByte(pCpu, lpszCodeBlock);
     
    19481983    int idx;
    19491984    unsigned size = 0, modrm, reg;
     1985    NOREF(pParam);
    19501986
    19511987    switch (pCpu->opcode)
     
    19872023    int idx = (pCpu->opcode - 0xF6) * 8;
    19882024    unsigned size = 0, modrm, reg;
     2025    NOREF(pParam);
    19892026
    19902027    modrm = DISReadByte(pCpu, lpszCodeBlock);
     
    20062043{
    20072044    unsigned size = 0, modrm, reg;
     2045    NOREF(pParam);
    20082046
    20092047    modrm = DISReadByte(pCpu, lpszCodeBlock);
     
    20252063{
    20262064    unsigned size = 0, modrm, reg;
     2065    NOREF(pParam);
    20272066
    20282067    modrm = DISReadByte(pCpu, lpszCodeBlock);
     
    20842123{
    20852124    unsigned size = 0, modrm, reg;
     2125    NOREF(pParam);
    20862126
    20872127    modrm = DISReadByte(pCpu, lpszCodeBlock);
     
    21032143{
    21042144    unsigned size = 0, modrm, reg, rm, mod;
     2145    NOREF(pParam);
    21052146
    21062147    modrm = DISReadByte(pCpu, lpszCodeBlock);
     
    21302171{
    21312172    unsigned size = 0, modrm, reg;
     2173    NOREF(pParam);
    21322174
    21332175    modrm = DISReadByte(pCpu, lpszCodeBlock);
     
    21492191{
    21502192    unsigned size = 0, modrm, reg;
     2193    NOREF(pParam);
    21512194
    21522195    modrm = DISReadByte(pCpu, lpszCodeBlock);
     
    21682211{
    21692212    unsigned size = 0, modrm, reg;
     2213    NOREF(pParam);
    21702214
    21712215    modrm = DISReadByte(pCpu, lpszCodeBlock);
     
    21872231{
    21882232    unsigned size = 0, modrm, reg;
     2233    NOREF(pParam);
    21892234
    21902235    modrm = DISReadByte(pCpu, lpszCodeBlock);
     
    22082253{
    22092254    unsigned size = 0, modrm, reg;
     2255    NOREF(pParam);
    22102256
    22112257    modrm = DISReadByte(pCpu, lpszCodeBlock);
     
    22292275{
    22302276    unsigned size = 0, modrm, reg;
     2277    NOREF(pParam);
    22312278
    22322279    modrm = DISReadByte(pCpu, lpszCodeBlock);
     
    22502297{
    22512298    unsigned size = 0, modrm, reg, mod, rm;
     2299    NOREF(pParam);
    22522300
    22532301    modrm = DISReadByte(pCpu, lpszCodeBlock);
     
    22732321{
    22742322    unsigned size = 0, modrm, reg;
     2323    NOREF(pParam);
    22752324
    22762325    modrm = DISReadByte(pCpu, lpszCodeBlock);
     
    23012350{
    23022351    int subtype, type, mod;
     2352    NOREF(pOp); NOREF(pCpu);
    23032353
    23042354    mod     = pCpu->ModRM.Bits.Mod;
     
    23832433void disasmModRMReg16(PDISCPUSTATE pCpu, PCOPCODE pOp, unsigned idx, POP_PARAMETER pParam)
    23842434{
     2435    NOREF(pCpu); NOREF(pOp);
    23852436    disasmAddString(pParam->szParam, szModRMReg1616[idx]);
    23862437    pParam->flags |= USE_REG_GEN16;
     
    23962447void disasmModRMSReg(PDISCPUSTATE pCpu, PCOPCODE pOp, unsigned idx, POP_PARAMETER pParam)
    23972448{
     2449    NOREF(pCpu); NOREF(pOp);
    23982450#if 0 //def DEBUG_Sander
    23992451    AssertMsg(idx < RT_ELEMENTS(szModRMSegReg), ("idx=%d\n", idx));
     
    24162468void disasmPrintAbs32(POP_PARAMETER pParam)
    24172469{
    2418     disasmAddStringF1(pParam->szParam, "%08Xh", pParam->disp32);
     2470    disasmAddStringF1(pParam->szParam, "%08Xh", pParam->disp32); NOREF(pParam);
    24192471}
    24202472//*****************************************************************************
     
    24222474void disasmPrintDisp32(POP_PARAMETER pParam)
    24232475{
    2424     disasmAddStringF1(pParam->szParam, "%08Xh", pParam->disp32);
     2476    disasmAddStringF1(pParam->szParam, "%08Xh", pParam->disp32); NOREF(pParam);
    24252477}
    24262478//*****************************************************************************
     
    24282480void disasmPrintDisp64(POP_PARAMETER pParam)
    24292481{
    2430     disasmAddStringF1(pParam->szParam, "%16RX64h", pParam->disp64);
     2482    disasmAddStringF1(pParam->szParam, "%16RX64h", pParam->disp64); NOREF(pParam);
    24312483}
    24322484//*****************************************************************************
     
    24342486void disasmPrintDisp8(POP_PARAMETER pParam)
    24352487{
    2436     disasmAddStringF1(pParam->szParam, "%d", pParam->disp8);
     2488    disasmAddStringF1(pParam->szParam, "%d", pParam->disp8); NOREF(pParam);
    24372489}
    24382490//*****************************************************************************
     
    24402492void disasmPrintDisp16(POP_PARAMETER pParam)
    24412493{
    2442     disasmAddStringF1(pParam->szParam, "%04Xh", pParam->disp16);
     2494    disasmAddStringF1(pParam->szParam, "%04Xh", pParam->disp16); NOREF(pParam);
    24432495}
    24442496//*****************************************************************************
     
    24472499{
    24482500    int subtype = OP_PARM_VSUBTYPE(pParam->param);
     2501    NOREF(pOp);
    24492502
    24502503    if (subtype == OP_PARM_v)
  • trunk/src/VBox/Disassembler/DisasmReg.cpp

    r35346 r39086  
    776776DISDECL(int) DISQueryParamRegPtr(PCPUMCTXCORE pCtx, PDISCPUSTATE pCpu, POP_PARAMETER pParam, void **ppReg, size_t *pcbSize)
    777777{
     778    NOREF(pCpu);
    778779    if (pParam->flags & (USE_REG_GEN8|USE_REG_GEN16|USE_REG_GEN32|USE_REG_FP|USE_REG_MMX|USE_REG_XMM|USE_REG_CR|USE_REG_DBG|USE_REG_SEG|USE_REG_TEST))
    779780    {
  • 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.

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