Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
Sleuthkit
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
IRT
Sleuthkit
Commits
86903d1a
Commit
86903d1a
authored
16 years ago
by
Brian Carrier
Browse files
Options
Downloads
Patches
Plain Diff
Fix bug that caused ext/ffs sparse blocks to not be set as content block-type (2475246)
parent
6db39587
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
tsk3/fs/ext2fs.c
+3
-0
3 additions, 0 deletions
tsk3/fs/ext2fs.c
tsk3/fs/ffs.c
+4
-0
4 additions, 0 deletions
tsk3/fs/ffs.c
tsk3/fs/tsk_fs.h
+5
-5
5 additions, 5 deletions
tsk3/fs/tsk_fs.h
with
12 additions
and
5 deletions
tsk3/fs/ext2fs.c
+
3
−
0
View file @
86903d1a
...
@@ -886,6 +886,9 @@ ext2fs_block_getflags(TSK_FS_INFO * a_fs, TSK_DADDR_T a_addr)
...
@@ -886,6 +886,9 @@ ext2fs_block_getflags(TSK_FS_INFO * a_fs, TSK_DADDR_T a_addr)
TSK_DADDR_T
dmin
=
0
;
/* first block after inodes */
TSK_DADDR_T
dmin
=
0
;
/* first block after inodes */
// these blocks are not described in the group descriptors
// these blocks are not described in the group descriptors
// sparse
if
(
a_addr
==
0
)
return
TSK_FS_BLOCK_FLAG_CONT
|
TSK_FS_BLOCK_FLAG_ALLOC
;
if
(
a_addr
<
ext2fs
->
first_data_block
)
if
(
a_addr
<
ext2fs
->
first_data_block
)
return
TSK_FS_BLOCK_FLAG_META
|
TSK_FS_BLOCK_FLAG_ALLOC
;
return
TSK_FS_BLOCK_FLAG_META
|
TSK_FS_BLOCK_FLAG_ALLOC
;
...
...
This diff is collapsed.
Click to expand it.
tsk3/fs/ffs.c
+
4
−
0
View file @
86903d1a
...
@@ -1046,6 +1046,10 @@ ffs_block_getflags(TSK_FS_INFO * a_fs, TSK_DADDR_T a_addr)
...
@@ -1046,6 +1046,10 @@ ffs_block_getflags(TSK_FS_INFO * a_fs, TSK_DADDR_T a_addr)
unsigned
char
*
freeblocks
=
NULL
;
unsigned
char
*
freeblocks
=
NULL
;
int
flags
;
int
flags
;
// sparse
if
(
a_addr
==
0
)
return
TSK_FS_BLOCK_FLAG_CONT
|
TSK_FS_BLOCK_FLAG_ALLOC
;
grp_num
=
dtog_lcl
(
a_fs
,
ffs
->
fs
.
sb1
,
a_addr
);
grp_num
=
dtog_lcl
(
a_fs
,
ffs
->
fs
.
sb1
,
a_addr
);
if
(
ffs_group_load
(
ffs
,
grp_num
))
{
if
(
ffs_group_load
(
ffs
,
grp_num
))
{
...
...
This diff is collapsed.
Click to expand it.
tsk3/fs/tsk_fs.h
+
5
−
5
View file @
86903d1a
...
@@ -64,11 +64,11 @@ extern "C" {
...
@@ -64,11 +64,11 @@ extern "C" {
TSK_FS_BLOCK_FLAG_UNALLOC
=
0x0002
,
///< Block is unallocated (and not TSK_FS_BLOCK_FLAG_ALLOC)
TSK_FS_BLOCK_FLAG_UNALLOC
=
0x0002
,
///< Block is unallocated (and not TSK_FS_BLOCK_FLAG_ALLOC)
TSK_FS_BLOCK_FLAG_CONT
=
0x0004
,
///< Block (could) contain file content (and not TSK_FS_BLOCK_FLAG_META)
TSK_FS_BLOCK_FLAG_CONT
=
0x0004
,
///< Block (could) contain file content (and not TSK_FS_BLOCK_FLAG_META)
TSK_FS_BLOCK_FLAG_META
=
0x0008
,
///< Block (could) contain file system metadata (and not TSK_FS_BLOCK_FLAG_CONT)
TSK_FS_BLOCK_FLAG_META
=
0x0008
,
///< Block (could) contain file system metadata (and not TSK_FS_BLOCK_FLAG_CONT)
TSK_FS_BLOCK_FLAG_
RAW
=
0x0010
,
///<
The data
has been
read raw from the disk and is not compressed, encrypted, sparse etc.
TSK_FS_BLOCK_FLAG_
BAD
=
0x0010
,
///<
Block
has been
marked as bad by the file system
TSK_FS_BLOCK_FLAG_
BAD
=
0x0020
,
///<
Block
has been
marked as bad by the file system
TSK_FS_BLOCK_FLAG_
RAW
=
0x0020
,
///<
The data
has been
read raw from the disk (and not COMP or SPARSE)
TSK_FS_BLOCK_FLAG_
RES
=
0x0040
,
///< The data passed in the file_walk cal
l
back
is from an NTFS resident file
TSK_FS_BLOCK_FLAG_
SPARSE
=
0x0040
,
///< The data passed in the file_walk calback
was stored as sparse (all zeros) (and not RAW or COMP)
TSK_FS_BLOCK_FLAG_
SPARSE
=
0x0080
,
///< The data passed in the file_walk calback was stored
as sparse (all zeros
)
TSK_FS_BLOCK_FLAG_
COMP
=
0x0080
,
///< The data passed in the file_walk cal
l
back was stored
in a compressed form (and not RAW or SPARSE
)
TSK_FS_BLOCK_FLAG_
COMP
=
0x0100
///< The data passed in the file_walk callback
was stored in a compressed form
TSK_FS_BLOCK_FLAG_
RES
=
0x0100
///< The data passed in the file_walk callback
is from an NTFS resident file
};
};
typedef
enum
TSK_FS_BLOCK_FLAG_ENUM
TSK_FS_BLOCK_FLAG_ENUM
;
typedef
enum
TSK_FS_BLOCK_FLAG_ENUM
TSK_FS_BLOCK_FLAG_ENUM
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment