Skip to content

Commit

Permalink
Changes to store source configuration #2287
Browse files Browse the repository at this point in the history
  • Loading branch information
joachimmetz committed Nov 6, 2021
1 parent 155f02a commit 4f3e72c
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
9 changes: 3 additions & 6 deletions plaso/cli/extraction_tool.py
Original file line number Diff line number Diff line change
Expand Up @@ -493,18 +493,15 @@ def _ProcessSources(self, session, storage_writer):
path_spec=path_spec)
source_configurations.append(source_configuration)

# TODO: check if source configuration for the path_spec already exists.
storage_writer.AddAttributeContainer(source_configuration)

# TODO: improve to detect more than 1 system configurations.
# TODO: improve to add volumes to system configuration.
system_configuration = (
extraction_engine.knowledge_base.GetSystemConfigurationArtifact())
storage_writer.AddAttributeContainer(system_configuration)

source_configurations = []
for path_spec in self._source_path_specs:
source_configuration = artifacts.SourceConfigurationArtifact(
path_spec=path_spec)
source_configurations.append(source_configuration)

status_update_callback = (
self._status_view.GetExtractionStatusUpdateCallback())

Expand Down
4 changes: 4 additions & 0 deletions plaso/containers/artifacts.py
Original file line number Diff line number Diff line change
Expand Up @@ -445,6 +445,10 @@ class SourceConfigurationArtifact(ArtifactAttributeContainer):

CONTAINER_TYPE = 'source_configuration'

SCHEMA = {
'mount_path': 'str',
'path_spec': 'dfvfs.PathSpec'}

def __init__(self, path_spec=None):
"""Initializes a source configuration artifact.
Expand Down
3 changes: 1 addition & 2 deletions plaso/storage/sqlite/sqlite_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,7 @@ class SQLiteStorageFile(interface.BaseStore):
'hostname',
'mount_point',
'operating_system',
'path',
'source_configuration')
'path')

# Container types that are referenced from other container types.
_REFERENCED_CONTAINER_TYPES = (
Expand Down

0 comments on commit 4f3e72c

Please sign in to comment.