VirtualBox

Ignore:
Timestamp:
Jun 14, 2019 4:33:05 PM (6 years ago)
Author:
vboxsync
Message:

IPRT/rtFsModeFromDos: Pass desired object type when normalizing mode masks where the type is implicit (e.g. RTDirCreate). ticketref:18345 bugref:9172

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/common/vfs/vfsbase.cpp

    r77047 r79155  
    13221322    AssertReturn(pThis->uMagic == RTVFSOBJ_MAGIC, VERR_INVALID_HANDLE);
    13231323
    1324     fMode = rtFsModeNormalize(fMode, NULL, 0);
     1324    fMode = rtFsModeNormalize(fMode, NULL, 0, 0);
    13251325    if (!rtFsModeIsValid(fMode))
    13261326        return VERR_INVALID_PARAMETER;
     
    27492749    AssertPtrNullReturn(phVfsDir, VERR_INVALID_POINTER);
    27502750    AssertReturn(!(fFlags & ~RTDIRCREATE_FLAGS_VALID_MASK), VERR_INVALID_FLAGS);
    2751     fMode = rtFsModeNormalize(fMode, pszRelPath, 0);
     2751    fMode = rtFsModeNormalize(fMode, pszRelPath, 0, RTFS_TYPE_DIRECTORY);
    27522752    AssertReturn(rtFsModeIsValidPermissions(fMode), VERR_INVALID_FMODE);
    27532753    if (!(fFlags & RTDIRCREATE_FLAGS_NOT_CONTENT_INDEXED_DONT_SET))
     
    33023302    AssertReturn(pThis->uMagic == RTVFSSYMLINK_MAGIC, VERR_INVALID_HANDLE);
    33033303
    3304     fMode = rtFsModeNormalize(fMode, NULL, 0);
     3304    fMode = rtFsModeNormalize(fMode, NULL, 0, RTFS_TYPE_SYMLINK);
    33053305    if (!rtFsModeIsValid(fMode))
    33063306        return VERR_INVALID_PARAMETER;
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