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 7, 2021
1 parent 7518353 commit ca51358
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
3 changes: 3 additions & 0 deletions plaso/cli/extraction_tool.py
Original file line number Diff line number Diff line change
Expand Up @@ -493,6 +493,9 @@ 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 = (
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 ca51358

Please sign in to comment.