From 8c87b1313abd8ca8afa0f0f5b551519507c4d681 Mon Sep 17 00:00:00 2001 From: Richard Cordovano Date: Mon, 8 Apr 2019 14:50:38 -0400 Subject: [PATCH 1/3] Add comments to extended admin data src deletion --- .../autoingest/Bundle.properties-MERGED | 5 ----- .../autoingest/DeleteCaseTask.java | 22 ++++++++++++++++++- 2 files changed, 21 insertions(+), 6 deletions(-) diff --git a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/Bundle.properties-MERGED b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/Bundle.properties-MERGED index 18fa77ff35..3887732228 100755 --- a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/Bundle.properties-MERGED +++ b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/Bundle.properties-MERGED @@ -89,10 +89,6 @@ AutoIngestControlPanel.runningTable.toolTipText=The Running table displays the c AutoIngestControlPanel.SharedConfigurationDisabled=Shared configuration disabled AutoIngestControlPanel.ShowLogFailed.Message=Case log file does not exist AutoIngestControlPanel.ShowLogFailed.Title=Unable to display case log -# {0} - case db status -# {1} - search svc Status -# {2} - coord svc Status -# {3} - msg broker status AutoIngestControlPanel.tbServicesStatusMessage.Message=Case databases {0}, keyword search {1}, coordination {2}, messaging {3} AutoIngestControlPanel.tbServicesStatusMessage.Message.Down=down AutoIngestControlPanel.tbServicesStatusMessage.Message.Unknown=unknown @@ -208,7 +204,6 @@ HINT_CasesDashboardTopComponent=This is an adminstrative dashboard for multi-use OpenAutoIngestLogAction.deletedLogErrorMsg=The case auto ingest log has been deleted. OpenAutoIngestLogAction.logOpenFailedErrorMsg=Failed to open case auto ingest log. See application log for details. OpenAutoIngestLogAction.menuItemText=Open Auto Ingest Log File -# {0} - caseErrorMessage OpenCaseAction.errorMsg=Failed to open case: {0} OpenCaseAction.menuItemText=Open OpenIDE-Module-Long-Description=This module contains features that are being developed by Basis Technology and are not part of the default Autopsy distribution. You can enable this module to use the new features. The features should be stable, but their exact behavior and API are subject to change.\n\nWe make no guarantee that the API of this module will not change, so developers should be careful when relying on it. diff --git a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/DeleteCaseTask.java b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/DeleteCaseTask.java index d1f0347597..d2c07264d2 100755 --- a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/DeleteCaseTask.java +++ b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/DeleteCaseTask.java @@ -613,9 +613,17 @@ final class DeleteCaseTask implements Runnable { if (dataSource instanceof Image) { Image image = (Image) dataSource; String[] imageFilePaths = image.getPaths(); + /* + * Check for a match between one of the paths for the image + * files and the data source file path in the manifest. + */ for (String imageFilePath : imageFilePaths) { Path candidatePath = Paths.get(imageFilePath); if (candidatePath.equals(dataSourcePath)) { + /* + * If a match is found, add all of the file paths for + * the image to the set of files to be deleted. + */ for (String path : imageFilePaths) { filesToDelete.add(Paths.get(path)); } @@ -624,8 +632,20 @@ final class DeleteCaseTask implements Runnable { } } } + + /* + * At a minimum, the data source at the file path given in the manifest + * should be deleted. If the data source is not a disk image, this will + * be the path of an archive, a logical file, or a logical directory. + * TODO-4933: Currently, the contents extracted from an archive are not + * deleted, nor are any additional files associated with a report data + * source. + */ filesToDelete.add(dataSourcePath); - + + /* + * Delete the file(s). + */ boolean allFilesDeleted = true; for (Path path : filesToDelete) { File fileOrDir = path.toFile(); From 1b1793a78b22248e30a0edb81de53c9a277f24af Mon Sep 17 00:00:00 2001 From: Richard Cordovano Date: Mon, 8 Apr 2019 14:54:23 -0400 Subject: [PATCH 2/3] Fix bundle MERGE file for Experimental NBM --- .../autopsy/experimental/autoingest/Bundle.properties-MERGED | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/Bundle.properties-MERGED b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/Bundle.properties-MERGED index 3887732228..18fa77ff35 100755 --- a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/Bundle.properties-MERGED +++ b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/Bundle.properties-MERGED @@ -89,6 +89,10 @@ AutoIngestControlPanel.runningTable.toolTipText=The Running table displays the c AutoIngestControlPanel.SharedConfigurationDisabled=Shared configuration disabled AutoIngestControlPanel.ShowLogFailed.Message=Case log file does not exist AutoIngestControlPanel.ShowLogFailed.Title=Unable to display case log +# {0} - case db status +# {1} - search svc Status +# {2} - coord svc Status +# {3} - msg broker status AutoIngestControlPanel.tbServicesStatusMessage.Message=Case databases {0}, keyword search {1}, coordination {2}, messaging {3} AutoIngestControlPanel.tbServicesStatusMessage.Message.Down=down AutoIngestControlPanel.tbServicesStatusMessage.Message.Unknown=unknown @@ -204,6 +208,7 @@ HINT_CasesDashboardTopComponent=This is an adminstrative dashboard for multi-use OpenAutoIngestLogAction.deletedLogErrorMsg=The case auto ingest log has been deleted. OpenAutoIngestLogAction.logOpenFailedErrorMsg=Failed to open case auto ingest log. See application log for details. OpenAutoIngestLogAction.menuItemText=Open Auto Ingest Log File +# {0} - caseErrorMessage OpenCaseAction.errorMsg=Failed to open case: {0} OpenCaseAction.menuItemText=Open OpenIDE-Module-Long-Description=This module contains features that are being developed by Basis Technology and are not part of the default Autopsy distribution. You can enable this module to use the new features. The features should be stable, but their exact behavior and API are subject to change.\n\nWe make no guarantee that the API of this module will not change, so developers should be careful when relying on it. From 5dca160fd28445eb2325ae1fa56e1545a91c5de1 Mon Sep 17 00:00:00 2001 From: Richard Cordovano Date: Mon, 8 Apr 2019 15:31:12 -0400 Subject: [PATCH 3/3] Fix loop counter increment bug in admin case deletion --- .../autopsy/experimental/autoingest/DeleteCaseTask.java | 1 + 1 file changed, 1 insertion(+) diff --git a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/DeleteCaseTask.java b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/DeleteCaseTask.java index d2c07264d2..eef60f8a36 100755 --- a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/DeleteCaseTask.java +++ b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/DeleteCaseTask.java @@ -631,6 +631,7 @@ final class DeleteCaseTask implements Runnable { } } } + ++index; } /*