Changeset 58730 in vbox
- Timestamp:
- Nov 18, 2015 1:32:53 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/HostDrivers/Support/win/SUPR3HardenedMain-win.cpp
r58405 r58730 1155 1155 1156 1156 /** 1157 * Translates VBox status code (from supHardenedWinVerifyImageTrust) to an NT 1158 * status. 1159 * 1160 * @returns NT status. 1161 * @param rc VBox status code. 1162 */ 1163 static NTSTATUS supR3HardenedScreenImageCalcStatus(int rc) 1164 { 1165 /* This seems to be what LdrLoadDll returns when loading a 32-bit DLL into 1166 a 64-bit process. At least here on windows 10 (2015-11-xx). 1167 1168 NtCreateSection probably returns something different, possibly a warning, 1169 we currently don't distinguish between the too, so we stick with the 1170 LdrLoadDll one as it's definitely an error.*/ 1171 if (rc == VERR_LDR_ARCH_MISMATCH) 1172 return STATUS_INVALID_IMAGE_FORMAT; 1173 1174 return STATUS_TRUST_FAILURE; 1175 } 1176 1177 1178 /** 1157 1179 * Screens an image file or file mapped with execute access. 1158 1180 * … … 1264 1286 "supR3HardenedScreenImage/%s: cached rc=%Rrc fImage=%d fProtect=%#x fAccess=%#x cHits=%u %ls\n", 1265 1287 pszCaller, pCacheHit->rc, fImage, *pfProtect, *pfAccess, cHits, uBuf.UniStr.Buffer); 1266 return STATUS_TRUST_FAILURE;1288 return supR3HardenedScreenImageCalcStatus(pCacheHit->rc); 1267 1289 } 1268 1290 … … 1450 1472 if (hMyFile != hFile) 1451 1473 supR3HardenedWinVerifyCacheInsert(&uBuf.UniStr, hMyFile, rc, fWinVerifyTrust, fFlags); 1452 return STATUS_TRUST_FAILURE;1474 return supR3HardenedScreenImageCalcStatus(rc); 1453 1475 } 1454 1476
Note:
See TracChangeset
for help on using the changeset viewer.