Skip to content

Commit e0bca79

Browse files
committed
Changes to store source configuration #2287
1 parent 5d7a85f commit e0bca79

3 files changed

Lines changed: 8 additions & 2 deletions

File tree

plaso/cli/extraction_tool.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -573,6 +573,9 @@ def _ProcessSources(self, session, storage_writer):
573573
path_spec=path_spec)
574574
source_configurations.append(source_configuration)
575575

576+
# TODO: check if source configuration for the path_spec already exists.
577+
storage_writer.AddAttributeContainer(source_configuration)
578+
576579
# TODO: improve to detect more than 1 system configurations.
577580
# TODO: improve to add volumes to system configuration.
578581
system_configuration = (

plaso/containers/artifacts.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -415,6 +415,10 @@ class SourceConfigurationArtifact(ArtifactAttributeContainer):
415415

416416
CONTAINER_TYPE = 'source_configuration'
417417

418+
SCHEMA = {
419+
'mount_path': 'str',
420+
'path_spec': 'dfvfs.PathSpec'}
421+
418422
def __init__(self, path_spec=None):
419423
"""Initializes a source configuration artifact.
420424

plaso/storage/sqlite/sqlite_file.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,8 +114,7 @@ class SQLiteStorageFile(interface.BaseStore):
114114
'hostname',
115115
'mount_point',
116116
'operating_system',
117-
'path',
118-
'source_configuration')
117+
'path')
119118

120119
# Container types that are referenced from other container types.
121120
_REFERENCED_CONTAINER_TYPES = (

0 commit comments

Comments
 (0)