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
5c36f343
Commit
5c36f343
authored
13 years ago
by
Brian Carrier
Browse files
Options
Downloads
Plain Diff
Merge pull request #8 from pidge/master
Added 'sequence' field to tsk_file_layout
parents
7200d9d5
cce7f1ba
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
tsk3/auto/auto_db.cpp
+3
-1
3 additions, 1 deletion
tsk3/auto/auto_db.cpp
tsk3/auto/db_sqlite.cpp
+5
-4
5 additions, 4 deletions
tsk3/auto/db_sqlite.cpp
tsk3/auto/tsk_db_sqlite.h
+1
-1
1 addition, 1 deletion
tsk3/auto/tsk_db_sqlite.h
with
9 additions
and
6 deletions
tsk3/auto/auto_db.cpp
+
3
−
1
View file @
5c36f343
...
...
@@ -547,6 +547,8 @@ TskAutoDb::processAttribute(TSK_FS_FILE * fs_file,
if
((
m_blkMapFlag
)
&&
(
isNonResident
(
fs_attr
))
&&
(
isDotDir
(
fs_file
,
path
)
==
0
))
{
TSK_FS_ATTR_RUN
*
run
;
int
sequence
=
0
;
for
(
run
=
fs_attr
->
nrd
.
run
;
run
!=
NULL
;
run
=
run
->
next
)
{
unsigned
int
block_size
=
fs_file
->
fs_info
->
block_size
;
...
...
@@ -556,7 +558,7 @@ TskAutoDb::processAttribute(TSK_FS_FILE * fs_file,
// @@@ We probaly want ot keep on going here
if
(
m_db
->
addFsBlockInfo
(
m_curFsId
,
m_curFileId
,
run
->
addr
*
block_size
,
run
->
len
*
block_size
))
{
run
->
addr
*
block_size
,
run
->
len
*
block_size
,
sequence
++
))
{
return
TSK_ERR
;
}
}
...
...
This diff is collapsed.
Click to expand it.
tsk3/auto/db_sqlite.cpp
+
5
−
4
View file @
5c36f343
...
...
@@ -242,7 +242,7 @@ int
if
(
m_blkMapFlag
)
{
if
(
attempt_exec
(
"CREATE TABLE tsk_file_layout (fs_id INTEGER NOT NULL, byte_start INTEGER NOT NULL, byte_len INTEGER NOT NULL, obj_id);"
,
(
"CREATE TABLE tsk_file_layout (fs_id INTEGER NOT NULL, byte_start INTEGER NOT NULL, byte_len INTEGER NOT NULL, obj_id
INTEGER, sequence INTEGER
);"
,
"Error creating tsk_fs_blocks table: %s
\n
"
))
{
return
1
;
}
...
...
@@ -737,18 +737,19 @@ int
* @param a_fileObjId ID of the file
* @param a_byteStart Byte address relative to the start of the image file
* @param a_byteLen Length of the run in bytes
* @param a_sequence Sequence of this run in the file
* @returns 1 on error
*/
int
TskDbSqlite
::
addFsBlockInfo
(
int64_t
a_fsObjId
,
int64_t
a_fileObjId
,
uint64_t
a_byteStart
,
uint64_t
a_byteLen
)
uint64_t
a_byteStart
,
uint64_t
a_byteLen
,
int
a_sequence
)
{
char
foo
[
1024
];
snprintf
(
foo
,
1024
,
"INSERT INTO tsk_file_layout (fs_id, byte_start, byte_len, obj_id) VALUES (%lld, %lld, %llu, %llu)"
,
a_fsObjId
,
a_byteStart
,
a_byteLen
,
a_fileObjId
);
"INSERT INTO tsk_file_layout (fs_id, byte_start, byte_len, obj_id
, sequence
) VALUES (%lld, %lld, %llu, %llu
, %d
)"
,
a_fsObjId
,
a_byteStart
,
a_byteLen
,
a_fileObjId
,
a_sequence
);
return
attempt_exec
(
foo
,
"Error adding data to tsk_fs_info table: %s
\n
"
);
...
...
This diff is collapsed.
Click to expand it.
tsk3/auto/tsk_db_sqlite.h
+
1
−
1
View file @
5c36f343
...
...
@@ -61,7 +61,7 @@ class TskDbSqlite {
const
TSK_AUTO_CASE_KNOWN_FILE_ENUM
known
,
int64_t
fsObjId
,
int64_t
&
objId
);
int
addFsBlockInfo
(
int64_t
a_fsObjId
,
int64_t
a_fileObjId
,
uint64_t
a_byteStart
,
uint64_t
a_byteLen
);
uint64_t
a_byteStart
,
uint64_t
a_byteLen
,
int
a_sequence
);
bool
dbExist
()
const
;
int
createSavepoint
(
const
char
*
name
);
...
...
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