hivex.git
2 years agoruby: Add unit test for new RLenValue type master
Alex Nelson [Thu, 8 Dec 2011 02:38:11 +0000]
ruby: Add unit test for new RLenValue type

Signed-off-by: Alex Nelson <ajnelson@cs.ucsc.edu>

2 years agopython: Add unit test for new RLenValue type
Alex Nelson [Thu, 8 Dec 2011 02:38:06 +0000]
python: Add unit test for new RLenValue type

Signed-off-by: Alex Nelson <ajnelson@cs.ucsc.edu>

2 years agoperl: Add unit test for new RLenValue type
Alex Nelson [Thu, 8 Dec 2011 02:38:01 +0000]
perl: Add unit test for new RLenValue type

Signed-off-by: Alex Nelson <ajnelson@cs.ucsc.edu>

2 years agoocaml: Add unit test for new RLenValue type
Alex Nelson [Thu, 8 Dec 2011 02:37:54 +0000]
ocaml: Add unit test for new RLenValue type

Signed-off-by: Alex Nelson <ajnelson@cs.ucsc.edu>

2 years agohivex: Add offset-&-length function for long value data
Alex Nelson [Thu, 8 Dec 2011 02:37:48 +0000]
hivex: Add offset-&-length function for long value data

This patch adds value_data_cell_offset to the hivex ABI, to report the
hive space used for long (>4 bytes) value data.

Signed-off-by: Alex Nelson <ajnelson@cs.ucsc.edu>

RWMJ: Rewrote the description of this function to make it clearer.

2 years agogenerator: Add new return type to ABI: RLenValue
Alex Nelson [Thu, 8 Dec 2011 02:37:44 +0000]
generator: Add new return type to ABI: RLenValue

RLenValue is similar to RLenType, though with one less argument.  This
required adding additional conversion functions for several languages'
bindings.

Signed-off-by: Alex Nelson <ajnelson@cs.ucsc.edu>

2 years agoAdd test hive and generator script
Alex Nelson [Thu, 8 Dec 2011 02:37:39 +0000]
Add test hive and generator script

Signed-off-by: Alex Nelson <ajnelson@cs.ucsc.edu>

2 years agohivexml: Remove unused variable.
Richard W.M. Jones [Tue, 20 Dec 2011 18:46:26 +0000]
hivexml: Remove unused variable.

2 years agohivex: Fix Ruby bindings for 1.9; let the user explicitly choose ruby, rake
Hilko Bengen [Wed, 7 Dec 2011 20:41:29 +0000]
hivex: Fix Ruby bindings for 1.9; let the user explicitly choose ruby, rake

