Changeset 70884 in vbox
- Timestamp:
- Feb 6, 2018 4:26:08 PM (7 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/iprt/dir.h
r69761 r70884 352 352 /** Deny relative opening of anything above this directory. */ 353 353 #define RTDIR_F_DENY_ASCENT RT_BIT_32(1) 354 /** Don't follow symbolic links in the final component. */ 355 #define RTDIR_F_NO_FOLLOW RT_BIT_32(2) 354 356 /** Valid flag mask. */ 355 #define RTDIR_F_VALID_MASK UINT32_C(0x0000000 3)357 #define RTDIR_F_VALID_MASK UINT32_C(0x00000007) 356 358 /** @} */ 357 359 -
trunk/src/VBox/Runtime/r3/nt/direnum-r3-nt.cpp
r70419 r70884 108 108 #endif 109 109 if (hRelativeDir == ~(uintptr_t)0 && pvNativeRelative == NULL) 110 { 111 AssertMsg(pDir->fFlags & RTDIR_F_NO_FOLLOW /* Add FILE_OPEN_REPARSE_POINT and see how that works out (it better!). Need fallbacks for pre Vista. */, 112 ("Implement RTDIR_F_NO_FOLLOW!\n")); 110 113 rc = RTNtPathOpenDir(pszPathBuf, 111 114 FILE_LIST_DIRECTORY | FILE_READ_ATTRIBUTES | FILE_TRAVERSE | SYNCHRONIZE, … … 120 123 #endif 121 124 ); 125 } 122 126 else if (pvNativeRelative != NULL) 127 { 128 AssertMsg(pDir->fFlags & RTDIR_F_NO_FOLLOW /* Add FILE_OPEN_REPARSE_POINT and see how that works out (it better!). Need fallbacks for pre Vista. */, 129 ("Implement RTDIR_F_NO_FOLLOW!\n")); 123 130 rc = RTNtPathOpenDirEx((HANDLE)hRelativeDir, 124 131 (struct _UNICODE_STRING *)pvNativeRelative, … … 135 142 136 143 ); 144 } 137 145 else 138 146 { -
trunk/src/VBox/Runtime/r3/posix/dir-posix.cpp
r69753 r70884 237 237 if (RT_SUCCESS(rc)) 238 238 { 239 pDir->pDir = opendir(pszNativePath); 239 if (!(pDir->fFlags & RTDIR_F_NO_FOLLOW)) 240 pDir->pDir = opendir(pszNativePath); 241 else 242 { 243 AssertMsgFailed(("implement RTDIR_F_NO_FOLLOW\n")); 244 pDir->pDir = opendir(pszNativePath); 245 } 240 246 if (pDir->pDir) 241 247 {
Note:
See TracChangeset
for help on using the changeset viewer.