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
200eb9a6
Commit
200eb9a6
authored
2 years ago
by
apriestman
Browse files
Options
Downloads
Patches
Plain Diff
Move creation of OS account instances
parent
0326733e
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
bindings/java/src/org/sleuthkit/datamodel/AbstractContent.java
+2
-16
2 additions, 16 deletions
...ngs/java/src/org/sleuthkit/datamodel/AbstractContent.java
bindings/java/src/org/sleuthkit/datamodel/Blackboard.java
+3
-0
3 additions, 0 deletions
bindings/java/src/org/sleuthkit/datamodel/Blackboard.java
with
5 additions
and
16 deletions
bindings/java/src/org/sleuthkit/datamodel/AbstractContent.java
+
2
−
16
View file @
200eb9a6
...
...
@@ -398,26 +398,12 @@ public AnalysisResultAdded newAnalysisResult(BlackboardArtifact.Type artifactTyp
@Override
public
DataArtifact
newDataArtifact
(
BlackboardArtifact
.
Type
artifactType
,
Collection
<
BlackboardAttribute
>
attributesList
,
Long
osAccountId
)
throws
TskCoreException
{
DataArtifact
artifact
=
db
.
getBlackboard
().
newDataArtifact
(
artifactType
,
objId
,
this
.
getDataSource
().
getId
(),
attributesList
,
osAccountId
);
if
(
osAccountId
!=
null
)
{
try
(
CaseDbConnection
connection
=
db
.
getConnection
())
{
db
.
getOsAccountManager
().
newOsAccountInstance
(
osAccountId
,
getDataSource
().
getId
(),
OsAccountInstance
.
OsAccountInstanceType
.
ACCESSED
,
connection
);
}
}
return
artifact
;
return
db
.
getBlackboard
().
newDataArtifact
(
artifactType
,
objId
,
this
.
getDataSource
().
getId
(),
attributesList
,
osAccountId
);
}
@Override
public
DataArtifact
newDataArtifact
(
BlackboardArtifact
.
Type
artifactType
,
Collection
<
BlackboardAttribute
>
attributesList
,
Long
osAccountId
,
long
dataSourceId
)
throws
TskCoreException
{
DataArtifact
artifact
=
db
.
getBlackboard
().
newDataArtifact
(
artifactType
,
objId
,
dataSourceId
,
attributesList
,
osAccountId
);
if
(
osAccountId
!=
null
)
{
try
(
CaseDbConnection
connection
=
db
.
getConnection
())
{
db
.
getOsAccountManager
().
newOsAccountInstance
(
osAccountId
,
dataSourceId
,
OsAccountInstance
.
OsAccountInstanceType
.
ACCESSED
,
connection
);
}
}
return
artifact
;
return
db
.
getBlackboard
().
newDataArtifact
(
artifactType
,
objId
,
dataSourceId
,
attributesList
,
osAccountId
);
}
@Override
...
...
This diff is collapsed.
Click to expand it.
bindings/java/src/org/sleuthkit/datamodel/Blackboard.java
+
3
−
0
View file @
200eb9a6
...
...
@@ -2236,6 +2236,9 @@ public DataArtifact newDataArtifact(BlackboardArtifact.Type artifactType, long s
statement
.
setLong
(
1
,
artifact_obj_id
);
statement
.
setLong
(
2
,
osAccountObjId
);
connection
.
executeUpdate
(
statement
);
// Add an OS account instance
caseDb
.
getOsAccountManager
().
newOsAccountInstance
(
osAccountObjId
,
dataSourceObjId
,
OsAccountInstance
.
OsAccountInstanceType
.
ACCESSED
,
connection
);
}
// if attributes are provided, add them to the artifact.
...
...
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