2 years agohivex: Added gnulib includes from builddir, as suggested by the Gnulib documentation...
Hilko Bengen [Wed, 30 Nov 2011 23:30:10 +0000]
hivex: Added gnulib includes from builddir, as suggested by the Gnulib documentation; link hivexml against libgnu.

    Since some modules (`getopt', for example) may copy files
    into the build directory, `top_builddir/lib' is needed as well as
    `top_srcdir/lib'. -- GNU Gnulib manual, section 2.2 Initial import

This fixes an in-tree build failure on a Debian/sid system (see
below). hivexml could be built out-of-tree, but it turned out that due
to a missing include path, in this case the system's getopt
implementation was used insted of Gnulib's.

make[2]: Entering directory `«SRCDIR»/xml'
gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I..    -DLOCALEBASEDIR=\""/usr/local/share/locale"\" -I../gnulib/lib -I../lib -I/usr/include/libxml2     -g -O2 -MT hivexml-hivexml.o -MD -MP -MF .deps/hivexml-hivexml.Tpo -c -o hivexml-hivexml.o `test -f 'hivexml.c' || echo './'`hivexml.c
mv -f .deps/hivexml-hivexml.Tpo .deps/hivexml-hivexml.Po
/bin/bash ../libtool  --tag=CC   --mode=link gcc -std=gnu99 -DLOCALEBASEDIR=\""/usr/local/share/locale"\" -I../gnulib/lib -I../lib -I/usr/include/libxml2     -g -O2   -o hivexml hivexml-hivexml.o ../lib/libhivex.la -lxml2
libtool: link: gcc -std=gnu99 -DLOCALEBASEDIR=\"/usr/local/share/locale\" -I../gnulib/lib -I../lib -I/usr/include/libxml2 -g -O2 -o .libs/hivexml hivexml-hivexml.o  ../lib/.libs/libhivex.so /usr/lib/libxml2.so
hivexml-hivexml.o: In function `main':
«SRCDIR»/xml/hivexml.c:96: undefined reference to `rpl_getopt'
«SRCDIR»/xml/hivexml.c:110: undefined reference to `rpl_optind'
«SRCDIR»/xml/hivexml.c:154: undefined reference to `rpl_optind'
collect2: ld returned 1 exit status
make[2]: *** [hivexml] Error 1
make[2]: Leaving directory `«SRCDIR»/xml'

2 years agoout of tree build: ruby (second take)
Hilko Bengen [Tue, 29 Nov 2011 19:59:14 +0000]
out of tree build: ruby (second take)

2 years agoVersion 1.3.3. 1.3.3
Richard W.M. Jones [Tue, 29 Nov 2011 11:10:50 +0000]
Version 1.3.3.

2 years agoUpdate to latest gnulib (RHBZ#756981).
Richard W.M. Jones [Tue, 29 Nov 2011 10:49:27 +0000]
Update to latest gnulib (RHBZ#756981).

2 years agoRevert "out of tree build: ruby"
Richard W.M. Jones [Tue, 29 Nov 2011 10:50:06 +0000]
Revert "out of tree build: ruby"

This reverts commit 48d2e0d9ea5c12ae81f31706fa463f8e1ebd09af.

This commit breaks the ordinary build:

make[2]: Entering directory `/home/rjones/d/hivex/ruby'
rake build
rake/rdoctask is deprecated.  Use rdoc/task instead (in RDoc 2.4.2+)
rake/gempackagetask is deprecated.  Use rubygems/package_task instead
top_srcdir=$(pwd)/..; top_builddir=$(pwd)/..; export ARCHFLAGS="-arch $(uname -m)"; mkdir -p ./ext/guestfs; cd ./hivex; ruby #(EXT_CONF} --with-_hivex-include=$top_srcdir/lib --with-_hivex-lib=$top_builddir/lib/.libs
sh: line 0: cd: ./hivex: No such file or directory

2 years agoout of tree build: ruby
Hilko Bengen [Mon, 21 Nov 2011 22:27:59 +0000]
out of tree build: ruby

2 years agopython: Support Python 3 (RHBZ#752916).
Richard W.M. Jones [Sat, 19 Nov 2011 16:54:26 +0000]
python: Support Python 3 (RHBZ#752916).

2 years agoFix conditional test for HAVE_HIVEXSH.
Richard W.M. Jones [Mon, 24 Oct 2011 17:15:48 +0000]
Fix conditional test for HAVE_HIVEXSH.

This fixes commit 0a28041f4156878a74543966f9a72ed3d214ba44.

2 years agoVersion 1.3.2. 1.3.2
Richard W.M. Jones [Mon, 24 Oct 2011 16:22:15 +0000]
Version 1.3.2.

2 years agoregedit: Fix syntax for deleting registry keys (RHBZ#737944).
Richard W.M. Jones [Sat, 22 Oct 2011 14:48:15 +0000]
regedit: Fix syntax for deleting registry keys (RHBZ#737944).

Previously we parsed -[...] to delete a registry key, but this is not
correct.  It should be [-...].  Reference:

http://support.microsoft.com/kb/310516
https://secure.wikimedia.org/wikipedia/en/wiki/Windows_Registry#.REG_files

2 years agohivexml: Do not print null input times
Alex Nelson [Sat, 17 Sep 2011 23:14:31 +0000]
hivexml: Do not print null input times

Dealing with "1601-01-01T00:00:00Z" is unnecessarily awkward, especially
since the value only represents a 0 found in the data.

Signed-off-by: Alex Nelson <ajnelson@cs.ucsc.edu>

2 years agohivexsh: Conditionally build for Mac OS X
Alex Nelson [Wed, 7 Sep 2011 03:42:44 +0000]
hivexsh: Conditionally build for Mac OS X

OS X lacks open_memstream, causing hivexsh to fail to build.  This patch
defines HAVE_HIVEXSH, setting the only condition to open_memstream
existence.

Signed-off-by: Alex Nelson <ajnelson@cs.ucsc.edu>

2 years agoReplacement mmap function for Win32.
Gillen Daniel [Wed, 7 Sep 2011 11:20:24 +0000]
Replacement mmap function for Win32.

(Updates by RWMJ)

2 years agoAdd an internal hivex header file.
Richard W.M. Jones [Wed, 7 Sep 2011 11:19:45 +0000]
Add an internal hivex header file.

2 years agohivexml: Add correct casts to xmlTextWriter* function call params.
Richard W.M. Jones [Wed, 7 Sep 2011 11:30:27 +0000]
hivexml: Add correct casts to xmlTextWriter* function call params.

This fixes commit 7ab64739391d60a52755250e76b0f4a03878a7e8.

2 years agoDon't include "Returns ..." in function description.
Richard W.M. Jones [Tue, 6 Sep 2011 16:53:46 +0000]
Don't include "Returns ..." in function description.

The description of what it returns is already produced by the
generator.

This fixes commit e85b1eaa268caea316f6aa8e02738b3d94297250.

2 years agohivexml: Report attributes in values instead of text.
Alex Nelson [Fri, 2 Sep 2011 01:17:43 +0000]
hivexml: Report attributes in values instead of text.

Reporting value data in attributes has two advantages:
* The output of hivexml breaks Python expat processing if binary data
makes it out.  This was observed in Software hives.
* Not having child text makes room for child elements.

Signed-off-by: Alex Nelson <ajnelson@cs.ucsc.edu>

2 years agohivex: Add metadata length functions for nodes and values
Alex Nelson [Fri, 2 Sep 2011 01:17:36 +0000]
hivex: Add metadata length functions for nodes and values

This patch adds hivex_node_struct_length and hivex_value_struct_length
to the hivex ABI, to report the amount of hive space used for each
stored structure.

Signed-off-by: Alex Nelson <ajnelson@cs.ucsc.edu>

A fix added by RWMJ.

2 years agohivex: Split value_key function into value_key and value_key_len
Alex Nelson [Fri, 2 Sep 2011 01:17:27 +0000]
hivex: Split value_key function into value_key and value_key_len

This function breaks the value name calculation out so the name does
not need to be fetched and immediately thrown away when one only needs
the name.

Signed-off-by: Alex Nelson <ajnelson@cs.ucsc.edu>

RWMJ fixed hivex_value_key handling of errno.

2 years agogenerator: Add new return type to ABI: RSize
Alex Nelson [Fri, 2 Sep 2011 01:17:23 +0000]
generator: Add new return type to ABI: RSize

This patch adds RSize, similar to RNode and RValue.

Signed-off-by: Alex Nelson <ajnelson@cs.ucsc.edu>

OCaml bindings fixed by RWMJ.

2 years agoInclude libintl.h to silence warning about bindtextdomain, textdomain.
Richard W.M. Jones [Tue, 6 Sep 2011 12:59:41 +0000]
Include libintl.h to silence warning about bindtextdomain, textdomain.

2 years agolib/byte_conversions.h: Use bswap* functions instead of __bswap* functions.
Gillen Daniel [Tue, 6 Sep 2011 12:52:42 +0000]
lib/byte_conversions.h: Use bswap* functions instead of __bswap* functions.

2 years agoMac OS X: Run glibtoolize in absence of libtoolize
Alex Nelson [Tue, 6 Sep 2011 01:52:58 +0000]
Mac OS X: Run glibtoolize in absence of libtoolize

Signed-off-by: Alex Nelson <ajnelson@cs.ucsc.edu>

2 years agoMac OS X: setlocale function requires locale.h
Alex Nelson [Tue, 6 Sep 2011 01:52:55 +0000]
Mac OS X: setlocale function requires locale.h

In the style of libguestfs commit:
9e397cc16be51f4f3940c7a5b90d0bc43f3f13a8

Signed-off-by: Alex Nelson <ajnelson@cs.ucsc.edu>

2 years agoMac OS X: Detect bindtextdomain
Alex Nelson [Tue, 6 Sep 2011 01:52:50 +0000]
Mac OS X: Detect bindtextdomain

In the style of libguestfs commit:
7581672c7893fd392ca10b47f044af327011f502

Signed-off-by: Alex Nelson <ajnelson@cs.ucsc.edu>

2 years agoocaml: Fix binding for Hivex.value_type
Alex Nelson [Wed, 31 Aug 2011 00:47:01 +0000]
ocaml: Fix binding for Hivex.value_type

2 years agoVersion 1.3.1. 1.3.1
Richard W.M. Jones [Fri, 26 Aug 2011 10:22:47 +0000]
Version 1.3.1.

2 years agohivex: Newer Python versions want parentheses around arguments of "print"
Hilko Bengen [Mon, 22 Aug 2011 18:45:24 +0000]
hivex: Newer Python versions want parentheses around arguments of "print"

2 years agohivex: Fix building on platforms without O_CLOEXEC such as FreeBSD
Hilko Bengen [Mon, 22 Aug 2011 17:52:02 +0000]
hivex: Fix building on platforms without O_CLOEXEC such as FreeBSD

2 years agohivex: Don't build static library, .so.* symlinks for Python bindings
Hilko Bengen [Mon, 22 Aug 2011 17:46:20 +0000]
hivex: Don't build static library, .so.* symlinks for Python bindings

2 years agohivexml: Add root attribute to the root node
Alex Nelson [Tue, 16 Aug 2011 04:50:28 +0000]
hivexml: Add root attribute to the root node

New feature:  If the root node of the XML root is the hive root node,
denote with attribute/value root="1".

Signed-off-by: Alex Nelson <ajnelson@cs.ucsc.edu>

2 years agoruby: Test against locally built library.
Richard W.M. Jones [Mon, 15 Aug 2011 10:08:16 +0000]
ruby: Test against locally built library.

2 years agoPrevent warning about unused variable in test.
Richard W.M. Jones [Mon, 15 Aug 2011 09:56:41 +0000]
Prevent warning about unused variable in test.

2 years agoFix incorrect printf format specifier in error string.
Richard W.M. Jones [Mon, 15 Aug 2011 09:52:00 +0000]
Fix incorrect printf format specifier in error string.

2 years agohivex(3): Fix link to CSS.
Richard W.M. Jones [Mon, 15 Aug 2011 09:43:47 +0000]
hivex(3): Fix link to CSS.

2 years agoVersion 1.3.0. 1.3.0
Richard W.M. Jones [Mon, 15 Aug 2011 09:40:01 +0000]
Version 1.3.0.

2 years agoAdd Ruby bindings.
Richard W.M. Jones [Mon, 15 Aug 2011 07:37:09 +0000]
Add Ruby bindings.

2 years agoheader: Fix including just <hivex.h>.
Richard W.M. Jones [Mon, 15 Aug 2011 07:36:04 +0000]
header: Fix including just <hivex.h>.

Also this adds a regression test so we don't break it in future.

2 years agoReport last-modified time of hive root and nodes
Alex Nelson [Sat, 13 Aug 2011 06:03:37 +0000]
Report last-modified time of hive root and nodes

The infrastructure for modified-time reporting has been essentially
unused.  These changes report the registry time by treating the
time fields as Windows filetime fields stored in little-Endian
(which means they can be treated as a single 64-bit little-Endian
integer).

This patch adds to the hivex ABI:

 * int64_t hivex_last_modified (hive_h *)
 * int64_t hivex_node_timestamp (hive_h *, hive_node_h)

These two functions return the hive's last-modified time and
a particular node's last-modified time, respectively.  Credit
to Richard Jones for the ABI suggestion, and for the tip on
Microsoft's filetime time span.

hivexml employs these two functions to produce mtime elements
for a hive and all of its nodes, producing ISO-8601 formatted
time.

Signed-off-by: Alex Nelson <ajnelson@cs.ucsc.edu>

A lot of code cleanup by RWMJ.

2 years agoVersion 1.2.8. 1.2.8
Richard W.M. Jones [Fri, 12 Aug 2011 09:07:14 +0000]
Version 1.2.8.

Pushed and pulled translations from Transifex.

2 years agoMore changes needed separate builddir
Hilko Bengen [Thu, 11 Aug 2011 23:33:39 +0000]
More changes needed separate builddir

This patch hopefully fixes building and installing the OCaml bindings
both in-tree and out-of-tree.

-Hilko

2 years agoMore changes needed separate builddir
Hilko Bengen [Thu, 11 Aug 2011 23:30:52 +0000]
More changes needed separate builddir

Here's the fix for perl. Both in-tree and out-of-tree build and install
worked.

-Hilko

2 years agohivex: A few tweaks to enable building in a separate directory
Hilko Bengen [Thu, 11 Aug 2011 15:24:05 +0000]
hivex: A few tweaks to enable building in a separate directory

A couple of fixes by RWMJ so it still works in the same directory case.

2 years agoCorrect 32-bit to 64-bit call
Alex Nelson [Thu, 11 Aug 2011 03:56:33 +0000]
Correct 32-bit to 64-bit call

2 years agoperl: Fix CCFLAGS on Perl 5.14.
Richard W.M. Jones [Fri, 22 Jul 2011 09:39:37 +0000]
perl: Fix CCFLAGS on Perl 5.14.

A change to ExtUtils::CBuilder in Perl 5.14 causes CCFLAGS to
completely replace, rather than appending, the C flags.

The unfortunate consequence of this is that vital flags such as
-D_FILE_OFFSET_BITS=64 are missing.  For 32 bit code, this means you
get binary-incompatible code that completely fails to load.

For further analysis see:

http://www.nntp.perl.org/group/perl.perl5.porters/2011/04/msg171535.html

This commit changes CCFLAGS so that it appends to the existing
$Config{ccflags} instead of replacing it.  On earlier versions of Perl
this means we get two copies of the flags, which is unfortunate but
should be safe.

Also, ignore MYMETA.yml file produced by Perl 5.14.

2 years agoClose the file descriptor along the writable path.
Michael Huang [Mon, 11 Jul 2011 14:06:49 +0000]
Close the file descriptor along the writable path.

Since the file has been completely read into memory, there is no
reason to keep the file descriptor open.

2 years agoSort m4/.gitignore file.
Richard W.M. Jones [Wed, 29 Jun 2011 09:10:12 +0000]
Sort m4/.gitignore file.

2 years agomaint: add cfg.mk to prepare for syntax-check tests
Jim Meyering [Tue, 28 Jun 2011 23:21:05 +0000]
maint: add cfg.mk to prepare for syntax-check tests

* cfg.mk: New file, to tell maint.mk which syntax-checks to skip
for now, where .gnulib/ is, to exempt images/minimal from
one of the tests and to exempt sh/hivexsh\.pod from another.
Also exempt lib/gettext.h from sc_useless_cpp_parens.

2 years agomaint: remove rule that generated po/POTFILES.in
Jim Meyering [Tue, 28 Jun 2011 18:09:57 +0000]
maint: remove rule that generated po/POTFILES.in

* Makefile.am (all-local): Remove rule.  It would put many
files in po/POTFILES.in that contain no translatable diagnostic.

2 years agobuild: update gnulib submodule to latest
Jim Meyering [Tue, 28 Jun 2011 18:09:56 +0000]
build: update gnulib submodule to latest

2 years agomaint: remove spaces before TAB
Jim Meyering [Tue, 28 Jun 2011 18:09:55 +0000]
maint: remove spaces before TAB

* perl/typemap: Remove spaces-before-TAB.

2 years agomaint: avoid using test's -a and -o operators; they are not portable
Jim Meyering [Tue, 28 Jun 2011 18:09:54 +0000]
maint: avoid using test's -a and -o operators; they are not portable

* configure.ac: use "test C1 && test C2", not "test C1 -a C2";
* autogen.sh: Likewise.
* sh/hivexget: Use "test C1 || test C2", not "test C1 -o C2"

2 years agomaint: use "test x = x", not "test x == x"
Jim Meyering [Tue, 28 Jun 2011 18:09:52 +0000]
maint: use "test x = x", not "test x == x"

* autogen.sh: Using "test x = x" is more portable.

2 years agomaint: remove trailing blanks
Jim Meyering [Tue, 28 Jun 2011 18:09:51 +0000]
maint: remove trailing blanks

2 years agomaint: remove now-unnecessary #ifdef HAVE_BYTESWAP_H guard
Jim Meyering [Tue, 28 Jun 2011 18:09:50 +0000]
maint: remove now-unnecessary #ifdef HAVE_BYTESWAP_H guard

* lib/byte_conversions.h: Remove #ifdef HAVE_BYTESWAP_H guard.
With gnulib, we're guaranteed to have that header file.
* bootstrap (modules): Use the byteswap module.

2 years agomaint: remove definition of O_CLOEXEC, ...
Jim Meyering [Tue, 28 Jun 2011 18:09:49 +0000]
maint: remove definition of O_CLOEXEC, ...

now that we're using gnulib's fcntl module, which ensures
that we use a conforming <fcntl.h>.
* lib/hivex.c (O_CLOEXEC): Remove definition.
* bootstrap (modules): Add fcntl for its guaranteed definition
of O_CLOEXEC.

2 years agomaint: normalize to exactly one newline at EOF
Jim Meyering [Tue, 28 Jun 2011 18:09:48 +0000]
maint: normalize to exactly one newline at EOF

* .tx/config: Remove trailing empty line.
* images/Makefile.am: Likewise.
* sh/example1: Add newline at EOF.
* sh/example2: Likewise.
* sh/example3: Likewise.
* sh/example4: Likewise.
* sh/example5: Likewise.

2 years agomaint: update po/POTFILES.in
Jim Meyering [Tue, 28 Jun 2011 18:09:47 +0000]
maint: update po/POTFILES.in

* po/POTFILES.in: Reduce list of files with translatable messages
to match reality.

2 years agomaint: remove definitions of PRId64 and PRIu64, ...
Jim Meyering [Tue, 28 Jun 2011 18:09:46 +0000]
maint: remove definitions of PRId64 and PRIu64, ...

now that we're using gnulib's inttypes module, which ensures
that we use a conforming <inttypes.h>.
* bootstrap (modules): Add inttypes.
* generator/generator.ml (generate_perl_xs) [PRId64, PRIu64]:
Don't define these symbols.  Instead, ...
Include <inttypes.h>.

2 years agomaint: remove unnecessary test-before-free
Jim Meyering [Tue, 28 Jun 2011 18:09:45 +0000]
maint: remove unnecessary test-before-free

* lib/hivex.c (hivex_node_set_value): Remove unnecessary
test-before-free.

2 years agoocaml: Really fix 'make install' rule.
Richard W.M. Jones [Tue, 17 May 2011 16:37:31 +0000]
ocaml: Really fix 'make install' rule.

This fixes commit b8ad15031cacf910634b4f4f4632232949c4acd2
and commit f408b757b1d75429fae5fa7630a4fc5451844de7.

2 years agoocaml: Set package name when installing native bindings.
Richard W.M. Jones [Tue, 17 May 2011 16:19:27 +0000]
ocaml: Set package name when installing native bindings.

This fixes commit b8ad15031cacf910634b4f4f4632232949c4acd2.

2 years agoVersion 1.2.7. 1.2.7
Richard W.M. Jones [Tue, 17 May 2011 15:51:48 +0000]
Version 1.2.7.

2 years agoUpdate gnulib to latest version.
Richard W.M. Jones [Tue, 17 May 2011 15:51:37 +0000]
Update gnulib to latest version.

2 years agohivexregedit: Add --unsafe-printable-strings option.
Richard W.M. Jones [Tue, 17 May 2011 10:16:10 +0000]
hivexregedit: Add --unsafe-printable-strings option.

2 years agohivex_root: Return errno == HIVEX_NO_KEY when root key is missing.
Richard W.M. Jones [Fri, 13 May 2011 17:19:22 +0000]
hivex_root: Return errno == HIVEX_NO_KEY when root key is missing.

Previously we returned errno == ENOKEY.  However this was an
unfortunate choice of error code since it is not defined in POSIX.  As
a result it is missing on several platforms.

HIVEX_NO_KEY is defined as ENOKEY on platforms where this symbol
exists (thus maintaining backwards ABI compatibility), and defined as
another POSIX error code otherwise.

2 years agohivex: Fix install target for systems without native OCaml compiler
Hilko Bengen [Fri, 13 May 2011 06:37:56 +0000]
hivex: Fix install target for systems without native OCaml compiler

,----
| ocamlfind install \
|           -ldconf ignore -destdir /build/buildd-hivex_1.2.6-1-ia64-iqcb38/hivex-1.2.6/debian/tmp/usr/lib/ocaml \
|           hivex \
|           META *.so *.a *.cma *.cmx *.cmxa *.cmi *.mli
| Installed /build/buildd-hivex_1.2.6-1-ia64-iqcb38/hivex-1.2.6/debian/tmp/usr/lib/ocaml/hivex/hivex.mli
| Installed /build/buildd-hivex_1.2.6-1-ia64-iqcb38/hivex-1.2.6/debian/tmp/usr/lib/ocaml/hivex/hivex.cmi
| ocamlfind: *.cmxa: No such file or directory
| make[4]: *** [install-data-hook] Error 2
`----

2 years agohivex: Remove python bytecode on "make clean"
Hilko Bengen [Fri, 13 May 2011 06:37:55 +0000]
hivex: Remove python bytecode on "make clean"

2 years agoocaml: Use libtool to get correct library to build OCaml tests.
Richard W.M. Jones [Thu, 12 May 2011 11:25:21 +0000]
ocaml: Use libtool to get correct library to build OCaml tests.

See this thread:
https://www.redhat.com/archives/libguestfs/2011-May/thread.html#00015

Thanks to Hilko Bengen and Török Edwin for coming up with this fix.

2 years agoVersion 1.2.6. 1.2.6
Richard W.M. Jones [Thu, 12 May 2011 10:12:03 +0000]
Version 1.2.6.

2 years agobuild: Workaround broken libtool.
Richard W.M. Jones [Thu, 12 May 2011 11:03:15 +0000]
build: Workaround broken libtool.

Same as this error:
https://www.redhat.com/archives/libguestfs/2011-April/msg00042.html
https://www.redhat.com/archives/libguestfs/2011-May/msg00041.html

We don't know why latest libtool is so obviously broken, but this
works around the problem.

2 years agobootstrap: Force gnulib-tool --libtool option.
Richard W.M. Jones [Thu, 12 May 2011 11:03:06 +0000]
bootstrap: Force gnulib-tool --libtool option.

This forces the recent gnulib to generate a libgnu.la file.  Otherwise
it appears to default to --no-libtool which doesn't generate one.

2 years agoconfigure: AC_PROG_LIBTOOL -> AM_PROG_LIBTOOL.
Richard W.M. Jones [Thu, 12 May 2011 11:02:11 +0000]
configure: AC_PROG_LIBTOOL -> AM_PROG_LIBTOOL.

Unclear if this makes any difference.

2 years agoUpdate gnulib.
Richard W.M. Jones [Thu, 12 May 2011 10:30:42 +0000]
Update gnulib.

2 years agohivex: Fix for endianess bug.
Hilko Bengen [Wed, 11 May 2011 22:04:20 +0000]
hivex: Fix for endianess bug.

* Richard W.M. Jones:
> > Both size_t and int are 32 bit values.  An endianess issue, maybe?
> I guess it might be.  We're supposed to be doing le32toh / be32toh
> everywhere as appropriate, but we might be missing one.  The code is
> mainly tested on little endian arches.

Found it.

Now "make check" completes successfully on Sparc and PowerPC.

2 years agohivex: check for presence of OCaml native compiler
Hilko Bengen [Wed, 11 May 2011 22:04:19 +0000]
hivex: check for presence of OCaml native compiler

Only compile bytecode otherwise, avoiding ocamlfind's helpful error
message "ocamlfind: Not supported in your configuration: ocamlopt"

(Successfully tested on Debian/unstable on alpha)

2 years agohivex: Use OCaml bytecode compiler for caml_raise_with_args check
Hilko Bengen [Wed, 11 May 2011 22:04:18 +0000]
hivex: Use OCaml bytecode compiler for caml_raise_with_args check

On installations where no native OCaml compiler is available, the
test program can't be compiled and so we get this message:

,----
| checking for function caml_raise_with_args... not found
`----

This breaks building of the OCaml bindings.

,----
| gcc -std=gnu99 -I.. -I/usr/lib/ocaml -I../ocaml -I../lib   -g -O2 -fPIC -Wall -c hivex_c.c
| hivex_c.c:52: error: static declaration of 'caml_raise_with_args' follows non-static declaration
| /usr/lib/ocaml/caml/fail.h:30: note: previous declaration of 'caml_raise_with_args' was here
| make[2]: *** [hivex_c.o] Error 1
`----

(Successfully tested on Debian/unstable on alpha)

2 years agoconfigure: Use Python platform-dependent site-packages.
Richard W.M. Jones [Thu, 12 May 2011 09:49:13 +0000]
configure: Use Python platform-dependent site-packages.

This updates commit b808c875a34e62fcdf360534f923d6030590ff44.

2 years agoUse Python's distutils to determine include and site-packages directories.
Hilko Bengen [Tue, 3 May 2011 22:29:39 +0000]
Use Python's distutils to determine include and site-packages directories.

The code has been taken from specifically ac_python_devel.m4 published
at <http://ac-archive.sf.net/>, it has turned out to be less
error-prone on my Debian system.

2 years agoDon't rely on OCaml native compiler for tests
Hilko Bengen [Mon, 9 May 2011 07:08:17 +0000]
Don't rely on OCaml native compiler for tests

This should make it possible to build useful OCaml bindings on
architectures other than i386 and amd64 (Debian bug #589809).

2 years agoInclude generator in the tarball.
Richard W.M. Jones [Thu, 28 Apr 2011 08:48:23 +0000]
Include generator in the tarball.

2 years agohivex/python fix for i386 integer size issue
Hilko Bengen [Wed, 27 Apr 2011 22:20:08 +0000]
hivex/python fix for i386 integer size issue

Hi,

While working on Debian packages of hivex 1.2.5, I came across a test
failure for the Python bindings with Python 2.7 on the i386
architecture. (The tests ran fine on amd64.)

,----
| $ make -C python check
| make[1]: Entering directory `/home/bengen/src/deb/hivex/hivex.git/python'
| 010-import.py
| 020-open.py
| 021-close.py
| 200-write.py
| python: hivex-py.c:52: get_handle: Assertion `obj' failed.
`----

I narrowed this down to hivex-py.c:py_hivex_node_add_child():

The call

,----
| PyArg_ParseTuple (args, (char *) "OLs:hivex_node_add_child",
|                         &py_h, &parent, &name)
`----

results in `py_h' set to NULL, though Python's documentation claims that
this cannot happen. I think this happens because `parent' is declared a
`long int', but "L" in the format string corresponds to a `long long'.
On amd64, they have the same size, but on i386 they don't, so the
PyObject pointer is written to the wrong address.

Please consider applying the patch below which just changes the format
string. After regenerating hivex-py.c, I have successfully tested the
1.2.5 code base on both architectures.

Cheers,
-Hilko

3 years agomaint: Split long lines.
Jim Meyering [Wed, 13 Apr 2011 15:03:50 +0000]
maint: Split long lines.

* lib/hivex.c: Split lines longer than 80 columns.

3 years agoVersion 1.2.5. 1.2.5
Richard W.M. Jones [Wed, 13 Apr 2011 14:06:43 +0000]
Version 1.2.5.

Updated PO files.

3 years agoRemove no longer used internal function utf16_string_len_in_bytes.
Richard W.M. Jones [Wed, 13 Apr 2011 13:04:16 +0000]
Remove no longer used internal function utf16_string_len_in_bytes.

3 years agohivex_value_multiple_strings: Don't read uninitialized data.
Richard W.M. Jones [Wed, 13 Apr 2011 13:01:03 +0000]
hivex_value_multiple_strings: Don't read uninitialized data.

If hivex_value_multiple_strings was given a value which had an odd
length or if the data in the value was unterminated,
hivex_value_multiple_strings could read uninitialized data.

Potentially (although very unlikely) this could cause a
non-exploitable segfault in the calling program.

3 years agoHandle odd-length "UTF16" strings.
Richard W.M. Jones [Wed, 13 Apr 2011 13:03:21 +0000]
Handle odd-length "UTF16" strings.

If the length of the buffer is not even, then this would read a byte
of uninitialized data.  Fix the length check to avoid this.

3 years agoReturn real length of buffer from hivex_value_value.
Richard W.M. Jones [Wed, 13 Apr 2011 12:55:49 +0000]
Return real length of buffer from hivex_value_value.

In real registries, often the length declared in the header does not
match the length of the block.  In this case hivex_value_value would
only allocate a value with a size which is the shorter of the two
length values, which is correct and safe.

However user code could do:

  buf = hivex_value_value (h, v, &t, &len);
  memcpy (somewhere, buf, len);

which would copy uninitialized data.

If hivex_value_value truncates a value like this, we also need to
return the shorter length to the user as well.

3 years agoReally fix the case where a UTF-16 string contains junk after the string.
Richard W.M. Jones [Wed, 13 Apr 2011 12:54:05 +0000]
Really fix the case where a UTF-16 string contains junk after the string.

The previous commit b71b88f588f8660935a7d462e97b84aa2d669249 attempted
to fix this, but got the test the wrong way round so the length would
never be shorter.

3 years agoFix use-after-free in hivex_close.
Richard W.M. Jones [Tue, 12 Apr 2011 16:59:47 +0000]
Fix use-after-free in hivex_close.

Found using valgrind.

3 years agoPull translations from Transifex.
Richard W.M. Jones [Sat, 2 Apr 2011 07:53:01 +0000]
Pull translations from Transifex.