Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 9 Mar 2016 17:25:52 +0000 (UTC)
From:      Antoine Brodin <antoine@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r410715 - in head/security/py-dfvfs: . files
Message-ID:  <201603091725.u29HPqC5094961@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: antoine
Date: Wed Mar  9 17:25:52 2016
New Revision: 410715
URL: https://svnweb.freebsd.org/changeset/ports/410715

Log:
  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

Added:
  head/security/py-dfvfs/files/
  head/security/py-dfvfs/files/patch-dfvfs_vfs_tsk__file__entry.py   (contents, props changed)
Modified:
  head/security/py-dfvfs/Makefile

Modified: head/security/py-dfvfs/Makefile
==============================================================================
--- head/security/py-dfvfs/Makefile	Wed Mar  9 17:15:18 2016	(r410714)
+++ head/security/py-dfvfs/Makefile	Wed Mar  9 17:25:52 2016	(r410715)
@@ -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

Added: head/security/py-dfvfs/files/patch-dfvfs_vfs_tsk__file__entry.py
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/security/py-dfvfs/files/patch-dfvfs_vfs_tsk__file__entry.py	Wed Mar  9 17:25:52 2016	(r410715)
@@ -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)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201603091725.u29HPqC5094961>