Jim Meyering [Tue, 28 Jun 2011 18:09:45 +0000 (20:09 +0200)]
maint: remove unnecessary test-before-free
* lib/hivex.c (hivex_node_set_value): Remove unnecessary
test-before-free.
Richard W.M. Jones [Tue, 17 May 2011 16:37:31 +0000 (17:37 +0100)]
Richard W.M. Jones [Tue, 17 May 2011 16:19:27 +0000 (17:19 +0100)]
ocaml: Set package name when installing native bindings.
This fixes commit
b8ad15031cacf910634b4f4f4632232949c4acd2.
Richard W.M. Jones [Tue, 17 May 2011 15:51:48 +0000 (16:51 +0100)]
Version 1.2.7.
Richard W.M. Jones [Tue, 17 May 2011 15:51:37 +0000 (16:51 +0100)]
Update gnulib to latest version.
Richard W.M. Jones [Tue, 17 May 2011 10:16:10 +0000 (11:16 +0100)]
hivexregedit: Add --unsafe-printable-strings option.
Richard W.M. Jones [Fri, 13 May 2011 17:19:22 +0000 (18:19 +0100)]
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.
Hilko Bengen [Fri, 13 May 2011 06:37:56 +0000 (08:37 +0200)]
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
`----
Hilko Bengen [Fri, 13 May 2011 06:37:55 +0000 (08:37 +0200)]
hivex: Remove python bytecode on "make clean"
Richard W.M. Jones [Thu, 12 May 2011 11:25:21 +0000 (12:25 +0100)]
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.
Richard W.M. Jones [Thu, 12 May 2011 10:12:03 +0000 (11:12 +0100)]
Version 1.2.6.
Richard W.M. Jones [Thu, 12 May 2011 11:03:15 +0000 (12:03 +0100)]
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.
Richard W.M. Jones [Thu, 12 May 2011 11:03:06 +0000 (12:03 +0100)]
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.
Richard W.M. Jones [Thu, 12 May 2011 11:02:11 +0000 (12:02 +0100)]
configure: AC_PROG_LIBTOOL -> AM_PROG_LIBTOOL.
Unclear if this makes any difference.
Richard W.M. Jones [Thu, 12 May 2011 10:30:42 +0000 (11:30 +0100)]
Update gnulib.
Hilko Bengen [Wed, 11 May 2011 22:04:20 +0000 (00:04 +0200)]
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.
Hilko Bengen [Wed, 11 May 2011 22:04:19 +0000 (00:04 +0200)]
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)
Hilko Bengen [Wed, 11 May 2011 22:04:18 +0000 (00:04 +0200)]
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)
Richard W.M. Jones [Thu, 12 May 2011 09:49:13 +0000 (10:49 +0100)]
configure: Use Python platform-dependent site-packages.
This updates commit
b808c875a34e62fcdf360534f923d6030590ff44.
Hilko Bengen [Tue, 3 May 2011 22:29:39 +0000 (00:29 +0200)]
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.
Hilko Bengen [Mon, 9 May 2011 07:08:17 +0000 (09:08 +0200)]
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).
Richard W.M. Jones [Thu, 28 Apr 2011 08:48:23 +0000 (09:48 +0100)]
Include generator in the tarball.
Hilko Bengen [Wed, 27 Apr 2011 22:20:08 +0000 (00:20 +0200)]
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
Jim Meyering [Wed, 13 Apr 2011 15:03:50 +0000 (16:03 +0100)]
maint: Split long lines.
* lib/hivex.c: Split lines longer than 80 columns.
Richard W.M. Jones [Wed, 13 Apr 2011 14:06:43 +0000 (15:06 +0100)]
Version 1.2.5.
Updated PO files.
Richard W.M. Jones [Wed, 13 Apr 2011 13:04:16 +0000 (14:04 +0100)]
Remove no longer used internal function utf16_string_len_in_bytes.
Richard W.M. Jones [Wed, 13 Apr 2011 13:01:03 +0000 (14:01 +0100)]
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.
Richard W.M. Jones [Wed, 13 Apr 2011 13:03:21 +0000 (14:03 +0100)]
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.
Richard W.M. Jones [Wed, 13 Apr 2011 12:55:49 +0000 (13:55 +0100)]
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.
Richard W.M. Jones [Wed, 13 Apr 2011 12:54:05 +0000 (13:54 +0100)]
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.
Richard W.M. Jones [Tue, 12 Apr 2011 16:59:47 +0000 (17:59 +0100)]
Fix use-after-free in hivex_close.
Found using valgrind.
Richard W.M. Jones [Sat, 2 Apr 2011 07:53:01 +0000 (08:53 +0100)]
Pull translations from Transifex.
Richard W.M. Jones [Fri, 1 Apr 2011 21:46:07 +0000 (22:46 +0100)]
debian: Fix python test script for bash.
Richard W.M. Jones [Mon, 7 Mar 2011 10:53:52 +0000 (10:53 +0000)]
Import hivex into transifex.
http://www.transifex.net/projects/p/hivex/
Richard W.M. Jones [Thu, 23 Dec 2010 19:46:05 +0000 (19:46 +0000)]
Refresh documentation.
Richard W.M. Jones [Thu, 16 Dec 2010 13:41:59 +0000 (13:41 +0000)]
ocaml: Fix segfault in Hivex.value_value binding.
Richard W.M. Jones [Thu, 2 Dec 2010 15:29:38 +0000 (15:29 +0000)]
Version 1.2.4.
Richard W.M. Jones [Sun, 28 Nov 2010 11:14:11 +0000 (11:14 +0000)]
Python bindings.
Richard Jones [Fri, 27 Aug 2010 08:48:34 +0000 (09:48 +0100)]
Version 1.2.3.
Richard Jones [Fri, 27 Aug 2010 07:51:37 +0000 (08:51 +0100)]
build: Don't warn about 'long long'.
We have to allow this, even though it's a GCC extension.
This is a port of libguestfs commit
0c0976496dafda4d172c5a7fc787d6a87d5bce8d.
Geert Warrink [Fri, 27 Aug 2010 07:49:33 +0000 (08:49 +0100)]
Add Dutch translations (RHBZ#624455).
Matthew Booth [Fri, 13 Aug 2010 16:44:28 +0000 (17:44 +0100)]
Add debug output to hivex_close.
Richard Jones [Mon, 12 Jul 2010 14:06:35 +0000 (15:06 +0100)]
Don't try to process junk after a string value as UTF-16.
Thanks to Hilko Bengen for characterizing the issue and
providing an initial version of this patch.
Hilko Bengen [Mon, 12 Jul 2010 13:50:31 +0000 (14:50 +0100)]
Call iconv_close along error path out of function.
Richard Jones [Sun, 11 Jul 2010 22:32:14 +0000 (23:32 +0100)]
perl: Fix generated XS code for value_dword binding.
Thanks to Hilko Bengen for spotting the problem.
Conrad Meyer [Thu, 8 Jul 2010 10:12:42 +0000 (11:12 +0100)]
Add hivex_set_value API call, and ocaml and perl bindings, and tests.
Richard Jones [Sun, 13 Jun 2010 18:38:09 +0000 (19:38 +0100)]
hivex_value_type: Returns -1 on error. Fix documentation.
Richard Jones [Thu, 13 May 2010 10:23:50 +0000 (11:23 +0100)]
Include a test for regimport of values containing backslash chars.
Richard Jones [Fri, 30 Apr 2010 08:47:16 +0000 (09:47 +0100)]
regedit: Fix documentation for CurrentControlSet (thanks Yuval Kashtan).
Richard Jones [Wed, 28 Apr 2010 14:13:41 +0000 (15:13 +0100)]
Version 1.2.2.
Richard Jones [Wed, 28 Apr 2010 13:28:27 +0000 (14:28 +0100)]
regedit: Add implicit nul-termination when importing strings.
When you import a string value like:
"Foo"="Bar"
using Windows regedit program, implicit nul-termination is added
to the value (not the key), so what is stored in the value would
be something like:
hex(1):42,00,61,00,72,00,00,00
where two of the trailing zero bytes come from the implicit
terminator. This corrects the reg_import function so it works
the same way.
Richard Jones [Tue, 20 Apr 2010 17:45:19 +0000 (18:45 +0100)]
Remove checks for Test::Pod and Test::Pod::Coverage.
Although these modules are optionally used by the Perl tests,
they aren't necessary and won't break the build if they are not
there. These modules aren't available in RHEL 5. Therefore
remove these checks.
Richard Jones [Sat, 3 Apr 2010 15:06:58 +0000 (16:06 +0100)]
Add a linker script to limit visibility to exported symbols.
TJ [Sat, 3 Apr 2010 09:50:48 +0000 (10:50 +0100)]
Remove explicit dependency on ncurses.
TJ [Sat, 3 Apr 2010 08:23:43 +0000 (09:23 +0100)]
Spelling: reencode -> re-encode.
TJ [Fri, 2 Apr 2010 15:51:40 +0000 (16:51 +0100)]
Add CLEANFILES rules.
Yulia [Thu, 1 Apr 2010 07:30:38 +0000 (08:30 +0100)]
New Russian translation (RHBZ#578347).
Richard Jones [Tue, 30 Mar 2010 15:57:31 +0000 (16:57 +0100)]
Update PO files.
Richard Jones [Tue, 30 Mar 2010 15:57:18 +0000 (16:57 +0100)]
Add maintainer rule for updating the website.
Richard Jones [Tue, 30 Mar 2010 15:57:00 +0000 (16:57 +0100)]
hivexml: Fix path so HTML documentation is generated correctly.
Richard Jones [Tue, 30 Mar 2010 15:42:50 +0000 (16:42 +0100)]
Prepare for version 1.2.1.
Richard Jones [Fri, 26 Mar 2010 11:46:44 +0000 (11:46 +0000)]
hivexregedit: Low-level tool for merging and export in regedit format.
Richard Jones [Thu, 25 Mar 2010 12:03:36 +0000 (12:03 +0000)]
Win::Hivex::Regedit module for importing and exporting regedit format files.
Richard Jones [Tue, 30 Mar 2010 10:56:29 +0000 (11:56 +0100)]
hivexsh: '-f' option takes an argument (found by Marko Myllynen).
Richard Jones [Mon, 29 Mar 2010 21:51:12 +0000 (22:51 +0100)]
Zero all new block allocations.
Make sure all new block allocations (from allocate_block)
are zeroed. It can happen that junk from previous hive pages
can end up in new block allocations, if the hive previously
shrank.
(Thanks to Marko Myllynen for finding an example where this
happened).
Richard Jones [Mon, 29 Mar 2010 21:23:25 +0000 (22:23 +0100)]
Increase HIVEX_MAX_VALUES from 1000 to 10000.
I was sent a genuine Windows XP hive by Marko Myllynen which
had a key with > 1000 values attached.
Richard Jones [Fri, 26 Mar 2010 13:49:25 +0000 (13:49 +0000)]
Increase HIVEX_MAX_SUBKEYS to 15000.
Windows 7 registry has a hive key which contains 11908 subkeys,
larger than the existing limit (10000). The key is:
HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\SideBySide\Winners
Richard Jones [Fri, 26 Mar 2010 13:48:24 +0000 (13:48 +0000)]
hivex: Add debugging message when returning ERANGE error.
Richard Jones [Fri, 26 Mar 2010 11:47:20 +0000 (11:47 +0000)]
hivexsh: Fix building of HTML-format manpages.
Richard Jones [Thu, 25 Mar 2010 19:39:07 +0000 (19:39 +0000)]
perl: Fix $h->value_value method when returning an empty value.
Previously this didn't correctly return an empty registry
value. In this case the length argument to newSVpv would
be 0 which tells Perl to try to calculate the length (we
want newSVpvn instead).
Richard Jones [Thu, 25 Mar 2010 12:02:42 +0000 (12:02 +0000)]
Fix generation of po/POTFILES.in.
Contains some obsolete code copied in from libguestfs, and we
need to exclude Perl 'blib' files.
Richard Jones [Thu, 25 Mar 2010 12:01:34 +0000 (12:01 +0000)]
perl: Small fix to 006-pod-coverage test.
Some code copied over from libguestfs, fixed.
Richard Jones [Thu, 25 Mar 2010 11:57:35 +0000 (11:57 +0000)]
perl: Fix $h->value_type and $h->value_value methods.
These were passing the type & len arguments the wrong way round
to the C function, resulting in data corruption in the returned
values.
Richard Jones [Mon, 8 Mar 2010 17:44:43 +0000 (17:44 +0000)]
Fix documentation for Win::Hivex->open
Richard Jones [Mon, 1 Mar 2010 17:44:00 +0000 (17:44 +0000)]
RHEL 5: Fixes for old version of OCaml in EPEL 5.
Richard Jones [Mon, 1 Mar 2010 13:50:33 +0000 (13:50 +0000)]
Prepare for version 1.2.0.
Fix hivexsh_SOURCES.
Update PO files.
Daniel Cabrera [Mon, 1 Mar 2010 09:39:54 +0000 (09:39 +0000)]
Update Spanish translations (RHBZ#569178).
Richard Jones [Mon, 1 Mar 2010 09:37:22 +0000 (09:37 +0000)]
Update PO files.
Piotr Drąg [Mon, 1 Mar 2010 09:36:37 +0000 (09:36 +0000)]
Update Polish translations (RHBZ#502533).
Richard W.M. Jones [Fri, 26 Feb 2010 21:56:09 +0000 (21:56 +0000)]
NO Python bindings - ran out of time.
This commit disables parts of the build related to Python
and notes in the README that we didn't have time to finish
Python bindings.
Richard W.M. Jones [Fri, 26 Feb 2010 11:29:09 +0000 (11:29 +0000)]
generator: Perl bindings.
This also adds a small test suite for the Perl bindings.
Richard W.M. Jones [Thu, 25 Feb 2010 22:14:10 +0000 (22:14 +0000)]
generator: Clarify LGPLv2 boilerplate.
Richard W.M. Jones [Thu, 25 Feb 2010 22:05:51 +0000 (22:05 +0000)]
More documentation in README file.
Richard W.M. Jones [Fri, 26 Feb 2010 11:50:35 +0000 (11:50 +0000)]
hivexsh: Fix compilation on 32 bit machines.
Richard Jones [Thu, 25 Feb 2010 20:02:57 +0000 (20:02 +0000)]
Remove bogus msgstr from kn.po.
Richard Jones [Tue, 23 Feb 2010 12:27:19 +0000 (12:27 +0000)]
generator: Add OCaml bindings.
Also we tighten up the definition of hivex_close (it disposes of handles)
and hivex_node_get_child (unusual "not found" non-error condition).
This also adds tests of the OCaml bindings.
Richard Jones [Tue, 23 Feb 2010 10:36:51 +0000 (10:36 +0000)]
Add build framework for OCaml, Perl, Python bindings.
(No bindings are actually built, this just adds the build, test
and generator framework for them).
Richard Jones [Tue, 23 Feb 2010 10:28:14 +0000 (10:28 +0000)]
configure: Comment out Ruby, Java, Haskell detection.
We will not be implementing bindings for Ruby, Java or Haskell
unless someone pitches in to do the work. Therefore comment out
the code which detects these languages in the configure script.
(This leaves OCaml, Perl, Python, which we will be writing
bindings for).
Richard Jones [Wed, 24 Feb 2010 18:20:49 +0000 (18:20 +0000)]
Create separate toplevel directories for hivexsh and hivexml.
Richard Jones [Wed, 24 Feb 2010 17:57:01 +0000 (17:57 +0000)]
Rename hivex/ -> lib/
Richard Jones [Wed, 24 Feb 2010 17:30:37 +0000 (17:30 +0000)]
Move test images to images/ and add a large, generated test image.
Previously we had one minimal test image. This was located in
hivex/t (a subdirectory of the main library).
This adds a large, procedurally generated test image. Because
this needs to be built using hivex code, and because subdirectories
are built before the parent directory by automake, we have to
also move the directory location to a top-level directory called
images/.
Shankar Prasad [Wed, 24 Feb 2010 10:35:24 +0000 (10:35 +0000)]
Added Kannada translation (RHBZ#567860).
Richard Jones [Tue, 23 Feb 2010 19:08:41 +0000 (19:08 +0000)]
hivex: Fix allocations that may move C heap buffer.
When heavily extending existing hive files, the malloc-allocated
in-memory copy of the hive may be moved when we reallocate it
(to increase its size). However we didn't adjust existing
pointers to cope with this, so sometimes you could get a segfault.
This patch fixes the issue by adjusting pointers as necessary
after calling (directly or indirectly) to the allocate_block
function.
With this patch I was able to allocate 10,000's of blocks in
a deeply nested hive structure without any problems being reported
by valgrind.
Richard Jones [Tue, 23 Feb 2010 11:32:53 +0000 (11:32 +0000)]
Link gnulib in to the hivex library, not end-user programs.
Gnulib should be statically linked into the hivex library, so
it gets included into end-user programs automatically. Otherwise
end-user programs would have to link explicitly with gnulib.
Richard Jones [Mon, 22 Feb 2010 22:42:24 +0000 (22:42 +0000)]
generator: More minor formatting adjustments to POD documentation.
Richard Jones [Mon, 22 Feb 2010 22:38:36 +0000 (22:38 +0000)]
generator: Minor adjustments to the C POD documentation.
Richard Jones [Mon, 22 Feb 2010 16:30:12 +0000 (16:30 +0000)]
Add a generator for generating bindings to other languages.
At the moment the generator just generates the C header file
and C POD documentation. This just so we can compare the existing
hand-written code with the generated code to make sure that our
description of the API within the generator is correct.
Richard Jones [Mon, 22 Feb 2010 17:17:16 +0000 (17:17 +0000)]
Remove bogus reference to src/ directory which no longer exists.
Richard Jones [Mon, 22 Feb 2010 17:16:44 +0000 (17:16 +0000)]
Update copyright notice and change libguestfs to hivex.
Richard Jones [Mon, 22 Feb 2010 11:52:01 +0000 (11:52 +0000)]
Version 1.1.2