[prev in list] [next in list] [prev in thread] [next in thread] 

List:       sleuthkit-developers
Subject:    [sleuthkit-developers] [ sleuthkit-Bugs-3584744 ] tsk_init_lock and tsk_deinit_lock not exported
From:       SourceForge.net <noreply () sourceforge ! net>
Date:       2012-11-12 21:53:45
Message-ID: E1TY1ww-0000Tk-3d () sfs-ml-4 ! v29 ! ch3 ! sourceforge ! com
[Download RAW message or body]

Bugs item #3584744, was opened at 2012-11-06 05:16
Message generated for change (Comment added) made by 
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=477889&aid=3584744&group_id=55685

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Other
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Joachim Metz (jbmetz)
Assigned to: Nobody/Anonymous (nobody)
Summary: tsk_init_lock and tsk_deinit_lock not exported

Initial Comment:
Issue concerning TSK 4.0.0 API

The functions tsk_init_lock and tsk_deinit_lock are not exported in tsk3.h but they \
are necessary when creating a custom Img info object as in pytsk. Please add them or \
add other functions to set/release the locks for custom img info objects.

----------------------------------------------------------------------

Comment By: https://www.google.com/accounts ()
Date: 2012-11-12 13:53

Message:
The main problem for pytsk is that we need to be managing our own memory
(so we can arrange for freeing off the python GC). TSK confounds the
allocation of the memory with the initialization of the memory by putting
both into the function tsk_img_malloc()/tsk_img_free() so we effectively
need to reimplement the initialization done in tsk_img_malloc() again (This
is ultimately why we need access to the lock initialization functions). At
the moment this initialization just includes initializing locks but we will
always need to duplicate this code in future which is inconvenient.

The proper solution to the problem is to separate tsk_img_malloc() into an
allocation function and an initialization function, or alternatively have
tsk able to take a user supplied allocator implementation (for example like
libjpeg, zlib and many other libraries do).

The typical use case for pytsk is something like:
typedef struct {
  TSK_IMG_INFO base;
  struct Img_Info_t *container;
} Extended_TSK_IMG_INFO;

e.g. we extend the basic TSK object with our object which contains more
information specific to python implementation. Hence we need to allocate a
bit more memory than sizeof(TSK_IMG_INFO) and then we need to get tsk to
initialize its part of the struct. Then we initialize our part.

----------------------------------------------------------------------

Comment By: Joachim Metz (jbmetz)
Date: 2012-11-12 10:35

Message:
The idea of pytsk is to wrap python calls in an IMG info object, and allow
to extend the object in python.
Therefore it needs to control the locks. For now I've just added the
function calls. And build pytsk statically. 
This does not allow me to build against a DLL version.

----------------------------------------------------------------------

Comment By: Brian Carrier (carrier)
Date: 2012-11-12 10:30

Message:
Hi Joachim,

The theory was that if you are extending TSK, you would use tsk_base_i.h. 
tsk_base.h is really just if you want to use the library from another
program.  Does that work?

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=477889&aid=3584744&group_id=55685

------------------------------------------------------------------------------
Monitor your physical, virtual and cloud infrastructure from a single
web console. Get in-depth insight into apps, servers, databases, vmware,
SAP, cloud infrastructure, etc. Download 30-day Free Trial.
Pricing starts from $795 for 25 servers or applications!
http://p.sf.net/sfu/zoho_dev2dev_nov
_______________________________________________
sleuthkit-developers mailing list
sleuthkit-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sleuthkit-developers


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic