Merge branch 'develop' of https://github.com/sleuthkit/autopsy into vm_detection

This commit is contained in:
Eugene Livis 2016-01-26 14:27:07 -05:00
commit 96aa402c50
3 changed files with 44 additions and 20 deletions

View File

@ -1,7 +1,7 @@
/*
* Autopsy Forensic Browser
*
* Copyright 2013-2014 Basis Technology Corp.
* Copyright 2013-2016 Basis Technology Corp.
* Contact: carrier <at> sleuthkit <dot> org
*
* Licensed under the Apache License, Version 2.0 (the "License");
@ -71,6 +71,8 @@ class AddImageTask implements Runnable {
String timeZone;
boolean noFatOrphans;
private final String dataSourceId;
/*
* A thread that updates the progressMonitor with the name of the directory
* currently being processed by the AddImageTask
@ -111,16 +113,30 @@ class AddImageTask implements Runnable {
}
}
public AddImageTask(String imgPath, String tz, boolean noOrphans, DataSourceProcessorProgressMonitor aProgressMonitor, DataSourceProcessorCallback cbObj) {
/**
* Constructs a runnable task that adds an image to the case database.
*
* @param dataSourceId An ASCII-printable identifier for the data
* source that is intended to be unique across
* multiple cases (e.g., a UUID).
* @param imagePath Path to the image file.
* @param timeZone The time zone to use when processing dates
* and times for the image, obtained from
* java.util.TimeZone.getID.
* @param ignoreFatOrphanFiles Whether to parse orphans if the image has a
* FAT filesystem.
* @param monitor Progress monitor to report progress during
* processing.
* @param cbObj Callback to call when processing is done.
*/
AddImageTask(String dataSourceId, String imagePath, String timeZone, boolean ignoreFatOrphanFiles, DataSourceProcessorProgressMonitor monitor, DataSourceProcessorCallback cbObj) {
currentCase = Case.getCurrentCase();
this.imagePath = imgPath;
this.timeZone = tz;
this.noFatOrphans = noOrphans;
this.dataSourceId = dataSourceId;
this.imagePath = imagePath;
this.timeZone = timeZone;
this.noFatOrphans = ignoreFatOrphanFiles;
this.callbackObj = cbObj;
this.progressMonitor = aProgressMonitor;
this.progressMonitor = monitor;
}
/**
@ -141,7 +157,7 @@ class AddImageTask implements Runnable {
progressMonitor.setIndeterminate(true);
progressMonitor.setProgress(0);
dirFetcher.start();
addImageProcess.run(new String[]{this.imagePath});
addImageProcess.run(dataSourceId, new String[]{imagePath});
} catch (TskCoreException ex) {
logger.log(Level.SEVERE, "Core errors occurred while running add image on " + imagePath, ex); //NON-NLS
hasCritError = true;

View File

@ -142,7 +142,7 @@ public class ImageDSProcessor implements DataSourceProcessor {
ignoreFatOrphanFiles = configPanel.getNoFatOrphans();
configured = true;
}
addImageTask = new AddImageTask(imagePath, timeZone, ignoreFatOrphanFiles, monitor, cbObj);
addImageTask = new AddImageTask(dataSourceId, imagePath, timeZone, ignoreFatOrphanFiles, monitor, cbObj);
new Thread(addImageTask).start();
}
@ -150,8 +150,9 @@ public class ImageDSProcessor implements DataSourceProcessor {
* Runs the data source processor in a separate thread without requiring use
* the configuration panel.
*
* @param dataSourceId A identifier for the data source that is
* unique across multiple cases (e.g., a UUID).
* @param dataSourceId An ASCII-printable identifier for the data
* source that is intended to be unique across
* multiple cases (e.g., a UUID).
* @param imagePath Path to the image file.
* @param timeZone The time zone to use when processing dates
* and times for the image, obtained from
@ -200,13 +201,16 @@ public class ImageDSProcessor implements DataSourceProcessor {
* when when processing dates and times for the image.
*
* @param imagePath Path to the image file.
* @param timeZone The time zone to use when processing dates
* and times for the image, obtained from
* java.util.TimeZone.getID.
* @param ignoreFatOrphanFiles Whether to parse orphans if the image has a
* FAT filesystem.
*
* @deprecated Use the run method instead.
*/
@Deprecated
public void setDataSourceOptions(String imagePath, boolean ignoreFatOrphanFiles) {
public void setDataSourceOptions(String imagePath, String timeZone, boolean ignoreFatOrphanFiles) {
this.dataSourceId = UUID.randomUUID().toString();
this.imagePath = imagePath;
this.timeZone = Calendar.getInstance().getTimeZone().getID();

View File

@ -122,7 +122,7 @@ public class LocalDiskDSProcessor implements DataSourceProcessor {
ignoreFatOrphanFiles = configPanel.getNoFatOrphans();
configured = true;
}
addDiskTask = new AddImageTask(drivePath, timeZone, ignoreFatOrphanFiles, progressMonitor, cbObj);
addDiskTask = new AddImageTask(dataSourceId, drivePath, timeZone, ignoreFatOrphanFiles, progressMonitor, cbObj);
new Thread(addDiskTask).start();
}
@ -130,8 +130,9 @@ public class LocalDiskDSProcessor implements DataSourceProcessor {
* Runs the data source processor in a separate thread without requiring use
* the configuration panel.
*
* @param dataSourceId A identifier for the data source that is
* unique across multiple cases (e.g., a UUID).
* @param dataSourceId An ASCII-printable identifier for the data
* source that is intended to be unique across
* multiple cases (e.g., a UUID).
* @param drivePath Path to the local drive.
* @param timeZone The time zone to use when processing dates
* and times for the image, obtained from
@ -180,13 +181,16 @@ public class LocalDiskDSProcessor implements DataSourceProcessor {
* when when processing dates and times for the image.
*
* @param drivePath Path to the local drive.
* @param timeZone The time zone to use when processing dates
* and times for the image, obtained from
* java.util.TimeZone.getID.
* @param ignoreFatOrphanFiles Whether to parse orphans if the image has a
* FAT filesystem.
*
* @deprecated Use the run method instead.
*/
@Deprecated
public void setDataSourceOptions(String drivePath, boolean ignoreFatOrphanFiles) {
public void setDataSourceOptions(String drivePath, String timeZone, boolean ignoreFatOrphanFiles) {
this.dataSourceId = UUID.randomUUID().toString();
this.drivePath = drivePath;
this.timeZone = Calendar.getInstance().getTimeZone().getID();