Skip to content
Snippets Groups Projects
Commit f12e3c0b authored by Brian Carrier's avatar Brian Carrier
Browse files

used more generic access for CreateFile

parent 6fe7292f
No related branches found
No related tags found
No related merge requests found
...@@ -198,7 +198,7 @@ raw_open(const TSK_TCHAR * image) ...@@ -198,7 +198,7 @@ raw_open(const TSK_TCHAR * image)
{ {
DWORD dwHi, dwLo; DWORD dwHi, dwLo;
if ((raw_info->fd = CreateFile(image, GENERIC_READ, if ((raw_info->fd = CreateFile(image, FILE_READ_DATA,
FILE_SHARE_READ, NULL, OPEN_EXISTING, 0, NULL)) == FILE_SHARE_READ, NULL, OPEN_EXISTING, 0, NULL)) ==
INVALID_HANDLE_VALUE) { INVALID_HANDLE_VALUE) {
...@@ -209,7 +209,7 @@ raw_open(const TSK_TCHAR * image) ...@@ -209,7 +209,7 @@ raw_open(const TSK_TCHAR * image)
tsk_fprintf(stderr, tsk_fprintf(stderr,
"raw_open: Trying Windows device with share_write mode\n"); "raw_open: Trying Windows device with share_write mode\n");
raw_info->fd = CreateFile(image, GENERIC_READ, raw_info->fd = CreateFile(image, FILE_READ_DATA,
FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, OPEN_EXISTING, 0, NULL); FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, OPEN_EXISTING, 0, NULL);
} }
......
...@@ -59,7 +59,7 @@ split_read_segment(IMG_SPLIT_INFO * split_info, int idx, char *buf, ...@@ -59,7 +59,7 @@ split_read_segment(IMG_SPLIT_INFO * split_info, int idx, char *buf,
} }
#ifdef TSK_WIN32 #ifdef TSK_WIN32
if ((cimg->fd = CreateFile(split_info->images[idx], GENERIC_READ, if ((cimg->fd = CreateFile(split_info->images[idx], FILE_READ_DATA,
0, 0, OPEN_EXISTING, 0, 0)) == INVALID_HANDLE_VALUE) { 0, 0, OPEN_EXISTING, 0, 0)) == INVALID_HANDLE_VALUE) {
tsk_error_reset(); tsk_error_reset();
tsk_errno = TSK_ERR_IMG_OPEN; tsk_errno = TSK_ERR_IMG_OPEN;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment