aboutsummaryrefslogtreecommitdiff
path: root/security/py-dfvfs
diff options
context:
space:
mode:
authorAntoine Brodin <antoine@FreeBSD.org>2016-03-09 17:25:52 +0000
committerAntoine Brodin <antoine@FreeBSD.org>2016-03-09 17:25:52 +0000
commit9d6b8e3e70dd1f5674e330dab7b3cd2320f7300d (patch)
treeb9b26815f84f34fd8a108a82f72fe43bce510e07 /security/py-dfvfs
parent037f3e1ee6233a5edbc9fe212937e253a607764c (diff)
downloadports-9d6b8e3e70dd1f5674e330dab7b3cd2320f7300d.tar.gz
ports-9d6b8e3e70dd1f5674e330dab7b3cd2320f7300d.zip
Sleuthkit 4.2.0 switched from 100 nano seconds precision to 1 nano second
precision for *time_nano fields. Adjust py-dfvfs for this. See: https://github.com/log2timeline/dfvfs/issues/116
Notes
Notes: svn path=/head/; revision=410715
Diffstat (limited to 'security/py-dfvfs')
-rw-r--r--security/py-dfvfs/Makefile1
-rw-r--r--security/py-dfvfs/files/patch-dfvfs_vfs_tsk__file__entry.py29
2 files changed, 30 insertions, 0 deletions
diff --git a/security/py-dfvfs/Makefile b/security/py-dfvfs/Makefile
index 5ea530970c12..a0d6b1a5dc15 100644
--- a/security/py-dfvfs/Makefile
+++ b/security/py-dfvfs/Makefile
@@ -3,6 +3,7 @@
PORTNAME= dfvfs
PORTVERSION= 20160108
+PORTREVISION= 1
CATEGORIES= security devel python
MASTER_SITES= https://github.com/log2timeline/dfvfs/releases/download/${PORTVERSION}/ \
LOCAL/antoine
diff --git a/security/py-dfvfs/files/patch-dfvfs_vfs_tsk__file__entry.py b/security/py-dfvfs/files/patch-dfvfs_vfs_tsk__file__entry.py
new file mode 100644
index 000000000000..27665a1591ab
--- /dev/null
+++ b/security/py-dfvfs/files/patch-dfvfs_vfs_tsk__file__entry.py
@@ -0,0 +1,29 @@
+# Sleuthkit 4.2.0 switched from 100 nano seconds precision to
+# 1 nano second precision
+# See: https://github.com/log2timeline/dfvfs/issues/116
+
+--- dfvfs/vfs/tsk_file_entry.py.orig 2016-01-11 06:11:52 UTC
++++ dfvfs/vfs/tsk_file_entry.py
+@@ -348,6 +348,22 @@ class TSKFileEntry(file_entry.FileEntry)
+ stat_object.mtime_nano = getattr(
+ tsk_file.info.meta, u'mtime_nano', None)
+
++ # Sleuthkit 4.2.0 switched from 100 nano seconds precision to
++ # 1 nano second precision.
++ if pytsk3.TSK_VERSION_NUM >= 0x040200ff:
++ if stat_object.atime_nano is not None:
++ stat_object.atime_nano /= 100
++ if stat_object.bkup_time_nano is not None:
++ stat_object.bkup_time_nano /= 100
++ if stat_object.ctime_nano is not None:
++ stat_object.ctime_nano /= 100
++ if stat_object.crtime_nano is not None:
++ stat_object.crtime_nano /= 100
++ if stat_object.dtime_nano is not None:
++ stat_object.dtime_nano /= 100
++ if stat_object.mtime_nano is not None:
++ stat_object.mtime_nano /= 100
++
+ # Ownership and permissions stat information.
+ stat_object.mode = getattr(tsk_file.info.meta, u'mode', None)
+ stat_object.uid = getattr(tsk_file.info.meta, u'uid', None)