Skip to content
Snippets Groups Projects
Commit bf3bb4f3 authored by Richard Cordovano's avatar Richard Cordovano
Browse files

Merge remote-tracking branch 'upstream/release-4.10.2' into merge-release-4.10.2-branch

parents 7b7989bc 060ba4a7
No related branches found
No related tags found
No related merge requests found
...@@ -195,13 +195,12 @@ Details about a device data source. ...@@ -195,13 +195,12 @@ Details about a device data source.
## TSK_EMAIL_MSG ## TSK_EMAIL_MSG
An email message found in an application file or database. An email message found in an application file or database.
### REQUIRED ATTRIBUTES ### OPTIONAL ATTRIBUTES
- At least one of: - At least one of:
- TSK_EMAIL_CONTENT_HTML (Representation of email as HTML) - TSK_EMAIL_CONTENT_HTML (Representation of email as HTML)
- TSK_EMAIL_CONTENT_PLAIN (Representation of email as plain text) - TSK_EMAIL_CONTENT_PLAIN (Representation of email as plain text)
- TSK_EMAIL_CONTENT_RTF (Representation of email as RTF) - TSK_EMAIL_CONTENT_RTF (Representation of email as RTF)
### OPTIONAL ATTRIBUTES
- TSK_DATETIME_RCVD (When email message was received, in seconds since 1970-01-01T00:00:00Z) - TSK_DATETIME_RCVD (When email message was received, in seconds since 1970-01-01T00:00:00Z)
- TSK_DATETIME_SENT (When email message was sent, in seconds since 1970-01-01T00:00:00Z) - TSK_DATETIME_SENT (When email message was sent, in seconds since 1970-01-01T00:00:00Z)
- TSK_EMAIL_BCC (BCC'd recipient, multiple recipients should be in a comma separated string) - TSK_EMAIL_BCC (BCC'd recipient, multiple recipients should be in a comma separated string)
...@@ -415,15 +414,6 @@ Indication that the source file matches some set of criteria (possibly user defi ...@@ -415,15 +414,6 @@ Indication that the source file matches some set of criteria (possibly user defi
---
## TSK_IP_DHCP
DHCP information that is stored.
### REQUIRED ATTRIBUTES
- TSK_NAME (Description of Information)
- TSK_VALUE (Value of Information)
--- ---
## TSK_KEYWORD_HIT ## TSK_KEYWORD_HIT
Indication that the source artifact or file contains a keyword. Keywords are grouped into named sets. Indication that the source artifact or file contains a keyword. Keywords are grouped into named sets.
......
...@@ -42,8 +42,8 @@ public abstract class AbstractContent implements Content { ...@@ -42,8 +42,8 @@ public abstract class AbstractContent implements Content {
private final SleuthkitCase db; private final SleuthkitCase db;
private final long objId; private final long objId;
private final String name; private final String name;
private Content parent; private volatile Content parent;
private String uniquePath; private volatile String uniquePath;
protected long parentId; protected long parentId;
private volatile boolean hasChildren; private volatile boolean hasChildren;
private volatile boolean checkedHasChildren; private volatile boolean checkedHasChildren;
...@@ -72,17 +72,22 @@ public String getName() { ...@@ -72,17 +72,22 @@ public String getName() {
* interleaving forward slashes). * interleaving forward slashes).
*/ */
@Override @Override
public synchronized String getUniquePath() throws TskCoreException { public String getUniquePath() throws TskCoreException {
// It is possible that multiple threads could be doing this calculation
// simultaneously, but it's worth the potential extra processing to prevent deadlocks.
if (uniquePath == null) { if (uniquePath == null) {
uniquePath = ""; String tempUniquePath = "";
if (!name.isEmpty()) { if (!name.isEmpty()) {
uniquePath = "/" + getName(); tempUniquePath = "/" + getName();
} }
Content myParent = getParent(); Content myParent = getParent();
if (myParent != null) { if (myParent != null) {
uniquePath = myParent.getUniquePath() + uniquePath; tempUniquePath = myParent.getUniquePath() + tempUniquePath;
} }
// Don't update uniquePath until it is complete.
uniquePath = tempUniquePath;
} }
return uniquePath; return uniquePath;
} }
...@@ -114,7 +119,9 @@ public int getChildrenCount() throws TskCoreException { ...@@ -114,7 +119,9 @@ public int getChildrenCount() throws TskCoreException {
} }
@Override @Override
public synchronized Content getParent() throws TskCoreException { public Content getParent() throws TskCoreException {
// It is possible that multiple threads could be doing this calculation
// simultaneously, but it's worth the potential extra processing to prevent deadlocks.
if (parent == null) { if (parent == null) {
ObjectInfo parentInfo; ObjectInfo parentInfo;
parentInfo = db.getParentInfo(this); parentInfo = db.getParentInfo(this);
......
...@@ -62,8 +62,8 @@ public class BlackboardArtifact implements Content { ...@@ -62,8 +62,8 @@ public class BlackboardArtifact implements Content {
private final SleuthkitCase sleuthkitCase; private final SleuthkitCase sleuthkitCase;
private final List<BlackboardAttribute> attrsCache = new ArrayList<BlackboardAttribute>(); private final List<BlackboardAttribute> attrsCache = new ArrayList<BlackboardAttribute>();
private boolean loadedCacheFromDb = false; private boolean loadedCacheFromDb = false;
private Content parent; private volatile Content parent;
private String uniquePath; private volatile String uniquePath;
private byte[] contentBytes = null; private byte[] contentBytes = null;
...@@ -432,21 +432,27 @@ public void addAttributes(Collection<BlackboardAttribute> attributes, final Sleu ...@@ -432,21 +432,27 @@ public void addAttributes(Collection<BlackboardAttribute> attributes, final Sleu
* @throws org.sleuthkit.datamodel.TskCoreException * @throws org.sleuthkit.datamodel.TskCoreException
*/ */
@Override @Override
public synchronized String getUniquePath() throws TskCoreException { public String getUniquePath() throws TskCoreException {
// Return the path of the parent file
// Return the path of the parrent file // It is possible that multiple threads could be doing this calculation
// simultaneously, but it's worth the potential extra processing to prevent deadlocks.
if (uniquePath == null) { if (uniquePath == null) {
uniquePath = ""; String tempUniquePath = "";
Content myParent = getParent(); Content myParent = getParent();
if (myParent != null) { if (myParent != null) {
uniquePath = myParent.getUniquePath(); tempUniquePath = myParent.getUniquePath();
} }
// Don't update uniquePath until it is complete.
uniquePath = tempUniquePath;
} }
return uniquePath; return uniquePath;
} }
@Override @Override
public synchronized Content getParent() throws TskCoreException { public Content getParent() throws TskCoreException {
// It is possible that multiple threads could be doing this calculation
// simultaneously, but it's worth the potential extra processing to prevent deadlocks.
if (parent == null) { if (parent == null) {
ObjectInfo parentInfo; ObjectInfo parentInfo;
parentInfo = getSleuthkitCase().getParentInfo(this); parentInfo = getSleuthkitCase().getParentInfo(this);
...@@ -1363,11 +1369,6 @@ public enum ARTIFACT_TYPE implements SleuthkitVisitableItem { ...@@ -1363,11 +1369,6 @@ public enum ARTIFACT_TYPE implements SleuthkitVisitableItem {
*/ */
TSK_SCREEN_SHOTS(60, "TSK_SCREEN_SHOTS", TSK_SCREEN_SHOTS(60, "TSK_SCREEN_SHOTS",
bundle.getString("BlackboardArtifact.tskScreenShots.text")), bundle.getString("BlackboardArtifact.tskScreenShots.text")),
/**
* DHCP Information that is store for a device.
*/
TSK_IP_DHCP(61, "TSK_IP_DHCP",
bundle.getString("BlackboardArtifact.tskDhcpInfo.text")),
/** /**
* Notifications Sent to User. * Notifications Sent to User.
*/ */
......
...@@ -39,7 +39,7 @@ ...@@ -39,7 +39,7 @@
public abstract class FsContent extends AbstractFile { public abstract class FsContent extends AbstractFile {
private static final Logger logger = Logger.getLogger(FsContent.class.getName()); private static final Logger logger = Logger.getLogger(FsContent.class.getName());
private String uniquePath; private volatile String uniquePath;
private List<String> metaDataText = null; private List<String> metaDataText = null;
private volatile FileSystem parentFileSystem; private volatile FileSystem parentFileSystem;
...@@ -261,7 +261,9 @@ public Content getDataSource() throws TskCoreException { ...@@ -261,7 +261,9 @@ public Content getDataSource() throws TskCoreException {
* @throws TskCoreException if there is an error querying the case database. * @throws TskCoreException if there is an error querying the case database.
*/ */
@Override @Override
public synchronized String getUniquePath() throws TskCoreException { public String getUniquePath() throws TskCoreException {
// It is possible that multiple threads could be doing this calculation
// simultaneously, but it's worth the potential extra processing to prevent deadlocks.
if (uniquePath == null) { if (uniquePath == null) {
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder();
sb.append(getFileSystem().getUniquePath()); sb.append(getFileSystem().getUniquePath());
......
...@@ -34,7 +34,7 @@ public class Volume extends AbstractContent { ...@@ -34,7 +34,7 @@ public class Volume extends AbstractContent {
private long flags; private long flags;
private String desc; private String desc;
private volatile long volumeHandle = 0; private volatile long volumeHandle = 0;
private String uniquePath; private volatile String uniquePath;
private static ResourceBundle bundle = ResourceBundle.getBundle("org.sleuthkit.datamodel.Bundle"); private static ResourceBundle bundle = ResourceBundle.getBundle("org.sleuthkit.datamodel.Bundle");
/** /**
...@@ -107,18 +107,23 @@ public long getSize() { ...@@ -107,18 +107,23 @@ public long getSize() {
} }
@Override @Override
public synchronized String getUniquePath() throws TskCoreException { public String getUniquePath() throws TskCoreException {
// It is possible that multiple threads could be doing this calculation
// simultaneously, but it's worth the potential extra processing to prevent deadlocks.
if(uniquePath == null) { if(uniquePath == null) {
uniquePath = ""; String tempUniquePath = "";
String name = getName(); String name = getName();
if (!name.isEmpty()) { if (!name.isEmpty()) {
uniquePath = "/vol_" + name; //NON-NLS tempUniquePath = "/vol_" + name; //NON-NLS
} }
Content myParent = getParent(); Content myParent = getParent();
if (myParent != null) { if (myParent != null) {
uniquePath = myParent.getUniquePath() + uniquePath; tempUniquePath = myParent.getUniquePath() + tempUniquePath;
} }
// Don't update uniquePath until it is complete.
uniquePath = tempUniquePath;
} }
return uniquePath; return uniquePath;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment