From 1b21dcc14ef5687ce0d7270b5b3b3e45b2d2421a Mon Sep 17 00:00:00 2001 From: Brian Carrier <carrier@sleuthkit.org> Date: Wed, 29 Apr 2009 14:54:25 +0000 Subject: [PATCH] Changed CreateFile flags for split images to allow READ_SHARE rights --- CHANGES.txt | 4 ++++ tsk3/img/split.c | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGES.txt b/CHANGES.txt index 012e53f72..fef021335 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -89,6 +89,10 @@ lines. Suggested by Simson Garfinkel. 4/28/09: Update: Added ability to build windows executables in VS w/out needing other image format libraries. +4/29/09: Bug Fix: Added the READ_SHARE option to the CreateFile command +for split image files. Patch by Christopher Siwy. + + ---------------- VERSION 3.0.0 -------------- 0/00/00: Update: Many, many, many API changes. diff --git a/tsk3/img/split.c b/tsk3/img/split.c index f50b733b3..0ee6fcabf 100644 --- a/tsk3/img/split.c +++ b/tsk3/img/split.c @@ -60,7 +60,7 @@ split_read_segment(IMG_SPLIT_INFO * split_info, int idx, char *buf, #ifdef TSK_WIN32 if ((cimg->fd = CreateFile(split_info->images[idx], FILE_READ_DATA, - 0, 0, OPEN_EXISTING, 0, 0)) == INVALID_HANDLE_VALUE) { + FILE_SHARE_READ, NULL, OPEN_EXISTING, 0, NULL)) == INVALID_HANDLE_VALUE) { tsk_error_reset(); tsk_errno = TSK_ERR_IMG_OPEN; snprintf(tsk_errstr, TSK_ERRSTR_L, -- GitLab