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 Oct 4, 2022
1 parent 5d7a85f commit e0bca79
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 @@ -573,6 +573,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 @@ -415,6 +415,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 @@ -114,8 +114,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 e0bca79

Please sign in to comment.