2019-01-24  Richard W.M. Jones  <rjones@redhat.com>

	Update gnulib to latest.
	Includes various fixes to --as-needed support.  See:
	https://lists.gnu.org/archive/html/bug-gnulib/2019-01/threads.html#00123

2019-01-22  Richard W.M. Jones  <rjones@redhat.com>

	Version 1.3.17.

2019-01-22  Michael Meyer  <mmeyer@datto.com>

	lib: Reset errno to zero to avoid erroneously returning E2BIG
	This line was accidentally removed in 77fe74fc, causing
	bug #1145056 (Bugzilla) to resurface.

2019-01-17  Richard W.M. Jones  <rjones@redhat.com>

	Version 1.3.16.

	Update gnulib to latest.

2019-01-17  Pino Toscano  <ptoscano@redhat.com>

	ruby: improve test functions
	Use better functions to check for proper values instead of assert:
	- refute_nil for non-null functions
	- assert_equal for checking equality

	Also, make sure that the parameters for assert_equal are correct:
	expected value, then got value.

2019-01-16  Pino Toscano  <ptoscano@redhat.com>

	perl: fix format of croak for RLenValue
	When calling croak on failure in the Perl code for RLenValue, add the
	%s placeholder for the strerror result.  This makes the croak call just
	like all the others.

	Fixes commit 87e1be8ff3431ac81d721d5f647fc85d02e045dc.

2018-02-26  Richard W.M. Jones  <rjones@redhat.com>

	ocaml: Link the C bindings with LDFLAGS (RHBZ#1548536).
	Use the ocamlmklib -ldopt flag to pass the general $(LDFLAGS) when
	calling gcc to link dllmlhivex.so.  We were already passing $(CFLAGS)
	when building the object file.

	When building using Fedora's standard hardening flags this gives:

	ocamlmklib -o mlhivex hivex_c.o hivex.cmo \
	    -verbose -ldopt '-Wl,-z,relro -specs=/usr/lib/rpm/redhat/redhat-hardened-ld' \
	    -L../lib/.libs -lhivex
	+ gcc -shared  -o ./dllmlhivex.so hivex_c.o  -Wl,-z,relro -specs=/usr/lib/rpm/redhat/redhat-hardened-ld  -L../lib/.libs -lhivex
	+ ar rc ./libmlhivex.a  hivex_c.o; ranlib ./libmlhivex.a
	+ /usr/bin/ocamlc -a    -o mlhivex.cma  hivex.cmo -dllib -lmlhivex -cclib -lmlhivex   -cclib -L../lib/.libs -cclib -lhivex

	This also works if $(LDFLAGS) is empty, because ocamlmklib ignores
	-ldopt ''.

2018-02-26  Richard W.M. Jones  <rjones@redhat.com>

	Version 1.3.15.

	Ignore config.cache file.

	Update gnulib to latest.

2018-02-10  Hilko Bengen  <bengen@hilluzination.de>

	Add a cache for iconv_t handles to hive_t
	It was brought to my attention that dumping a registry hive causes a
	lot of time spent in disk I/O activity because iconv_open() and
	iconv_close() are called for every key. Every iconv_open() call causes
	/usr/lib/.../gconv/$ENCODING.so to be opened and mapped.

	The iconv_t handles are now cached in the hive_h struct; they are
	opened on-demand and re-used.

	On my ~10 year old Lenovo T60, I have seen 57% savings in the overal
	runtime of running

	    hivexregedit --export windows-8-enterprise-software.hive '\\'

2018-01-02  Michael Meyer  <mmeyer@datto.com>

	hivexregedit: add --max-depth option for exports

2017-11-08  Richard W.M. Jones  <rjones@redhat.com>

	ocaml/t/hivex_200_write.ml: Use Bytes instead of String.

	generator: Use Bytes instead of String.

2017-09-06  Hilko Bengen  <bengen@hilluzination.de>

	run.in: Quote contents of @VAR@ substitutions

2017-07-14  Pino Toscano  <ptoscano@redhat.com>

	build: do not ignore pod2man error codes
	Move the temporary output of pod2man to the correct name only if pod2man
	did not fail: this also makes the whole command fail if pod2man fails,
	e.g. because of wrong markup.

2017-07-14  Pino Toscano  <ptoscano@redhat.com>

	hivexregedit: fix POD markup
	Put the "=back" to close the list only after the last element.

	Fixes the documentation of
	commit 2610b1e089fa84d294f9925342929e3d7408c35b.

2017-07-11  Hilko Bengen  <bengen@hilluzination.de>

	hivexsh: Add missing documentation for -u switch

	hivexml: Add -u flag for HIVEX_OPEN_UNSAFE

2017-05-22  Richard W.M. Jones  <rjones@redhat.com>

	README: Document how to choose Python 2 vs Python 3.

	README: Merge all bindings into one section, add Python and Ruby bindings.

2017-05-16  Richard Jones  <rjones@redhat.com>

	handle: Return value from le32toh is unsigned, so use PRIu32 to print it.

2017-02-17  Richard W.M. Jones  <rjones@redhat.com>

	Version 1.3.14.

2017-02-17  Dawid Zamirski  <dzamirski@datto.com>

	hivexregedit: allow to pass HIVEX_OPEN_UNSAFE
	via new --unsafe flag. Also make --export catpure, log and skip over
	errors when reading subkeys/values so that export in unsafe mode does
	not abort at first sign of error.

	hivexsh: add -u flag for HIVEX_OPEN_UNSAFE.
	and pass it to hivex_open. Additionally make hivex_value_value failures
	non-critical in this mode when iterating through node children/values.

2017-02-17  Dawid Zamirski  <dzamirski@datto.com>

	lib: allow to walk registry with corrupted blocks
	Only when HIVEX_OPEN_UNSAFE flag is set.

	There are some corrupted registry files that have invalid hbin cells
	but are still readable. This patch makes the following changes:

	* hivex_open - do not abort with complete failure if we run across a
	  block with invalid size (unless it's the root block). Instead just
	  log the event, and move on. This will allow open hives that have
	  apparent invalid blocks but the ones of potential interest might be
	  perfectly accessible.
	* _hivex_get_children - similiarly, if the's invalid subkey, just skip
	  it instead of failing so one can continue to browse other valid
	  subkeys.

	The above is similar to the behavior to Windows regedit where one can
	load such corrupted hives with e.g. "reg load HKU\Corrupted" and
	browse/change it despite some keys might be missing.

2017-02-17  Dawid Zamirski  <dzamirski@datto.com>

	lib: change how hbin sections are read.
	Only when HIVEX_OPEN_UNSAFE flag is set:

	* hivex_open: when looping over hbin sections (aka pages), handle a
	  case where following hbin section may not begin at exactly at the end
	  of previous one. If this happens, scan the page section until next
	  one is found and validate it by checking declared offset with actual
	  one - if they match, all is good and we can safely move on.

	Rationale: there are registry hives there is some garbage data between
	hbin section but the hive is still perfectly usable as long as the
	offsets stated in hbin headers are correct.

2017-02-17  Dawid Zamirski  <dzamirski@datto.com>

	add HIVEX_OPEN_UNSAFE flag.
	This flag will be used to control behavior of libhivex API functions so
	that they tolerate corruption in hives by either using heuristic
	recovery from unexpected situations or simply ignore bad registry
	keys/values whenever possible.

2017-02-15  Richard W.M. Jones  <rjones@redhat.com>

	Disable -Wunsafe-loop-optimizations warning.
	It doesn't indicate a bug, it indicates that GCC cannot make an
	optimization (I think).

2017-02-15  Richard W.M. Jones  <rjones@redhat.com>

	sh: Fix signed/unsigned issues in setval command.
	Use size_t instead of int for counting sizes of strings etc.

	Also remove this warning:

	hivexsh.c: In function 'main':
	hivexsh.c:923:7: error: missed loop optimization, the loop counter may overflow [-Werror=unsafe-loop-optimizations]
	       for (j = 0; j <= /* sic */ nr_chars; ++j) {
	       ^~~
	hivexsh.c:942:7: error: missed loop optimization, the loop counter may overflow [-Werror=unsafe-loop-optimizations]
	       for (j = 0; j <= /* sic */ nr_chars; ++j) {
	       ^~~

2017-02-15  Richard W.M. Jones  <rjones@redhat.com>

	lib: Temporarily disable -Wstrict-overflow warning around statement.

2016-12-03  Matt Coleman  <matt@datto.com>

	Increase HIVEX_MAX_SUBKEYS and HIVEX_MAX_VALUES
	This increases the defined limits based on counts observed in the
	Microsoft\Windows NT\CurrentVersion subkey of the software hive.

2016-11-01  Richard W.M. Jones  <rjones@redhat.com>

	test: Fix test that handle is not NULL.
	Fixes commit 7964606fbb481c4725c202804a127168ac309020.

	run: Add built programs to the PATH.
	As a side effect of this change, this ensures we are testing
	hivexregedit that has been built, not the installed version (and
	failing when hivexregedit is not installed).

2016-02-15  kupiakos  <kupiakos@gmail.com>

	New API: hivex_node_nr_values

2016-02-15  Richard W.M. Jones  <rjones@redhat.com>

	New API: node_nr_children
	A number of changes from the previous patch:

	 - Change the name of the new API to node_nr_children.

	 - Stylistic/whitespace changes.

2016-02-14  kupiakos  <kupiakos@gmail.com>

	lib: Add hivex_node_children_count

2015-10-29  Richard W.M. Jones  <rjones@redhat.com>

	Version 1.3.13.

	Enable more warnings in configure.
	Includes some minor fixes in hivexsh.c to deal with the new warnings.

	sh: Use %u formatter to print enum strtol_error.

	sh: Cast value to unsigned type when printing dword: field.

	hive_type enum needs %u printf formatter.

	lib: block->seg_len is signed, use correct printf formatter.

	lib: h->last_modified field is signed, so use correct printf formatter.

	lib: Turn off -Warray-bounds warnings.
	Causes false positives about our use of [1] for arbitrary length
	arrays embedded in structs.

	Update gnulib to latest.

	Don't fail if libxml2 is not installed (RHBZ#1276364).
	If no libxml2 found, don't compile hivexml, but compile the
	rest of the library.

2015-10-21  Pino Toscano  <ptoscano@redhat.com>

	build: pass $(MAKE) to run-perl-tests
	Instead of hardcoding "make" in run-perl-tests, pass the actual name of
	make from the Makefile; the default is still "make", mostly to use the
	script without having to set $MAKE.

2015-10-05  Richard W.M. Jones  <rjones@redhat.com>

	Fix EXTRA_DIST.
	This fixes commit 6047a47da9e664cd589aa22ab65d9168d834fa5b.

	Version 1.3.12.

2015-10-05  Pino Toscano  <ptoscano@redhat.com>

	Update .gitignore with more gnulib files.

	Update gnulib to latest.

2015-10-05  Pino Toscano  <ptoscano@redhat.com>

	Fix shebang in perl scripts
	Instead of hardcoding the location of perl (assuming it is installed in
	/usr), use /usr/bin/env to run it, and thus picking it from $PATH.
	This makes it possible to run these scripts also on installations with
	perl in a different prefix than /usr.

	Also, given that we want enable warnings on scripts, turn the -w
	previously in shebang to explicit "use warnings;" in scripts which
	didn't have it before.

	(This is the same change as d98c9c0e0b4d259f49825fc360bc7e6cafbdd644
	in libguestfs.)

2015-10-02  Robert Antoni Buj Gelonch  <rbuj@fedoraproject.org>

	add Catalan

2015-10-02  Richard W.M. Jones  <rjones@redhat.com>

	Update translations from Zanata.

2015-02-21  Richard W.M. Jones  <rjones@redhat.com>

	Update translations from Zanata.
	Note this includes new translations for: German, Basque, Hungarian,
	Japanese, Portuguese and Serbian.

2015-02-21  Richard W.M. Jones  <rjones@redhat.com>

	Move upstream translations from Tranifex to Zanata.
	This is at the request of the Fedora localization team.
	For further information see:

	https://www.redhat.com/archives/libguestfs/2015-February/msg00168.html

2014-11-20  Richard W.M. Jones  <rjones@redhat.com>

	lib: Don't leak errno from _hivex_recode function.
	If iconv returns E2BIG, that's an internal indication for us, and not
	an error.  Don't leak the errno up to the user, as happened here:

	https://www.redhat.com/archives/libguestfs/2014-November/msg00140.html

	Thanks Nicolas Ecarnot.

2014-11-20  Richard W.M. Jones  <rjones@redhat.com>

	lib: Increase HIVEX_MAX_SUBKEYS to 25000.
	Thanks Nicolas Ecarnot who found a HKLM\SOFTWARE hive from a Windows
	XP machine which had an nk containing 18254 subkeys ( > current limit
	of 15000).

2014-11-14  Richard W.M. Jones  <rjones@redhat.com>

	lib: Increase HIVEX_MAX_VALUE_LEN to 8000000.
	I encountered a hive that contained a key of 3_886_561 bytes length in
	a key called 'HKLM\SYSTEM\ControlSet001\services\mfeavfk' (apparently
	belonging to "McAfee Anti-virus software").

	The previous limit was set arbitrarily at 2_000_000 bytes.  Increase
	it to cope with this larger key.

2014-11-13  Pino Toscano  <ptoscano@redhat.com>

	lib: write: fix memory leak
	Free the "blocks" array got from _hivex_get_children.

	Thanks: Mahmoud Al-Qudsi

2014-11-06  Pino Toscano  <ptoscano@redhat.com>

	ruby: fix detection of ruby library
	Query RbConfig::CONFIG for "libdir", and use that when trying to link to
	the ruby library.  This fixes the libruby detection when it is installed
	in a non-standard library directory.

	(This is the same change as 3d02e53c48266669675cc237f61ae2c4e1816e66
	in libguestfs.)

2014-11-06  Pino Toscano  <ptoscano@redhat.com>

	normalize iconv handling
	Since the signature of iconv() changes between implementations (the
	constness of the second parameter, in particular), make use of the iconv
	module of gnulib to handle these potential differences.

	(This is a reduced version of 57512e778558c5b93cfa360c83836c2cf8fc5908
	in libguestfs.)

2014-10-30  Richard W.M. Jones  <rjones@redhat.com>

	Version 1.3.11.
	Also update translations from transifex.

	extra-tests: Add trivial fuzz tester.
	Could be improved greatly, but it's a start.

	handle: Check that pages do not extend beyond the end of the file.
	Thanks: Mahmoud Al-Qudsi

2014-10-30  Richard W.M. Jones  <rjones@redhat.com>

	handle: Refuse to open files < 8192 bytes in size.
	These cannot be valid hives, since they don't contain a full header
	page and at least a single page of data (in other words they couldn't
	contain a root node).

	Thanks: Mahmoud Al-Qudsi

2014-09-22  Richard W.M. Jones  <rjones@redhat.com>

	hivexml: Tidy up error handling and printing.

2014-09-22  Richard W.M. Jones  <rjones@redhat.com>

	value: Set errno = 0 on non-error path in hivex_value_data_cell_offset (RHBZ#1145056).
	hivex_value_data_cell_offset may return 0 to indicate that the data is
	inline.  This is not an error return, but it was possible for errno to
	have a random (non-zero) value along this path.  Explicitly set errno
	= 0 on this path.

	Thanks: Wei Shi

2014-08-18  Peter Wu  <peter@lekensteyn.nl>

	generator: Fix mixed tabs/spaces
	vim :set ts=8 :retab

	python: add heavier tests for setvalue
	Ensure that invalid types are not silently ignored (and test to avoid
	segfaults).

2014-08-18  Peter Wu  <peter@lekensteyn.nl>

	python: fix crash by validating key and value
	User-visible changes: no crashes if you try to pass a non-str type as
	key/value in Python 3. Exceptions are thrown rather than silently
	ignoring type violations (such as passing a Unicode string as value
	in Python 2).

	Until now, Python 2 keys and values were assumes to be bytes, in
	Python 3 these were seen as Unicode strings instead. Remove the
	compile-check for a deprecated Python 2 function (`PyString_AsString`)
	and check for byte types instead.

	For keys, accept both strings and bytes as the common case is to pass
	a ASCII string name. (The `\u20ac` Unicode character (Euro-sign) is
	apparently also valid as key name, verified with Python 3 and
	Windows 7).

	For values, be more conservative and reject all types except bytes. This
	better matches the C API and removes the burden of character conversion
	from the wrapper. Instead, callers should know the correct encoding
	and terminate strings.

	Modify tests to specify bytes instead of strings. (Otherwise Python 3
	would break while Python 2 still passes.)

2014-08-18  Peter Wu  <peter@lekensteyn.nl>

	python: check some types for get_value
	Recognise early that a value passed to node_get_value is not a dict
	rather than spitting out "no 'key' element in dictionary".

	Detect errors for invalid `t` elements instead of silently using `-1`.

2014-08-18  Peter Wu  <peter@lekensteyn.nl>

	python: use PyErr_NoMemory
	If malloc fails, just throw a NoMemory exception rather than showing
	"RuntimeError: Cannot allocate memory".

2014-08-18  Peter Wu  <peter@lekensteyn.nl>

	python: use errors more specific than RuntimeError
	KeyError is documented as:
	"Raised when a mapping (dictionary) key is not found in the set of
	existing keys."

	TypeError is documented as:
	"Raised when an operation or function is applied to an object of
	inappropriate type."

	RuntimeError is documented as:
	"Raised when an error is detected that doesn’t fall in any of the other
	categories."

	Let's be more specific with exceptions. The exception all inherit from
	StandardError (and from Exception), but not from RuntimeError, so this
	might need some code changes (if users would catch this specific error).
	However, this behavior was not documented so it is perfectly fine to
	change it.

2014-08-12  Richard W.M. Jones  <rjones@redhat.com>

	Ignore python/hivex directory.
	It contains only generated files.

2014-08-12  Peter Wu  <peter@lekensteyn.nl>

	python: export hive_types constants
	Instead of using magic numbers or copying the numbers all over place,
	make the hive type constants available so you can do:

	    import hivex
	    from hivex.hive_types import *

	    h = hivex.Hivex ("../images/minimal", write = True)
	    new_value = { "key": "abc", "t": REG_BINARY, "value": b"xyz" }
	    h.node_set_value (h.root (), new_value)

2014-08-12  Peter Wu  <peter@lekensteyn.nl>

	python: move module to separate directory
	This allows submodules to be added under the 'hivex' namespace. A new
	`pythonmoddir` variable was added for separating libhivexmod.so and the
	Python hivex module.

2014-08-12  Peter Wu  <peter@lekensteyn.nl>

	python: expose package version
	Exposing the module version through the `__version__` property conforms
	to PEP-396. The recommended versioning scheme is specified in
	PEP-386[1].

	 [1]: https://www.python.org/dev/peps/pep-0386/

2014-08-08  Peter Wu  <peter@lekensteyn.nl>

	Avoid calling calloc(0, x)
	The return value for zero-size allocations is implementation-defined
	(can be NULL or a unique pointer for free()). Just return early here as
	there is nothing to print.

	Caught by Clang static analyzer.

2014-08-08  Peter Wu  <peter@lekensteyn.nl>

	Silence dead assigmnents/initialization/increments
	Some of these assignments were introduced in commit
	c9d5cd059c45fd3aa6d16b3ba185d7cb3a08de9e ("hivex: Fix allocations that
	may move C heap buffer."), but turn out to be unnecessary (unused).
	Replace the assignments by a comment in case someone extends the code
	later.

	Caught by Clang static analyzer.

2014-08-07  Peter Wu  <peter@lekensteyn.nl>

	Fix overly long assertion string
	With GCC 4.9.1 I get a -Woverlength-strings warning:
	hivex-internal.h:123:23: error: string length ‘3823’ is greater than ...
	   (STREQLEN (((struct ntreg_hbin_block *)((char *) (h)->addr + (offs)))->id, (eqid), 2))

	The compile command can be shortened to:

	    cd lib && cpp -DHAVE_CONFIG_H -I.. -I../gnulib/lib  -I. \
	        -Woverlength-strings -Werror -g -O2 write.c

	After that, be amazed at the huge assertion string produced by the
	macro which is also visible in libhivex.so (two times).

	To fix that mess, use an inline function. The `STR*` macros were moved
	and a string.h header added since STREQLEN is used in the function.

2014-08-07  Peter Wu  <peter@lekensteyn.nl>

	Fix garbage return value on error
	If str contains invalid characters, ret is not initialised. Caught by
	Clang static analyzer.

2014-05-20  Richard W.M. Jones  <rjones@redhat.com>

	generator: Fix a spelling mistake in the documentation (RHBZ#1099286).

2014-05-14  Richard W.M. Jones  <rjones@redhat.com>

	perl: Provide alternate definition of newSVpvn_utf8 for older Perl.
	Commit 40fff10318e0001fb3a145f5e1a905704e3f5695 uses newSVpvn_utf8.
	This macro did not exist in Perl < 5.12, but we can use newSVpvn
	instead.

	Also update the associated test script:

	- Don't use 'done_testing'.  Not supported by ancient Perl.

	- Skip the tests entirely on ancient Perl.

2014-04-23  Richard W.M. Jones  <rjones@redhat.com>

	Version 1.3.10.

	Update gnulib to latest.
	This update enables the -Wjump-misses-init warning, so we have to
	disable it in configure.ac, since a lot of hivex code does this.

	gitignore: Ignore run-ruby-tests (generated).

2014-04-23  Pino Toscano  <ptoscano@redhat.com>

	ruby: tests: convert from Test::Unit to MiniTest (RHBZ#1090407)
	Convert the tests to the MiniTest test framework, but keeping the usage
	of the old Test::Unit as fallback in case MiniTest is not available.
	In the latter case, use a bit of "glue" to make the old API look like
	the new API, so we can just rely on the newer MiniTest API.

	(This is the same change as 2f5e9066db817f75b245f256abc0c64dd1ae54eb
	in libguestfs.)

2014-04-23  Pino Toscano  <ptoscano@redhat.com>

	ruby: tests: isolate boilerplate in common file
	Isolate in a common file all the standard boilerplate in tests, i.e. the
	import of the test framework and the guestfs module (including the
	import path hack needed for the latter).

	(This is the same change as fbae7f3e69ce598c52af71ec204f8dbd0a9ce5e5
	in libguestfs.)

2014-03-26  Richard W.M. Jones  <rjones@redhat.com>

	lib: Fix memory leak (found by Coverity).

2014-02-07  Hilko Bengen  <bengen@hilluzination.de>

	Bump value size limit
	I actually encountered a binary value with 1033680 bytes.

	Use correct constant in diagnostic error message

2014-02-03  Hilko Bengen  <bengen@hilluzination.de>

	python: value_value no longer generates Unicode strings
	This fixes Github issue #2 reported by "kupiakos".

	<https://github.com/libguestfs/hivex/issues/2>

2014-01-17  Richard W.M. Jones  <rjones@redhat.com>

	Version 1.3.9.

2014-01-16  Hilko Bengen  <bengen@hilluzination.de>

	ruby: Fix fallback to rake/rdoctask for old rake.
	(This is the same change as 480bd3a6d8a56b37936b08c94eb99f0921fe65de
	in libguestfs.)

	ruby: Support 'make INSTALLDIRS=vendor install' for Ruby
	(This is the same change as 87c9ec881cb695724e01d9f6fc9df996d4c67cb6
	in libguestfs.)

	Make sure that pod2html finds the POD file when building out-of-tree
	Otherwise we get "Can't open ..." warnings which don't seem to be fatal.

	ruby: find files to install in correct directories when building out-of-tree

2014-01-15  Hilko Bengen  <bengen@hilluzination.de>

	python: Get rid of to_string function in test script
	Since values are now returned as strings in Python2 and Python3,
	treating them as bytes in Python 3 would break tests.

	python: Produce Unicode strings in get_* methods

	python: Fix encoding for "special" test script
	Hopefully. Python's unicode history is a mess.

	Python 2.6 does not have sysconfig.

2014-01-14  Hilko Bengen  <bengen@hilluzination.de>

	lib: Make empty strings in REG_MULTI_SZ values available.

2014-01-13  Hilko Bengen  <bengen@hilluzination.de>

	Tweak STDOUT, STDERR instead of depending on utf8::all

	ruby: Add test for "special" keys and values

	ruby: Properly declare UTF-8 encoding on node names, value keys

	ruby: Fix tests for out-of-tree build, simplify test scripts

	python: fix test runner so scripts are found when building out-of-tree

	python: Python 3 no longer recognizes long integers

	perl: Properly decode node names, value keys from UTF-8

	python: Add test for "special" keys and values

	perl: Add test for "special" keys and values

	lib: Use vk->len for string conversion

	Add a minimal hive with "special" keys and values

2014-01-10  Richard W.M. Jones  <rjones@redhat.com>

	Fix const-correctness in _hivex_utf8_strlen function.
	Plus a whitespace fix.

2014-01-08  Hilko Bengen  <bengen@hilluzination.de>

	generator: use node_name_len, value_key_len API in bindings

	lib: Mind character encoding in value_key_len, add matching node_name_len function
	Since iconv() does not treat null characters as special, this makes it
	possible to read node names and value keys with embedded null
	characters. which are not displayed at all by Windows Regedit.

	lib: Add internal function to calculate strlen for strings encoded in Latin1 or UTF-16LE

2013-12-31  Richard W.M. Jones  <rjones@redhat.com>

	lib: utf16: Fix const-correctness issues in _hivex_recode function.
	This patch assumes that iconv doesn't actually modify the
	input buffer, even though it is declared as char *.

	lib: write: Remove unused variable.

2013-11-26  Hilko Bengen  <bengen@hilluzination.de>

	lib: Add support for creating nodes (keys) and values with UTF-16LE-encoded names

	lib: Add function that encodes UTF-8 to "packed" strings or UTF-16LE as Windows does

	lib: Further generalize iconv wrapper function.

2013-11-22  Hilko Bengen  <bengen@hilluzination.de>

	Correctly handle latin1-encoded key/value names

	Handle UTF-16-LE-encoded key/value names

	Document ntreg_nk_record.flags

2013-10-16  Alex Nelson  <a.nelson@prometheuscomputing.com>

	lib: Promote byte_conversions.h #include to hivex-internal.h
	This patch addresses a build failure in OS X.  Running git-bisect on a
	straightforward build (bootstrap, autogen.sh, configure, make, make
	install) showed this as the "Bad commit:"
	3e7c039799cddc45517350cc917eb10715f33fec

	The issue is that hivex-internal.h uses le32toh in a static inline
	function.  In case `configure` doesn't find le32toh, byte_conversions.h
	defines it.  But hivex-internal.h doesn't include the safety definition.

	OS X demonstrates this a problem.  Neither endian.h nor byteswap.h are
	found with `configure` in OS X 10.8.5 (XCode 5), but the headers are
	both found in Fedora 19 and Ubuntu 13.04.  This patch to configure.ac
	further logs that only ntohl is available for byte swaps:

	    @@ -153,6 +153,8 @@ AC_REPLACE_FUNCS([mmap])
	     dnl Functions.
	     AC_CHECK_FUNCS([bindtextdomain])

	    +AC_CHECK_FUNCS([le32toh ntohl bswap_32 __bswap_32])
	    +

	(As an aside, it's curious that a missing byteswap.h didn't cause
	hivex-internal.h to fail to build.)
	(As another aside, this is an interesting example of lazy symbol
	binding failing with an inline function.)

	The problem is resolved by having hivex-internal.h include
	byte_conversions.h.  This obviates most of the other direct inclusions
	of byte_conversions.h.  (One persists under sh/.)

	This patch builds and runs hivexml on images/large fine in Ubuntu 13.04
	and Fedora 19.  It also allows builds to succeed in OS X, but doesn't
	run hivexml for an unrelated reason.  The _iconv_open
	symbol-not-found issue, that I thought was previously resolved
	(491ba0f7a761c7ffd50e0eaa4d892f78d538eb2b), resurfaced.

2013-09-10  Richard W.M. Jones  <rjones@redhat.com>

	ppc: Fix endianness bug which caused node_add_child to fail.
	Code used:

	  le32toh (reg_field + 0x1000)

	instead of the correct version:

	  le32toh (reg_field) + 0x1000

	The first incorrect form adds 0x1000 to the possibly byte-swapped
	registry field, corrupting it.

	I used the following command to look for problems in the remaining
	code but did not find any:

	  git grep -P 'le\d+toh\s*\([^)]*\+'

	NOTE that 'htole32 (reg_field - 0x1000)' is correct.

2013-09-10  Richard W.M. Jones  <rjones@redhat.com>

	lib: Add debugging of return values from _hivex_get_children.
	The debugging is commented out as it's huge and wasn't especially
	useful.

2013-09-10  Richard W.M. Jones  <rjones@redhat.com>

	ppc: handle: Display block id in debug output portably.
	On PowerPC, 'char' is 'unsigned char', whereas on everything else it
	is 'signed char'.  Therefore the block id fields got printed
	differently (unsigned integers on ppc, signed numbers everywhere
	else).

	Change this debug message to be more informative and portable.

2013-09-10  Richard W.M. Jones  <rjones@redhat.com>

	lib: Add attribute((packed)) on inner struct.
	Apparently this attribute is not "inherited" from the outer struct to
	the inner struct.

	ppc: iconv: Source is UTF-16LE not just UTF-16.
	On big endian architectures like PowerPC, "UTF-16" means "UTF-16BE"!

	lib/write: Add some debugging messages.

2013-07-26  Richard W.M. Jones  <rjones@redhat.com>

	extra-tests: Add a test of node insertion in real hives.
	This tests:
	https://bugzilla.redhat.com/show_bug.cgi?id=987463

2013-07-25  Richard W.M. Jones  <rjones@redhat.com>

	Version 1.3.8.

	translations: Change transifex download URL.

	build: Add 'make maintainer-tag' rule (copied from libguestfs).

	tests: Add extra-tests directory to go with hivex-test-data.

2013-07-25  Richard W.M. Jones  <rjones@redhat.com>

	build: Add a ./run script.
	As with libguestfs and other projects, this script allows you to run
	programs without installing them first, eg:

	  ./run ./regedit/hivexregedit ...

	It also simplifies writing the tests.

2013-07-25  Richard W.M. Jones  <rjones@redhat.com>

	lib: node_add_child: Checks that we don't extend records beyond maximum number of subkeys permitted.
	Previously we didn't check this, so it was possible that
	nr_subkeys/nr_offsets would wrap around to 0.

	lib: node_add_child: Handle li-records as intermediate notes (RHBZ#987463).
	This commit implements adding a child to a registry key that uses
	li-records for intermediate nodes.

	lib: node_add_child: Factor out subkey insertion into separate function.
	No functional change.

	lib: get_children: Handle li-records as intermediate nodes (RHBZ#717583).
	This is a full fix for
	https://bugzilla.redhat.com/show_bug.cgi?id=717583

	lib: get_children: Add a check that we don't overrun ri-record when reading.

	lib: get_children: Handle ri-record by just recursing.
	No functional change.

	lib: get_children: Add additional check that each child is an nk block.

	lib: get_children: Factor out valid block test into separate function.
	Just refactoring, no functional change.

	lib: get_children: Refactor this into two functions.
	Although this change seems rather large, including removing a large
	block of dead code, there should be no functional change.

	lib: get_children: Use offset_list limits to limit length of returned lists.
	This will allow us to change the function to work recursively, and
	still enforce these limits.

2013-07-24  Richard W.M. Jones  <rjones@redhat.com>

	lib: get_children: Document the function, and small non-functional cleanups.

	lib: Split up the large file lib/hivex.c into multiple small source files.

	Fix .gitignore.

2013-07-24  Richard W.M. Jones  <rjones@redhat.com>

	lib: Add macros for setting errno and checking if the hive is writable.
	This is code cleanup, but there are a couple of small changes:

	 - the msglvl for errno explanations moves from debug (2) to verbose (1)

	 - add and tidy up some of the error messages

2013-07-24  Richard W.M. Jones  <rjones@redhat.com>

	lib: Add a DEBUG macro and use it instead of fprintf.
	Allows us to control the format of debug messages more carefully.

	lib: Add some debugging.

	Revert "patch for read support of "li"-records from "ri" intermediate"
	This reverts commit c29d2625c2286b026c4e36a8b5469991c41b4299.

	lib: Move the 'offset_list' struct into a separate compilation unit.

	build: Add *~ to CLEANFILES.

	build: Ignore .gdb_history file.

2013-07-23  Richard W.M. Jones  <rjones@redhat.com>

	lib: Cast h->addr to char* in macro.
	This is a fix for commit f8b62e4cd2f65cd712164c59094e81f2958aa000.

2013-06-28  Richard W.M. Jones  <rjones@redhat.com>

	commit: Set O_CLOEXEC or FD_CLOEXEC on the file descriptor.

2013-06-28  Daniel Gillen  <gillen.daniel@gmail.com>

	hivex: Add O_BINARY flag to open calls for platforms where this isn't the default (such as Win32)

2013-06-25  Hilko Bengen  <bengen@hilluzination.de>

	Add read support for "big data" blocks to hivex
	Large values are split into multiple blocks. References to these
	sub-blocks are kept in a list whose structure seems to be identical to
	a value list.

	A "db" record contains information on the number of sub-blocks and a
	pointer to the list. It is referenced by the vk record.

	I came across this when comparing the contents of HKLM\SOFTWARE hives
	from Windows7 systems and finding that hivex_value_value would only give
	me identical first 12 bytes for certain records though the data size had
	changed. If one runs hivexsh with debug messages enabled, it gives a
	warning when listing these values, for example:

	SOFTWARE\Microsoft\SystemCertificates\AuthRoot\AutoUpdate> lsval
	[...]
	hivex_value_value: warning: declared data length is longer than the
	block it is in (data 0x28b9b60, data len 115347, block len 16)
	"EncodedCtl"=hex(3):64,62,08,00,70,8b,8b,02,00,b2,00,00

2013-06-19  Hilko Bengen  <bengen@hilluzination.de>

	Relax size checks for integer types
	I recenetly came across a Windows XP image, where one REG_QWORD value
	(HKLM\Software\Microsoft\Windows\CurrentVersion\Group Policy\State\Machine\Scripts\Shutdown\0\0\ExecTime)
	would be displayed by hivexsh but hivex_value_qword() would return -1.

	It turned out that the data length of this value was 16 bytes instead
	of 8.

	There is no problem in simply interpreting the first 4 (DWORD) or
	8 (QWORD) bytes -- if there are enough bytes to be interpreted.

2013-05-30  Hilko Bengen  <bengen@hilluzination.de>

	Revert "perl: Ignore run-perl-tests (generated script)."
	This reverts commit 72e2abf312358c228889cfff2f6ac10e9f61c5b5.

2013-05-30  Hilko Bengen  <bengen@hilluzination.de>

	Revert "Build and test Perl bindings out-of-tree."
	There seems to be no sane way to build/test an
	ExtUtils::MakeMaker-based project in a separate directory and get
	identical results.

	This reverts commit 887466794a40f57b84ce32524e1a650d6674c7e6.

2013-05-24  Richard W.M. Jones  <rjones@redhat.com>

	perl: Ignore run-perl-tests (generated script).

2013-05-24  Hilko Bengen  <bengen@hilluzination.de>

	Build Python extension with PEP-3149 compliant suffix if defined.

	Fix bindings for python 3.3 (as shipped with Debian and Ubuntu).

2013-04-29  Hilko Bengen  <bengen@hilluzination.de>

	Build and test Perl bindings out-of-tree.
	Remaining issue: The C file that is generated from XS is still built
	in the source directory

2013-04-05  Alex Nelson  <a.nelson@prometheuscomputing.com>

	Mac OS X: Link iconv in libhivex
	hivexml on OS X was failing with a symbol-not-found error while
	dynamically linking.  Adding iconv to libhivex fixes the issue and lets
	OS X process 'images/large' with hivexml.

	It took careful iconv autotool additions to get compilation working in
	Fedora as well, but these two lines build and run on OS X 10.6 and
	10.8, and Fedora 17 and 18.

	Unfortunately, a separate issue is revealed here in OS X, as some of
	the hivexml value data appears as Kanji.  However, that is an issue
	distinct from getting the program to run.

2013-04-05  Alex Nelson  <a.nelson@prometheuscomputing.com>

	Remove obsolete AM serial-tests
	Per recommendations at:
	http://www.gnu.org/software/automake/manual/html_node/Serial-Test-Harness.html

	Also per build failure in Fedora 17.  Automake v1.11.6.

2013-02-15  Richard W.M. Jones  <rjones@redhat.com>

	ruby: Use RbConfig instead of Config.
	This works as well on Ruby 1.8.

	automake: Force serial-tests.
	In automake 1.13, parallel tests is the default.

	ruby: Use updated rake package names, but allow fallback to the old names.

2013-01-24  Richard W.M. Jones  <rjones@redhat.com>

	python: Make class derive from 'object'.
	For an overview, see this question and the links from there:
	http://stackoverflow.com/questions/4015417/python-class-inherits-object

2012-12-27  Richard W.M. Jones  <rjones@redhat.com>

	arm: Prevent cast-align warnings.
	The implicit alignment of char* is 1 byte, so on ARM we get a
	cast-align warning whenever we try to cast this to a larger type
	(eg. casting to uint32_t).

	The implicit alignment of void* is whatever malloc returns, and so
	this can be cast to any type.

	The cost of this is that we have to add (char *) casts all over the
	code, but this seems unavoidable.

	Thanks: Leif Lindholm, Peter Robinson.

2012-12-10  Richard W.M. Jones  <rjones@redhat.com>

	Rewrite and simplify hivex_node_set_value.
	Coverity pointed to multiple use-of-uninitialized-value errors in this
	function.  However the function was incredibly hard to follow, so I
	couldn't really tell if this was a real problem or not.  In any case,
	I rewrote the function to be more sane.

	sh: Don't leak 'data' when printing (found by Coverity).

	sh: Don't leak 'data' along error path (found by Coverity).

	ocaml: Stable dependencies.

2012-11-22  Richard W.M. Jones  <rjones@redhat.com>

	regedit: Update unix2dos command in man page (thanks Skippy VonDrake).

2012-10-11  Richard W.M. Jones  <rjones@redhat.com>

	Version 1.3.7.

2012-10-11  Peter Fokker  <peter@berestijn.nl>

	patch for read support of "li"-records from "ri" intermediate
	Richard,

	Thank you for creating the hivex-library. Studying your source code helped
	me a great deal to better understand the internals of the Windows Registry.

	However, while I was browsing a real-world SOFTWARE-hive (XP, SP3) I
	could not browse to the '\Classes' key. Instead I got this (debug)-message:

	    get_children: returning ENOTSUP because ri-record offset does not
	point to lf/lh (0x49020)

	I tracked this issue down and I discovered that the intermediate
	"ri"-record may not only contain offsets to "lf" and "lh" but to
	"li"-records too.

	Attached is a patch against hivex.c v1.3.3 that recognises
	"li"-records referenced from "ri"-records. For me this fixed the issue
	with browsing the '\Classes' key.

	Note that I have not fixed the related problem of rewriting
	"li"-records when inserting a new subkey or deleting an
	existing one. This sure would cause problems when I were to
	add/delete a subkey to/from '\Classes'.

	RWMJ:
	The original patch submitted is here:
	https://www.redhat.com/archives/libguestfs/2012-March/msg00035.html
	Changes made:
	 - Removed commented-out code for writing.
	 - Re-added some checking code to reduce the delta of this patch
	   to the previous code.  The checks can be removed in a separate
	   patch if necessary.

2012-09-03  Richard W.M. Jones  <rjones@redhat.com>

	Fix detection of Ruby C extensions library.
	The configure.ac code is copied from libguestfs.

	Add ./configure --disable-python option.
	The configure.ac code is copied from libguestfs.

	Add ./configure --disable-perl option.
	The configure.ac code is copied from libguestfs.

	Add ./configure --disable-ocaml option.
	The configure.ac code is copied from libguestfs.

2012-09-03  Hilko Bengen  <bengen@hilluzination.de>

	Fixed checks for libpython features
	The python3.1 package shipped with Debian/squeeze does not have the
	'mu' suffix that was assumed before.

	RWMJ: This was originally formulated for libguestfs, but the same
	patch applies to hivex and fixes the following bug reported against
	Gentoo by Joshua Rich:

	https://bugs.gentoo.org/show_bug.cgi?id=433467

2012-08-28  Jim Meyering  <meyering@redhat.com>

	maint: remove unnecessary mkdir -p
	* ocaml/Makefile.am (install-data-hook): Remove unneeded mkdir -p.
	It's job is handled by the very next mkdir -p.

	tests: avoid spurious failure when run in non-srcdir build
	* ocaml/t/hivex_120_rlenvalue.ml: Avoid spurious failure when the
	test is run in a non-srcdir (aka VPATH) build.  I.e., open a
	$srcdir-relative name, rather than assuming $srcdir is ".".

	build: update gnulib submodule to latest

	maint: avoid some syntax-check test failures
	* cfg.mk (_img_regexp): Exempt two VC'd image files from syntax
	check rules that look for trailing blanks and empty lines at EOF.
	* sh/hivexsh.pod: Remove trailing spaces.

2012-06-12  Richard W.M. Jones  <rjones@redhat.com>

	Version 1.3.6.

2012-05-15  Richard W.M. Jones  <rjones@redhat.com>

	python: Fix python tests.
	$(srcdir) isn't expanded by configure.

2012-05-11  Richard W.M. Jones  <rjones@redhat.com>

	Update to latest gnulib.

2012-05-11  Alex Nelson  <ajnelson@cs.ucsc.edu>

	hivexml: Add byte run reporting functions
	This patch adds value_byte_runs and node_byte_runs.  Each byte run
	represents the offset and length of a data structure within the hive,
	one per node, and one or two per value depending on the length of the
	value data.

	These byte run functions also add additional data sanity checks as a
	hive is being parsed, mainly checking that a node address actually
	points to a node, and similarly for values.

2012-03-30  Richard W.M. Jones  <rjones@redhat.com>

	RHEL 5: build: Define builddir, abs_srcdir if they don't exist.

	RHEL 5: build: Fix some C99-isms that confuse old gcc.

	RHEL 5: configure: Fix test for caml_raise_with_args.

2012-03-13  Richard W.M. Jones  <rjones@redhat.com>

	Version 1.3.5.

	Fix ruby tests for ruby 1.9.

	Version 1.3.4.

	Distribute 'images/rlenvalue_test_hive' in tarball.

	Add tx-pull.sh wrapper script from libguestfs.

	Update gnulib to latest.

	Ignore perl/MYMETA.json

	builds: Disable -Wno-missing-field-initializers and enable some other warnings.

2012-01-05  Alex Nelson  <ajnelson@cs.ucsc.edu>

	ruby: Add unit test for new RLenValue type

	python: Add unit test for new RLenValue type

	perl: Add unit test for new RLenValue type

	ocaml: Add unit test for new RLenValue type

2012-01-05  Alex Nelson  <ajnelson@cs.ucsc.edu>

	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.


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

2012-01-05  Alex Nelson  <ajnelson@cs.ucsc.edu>

	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.

	Add test hive and generator script

2011-12-20  Richard W.M. Jones  <rjones@redhat.com>

	hivexml: Remove unused variable.

2011-12-09  Hilko Bengen  <bengen@hilluzination.de>

	hivex: Fix Ruby bindings for 1.9; let the user explicitly choose ruby, rake

2011-12-01  Hilko Bengen  <bengen@hilluzination.de>

	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'

2011-11-30  Hilko Bengen  <bengen@hilluzination.de>

	out of tree build: ruby (second take)

2011-11-29  Richard W.M. Jones  <rjones@redhat.com>

	Version 1.3.3.

	Update to latest gnulib (RHBZ#756981).

2011-11-29  Richard W.M. Jones  <rjones@redhat.com>

	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

2011-11-22  Hilko Bengen  <bengen@hilluzination.de>

	out of tree build: ruby

2011-11-19  Richard W.M. Jones  <rjones@redhat.com>

	python: Support Python 3 (RHBZ#752916).

2011-10-24  Richard W.M. Jones  <rjones@redhat.com>

	Fix conditional test for HAVE_HIVEXSH.
	This fixes commit 0a28041f4156878a74543966f9a72ed3d214ba44.

	Version 1.3.2.

2011-10-22  Richard W.M. Jones  <rjones@redhat.com>

	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

2011-09-22  Alex Nelson  <ajnelson@cs.ucsc.edu>

	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.

2011-09-07  Alex Nelson  <ajnelson@cs.ucsc.edu>

	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.

2011-09-07  Gillen Daniel  <gillen.daniel@gmail.com>

	Replacement mmap function for Win32.
	(Updates by RWMJ)

2011-09-07  Richard W.M. Jones  <rjones@redhat.com>

	Add an internal hivex header file.

	hivexml: Add correct casts to xmlTextWriter* function call params.
	This fixes commit 7ab64739391d60a52755250e76b0f4a03878a7e8.

2011-09-06  Richard W.M. Jones  <rjones@redhat.com>

	Don't include "Returns ..." in function description.
	The description of what it returns is already produced by the
	generator.

	This fixes commit e85b1eaa268caea316f6aa8e02738b3d94297250.

2011-09-06  Alex Nelson  <ajnelson@cs.ucsc.edu>

	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.

2011-09-06  Alex Nelson  <ajnelson@cs.ucsc.edu>

	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.


	A fix added by RWMJ.

2011-09-06  Alex Nelson  <ajnelson@cs.ucsc.edu>

	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.


	RWMJ fixed hivex_value_key handling of errno.

2011-09-06  Alex Nelson  <ajnelson@cs.ucsc.edu>

	generator: Add new return type to ABI: RSize
	This patch adds RSize, similar to RNode and RValue.


	OCaml bindings fixed by RWMJ.

2011-09-06  Richard W.M. Jones  <rjones@redhat.com>

	Include libintl.h to silence warning about bindtextdomain, textdomain.

2011-09-06  Gillen Daniel  <gillen.daniel@gmail.com>

	lib/byte_conversions.h: Use bswap* functions instead of __bswap* functions.

2011-09-06  Alex Nelson  <ajnelson@cs.ucsc.edu>

	Mac OS X: Run glibtoolize in absence of libtoolize

	Mac OS X: setlocale function requires locale.h
	In the style of libguestfs commit:
	9e397cc16be51f4f3940c7a5b90d0bc43f3f13a8

	Mac OS X: Detect bindtextdomain
	In the style of libguestfs commit:
	7581672c7893fd392ca10b47f044af327011f502

2011-08-31  Alex Nelson  <ajnelson@cs.ucsc.edu>

	ocaml: Fix binding for Hivex.value_type

2011-08-26  Richard W.M. Jones  <rjones@redhat.com>

	Version 1.3.1.

2011-08-24  Hilko Bengen  <bengen@hilluzination.de>

	hivex: Newer Python versions want parentheses around arguments of "print"

	hivex: Fix building on platforms without O_CLOEXEC such as FreeBSD

	hivex: Don't build static library, .so.* symlinks for Python bindings

2011-08-16  Alex Nelson  <ajnelson@cs.ucsc.edu>

	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".

2011-08-15  Richard W.M. Jones  <rjones@redhat.com>

	ruby: Test against locally built library.

	Prevent warning about unused variable in test.

	Fix incorrect printf format specifier in error string.

	hivex(3): Fix link to CSS.

	Version 1.3.0.

	Add Ruby bindings.

	header: Fix including just <hivex.h>.
	Also this adds a regression test so we don't break it in future.

2011-08-13  Alex Nelson  <ajnelson@cs.ucsc.edu>

	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.


	A lot of code cleanup by RWMJ.

2011-08-12  Richard W.M. Jones  <rjones@redhat.com>

	Version 1.2.8.
	Pushed and pulled translations from Transifex.

2011-08-12  Hilko Bengen  <bengen@hilluzination.de>

	More changes needed separate builddir
	This patch hopefully fixes building and installing the OCaml bindings
	both in-tree and out-of-tree.

	-Hilko

2011-08-12  Hilko Bengen  <bengen@hilluzination.de>

	More changes needed separate builddir
	Here's the fix for perl. Both in-tree and out-of-tree build and install
	worked.

	-Hilko

2011-08-11  Hilko Bengen  <bengen@hilluzination.de>

	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.

2011-08-11  Alex Nelson  <ajnelson@cs.ucsc.edu>

	Correct 32-bit to 64-bit call

2011-07-22  Richard W.M. Jones  <rjones@redhat.com>

	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.

2011-07-11  Michael Huang  <Michael.Huang@visionsolutions.com>

	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.

2011-06-29  Richard W.M. Jones  <rjones@redhat.com>

	Sort m4/.gitignore file.

2011-06-29  Jim Meyering  <jim@meyering.net>

	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.

2011-06-28  Jim Meyering  <meyering@redhat.com>

	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.

	build: update gnulib submodule to latest

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

	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"

	maint: use "test x = x", not "test x == x"
	* autogen.sh: Using "test x = x" is more portable.

	maint: remove trailing blanks

	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.

	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.

	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.

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

	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>.

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

2011-05-17  Richard W.M. Jones  <rjones@redhat.com>

	ocaml: Really fix 'make install' rule.
	This fixes commit b8ad15031cacf910634b4f4f4632232949c4acd2
	and commit f408b757b1d75429fae5fa7630a4fc5451844de7.

	ocaml: Set package name when installing native bindings.
	This fixes commit b8ad15031cacf910634b4f4f4632232949c4acd2.

	Version 1.2.7.

	Update gnulib to latest version.

	hivexregedit: Add --unsafe-printable-strings option.

2011-05-13  Richard W.M. Jones  <rjones@redhat.com>

	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.

2011-05-13  Hilko Bengen  <bengen@hilluzination.de>

	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
	`----

	hivex: Remove python bytecode on "make clean"

2011-05-12  Richard W.M. Jones  <rjones@redhat.com>

	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.

2011-05-12  Richard W.M. Jones  <rjones@redhat.com>

	Version 1.2.6.

2011-05-12  Richard W.M. Jones  <rjones@redhat.com>

	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.

2011-05-12  Richard W.M. Jones  <rjones@redhat.com>

	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.

	configure: AC_PROG_LIBTOOL -> AM_PROG_LIBTOOL.
	Unclear if this makes any difference.

	Update gnulib.

2011-05-12  Hilko Bengen  <bengen@hilluzination.de>

	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.

2011-05-12  Hilko Bengen  <bengen@hilluzination.de>

	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)

2011-05-12  Hilko Bengen  <bengen@hilluzination.de>

	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)

2011-05-12  Richard W.M. Jones  <rjones@redhat.com>

	configure: Use Python platform-dependent site-packages.
	This updates commit b808c875a34e62fcdf360534f923d6030590ff44.

2011-05-09  Hilko Bengen  <bengen@hilluzination.de>

	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.

	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).

2011-04-28  Richard W.M. Jones  <rjones@redhat.com>

	Include generator in the tarball.

2011-04-28  Hilko Bengen  <bengen@hilluzination.de>

	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

2011-04-13  Jim Meyering  <meyering@redhat.com>

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

2011-04-13  Richard W.M. Jones  <rjones@redhat.com>

	Version 1.2.5.
	Updated PO files.

	Remove no longer used internal function utf16_string_len_in_bytes.

2011-04-13  Richard W.M. Jones  <rjones@redhat.com>

	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.

2011-04-13  Richard W.M. Jones  <rjones@redhat.com>

	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.

2011-04-13  Richard W.M. Jones  <rjones@redhat.com>

	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.

2011-04-13  Richard W.M. Jones  <rjones@redhat.com>

	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.

2011-04-12  Richard W.M. Jones  <rjones@redhat.com>

	Fix use-after-free in hivex_close.
	Found using valgrind.

2011-04-02  Richard W.M. Jones  <rjones@redhat.com>

	Pull translations from Transifex.

2011-04-01  Richard W.M. Jones  <rjones@redhat.com>

	debian: Fix python test script for bash.

2011-03-07  Richard W.M. Jones  <rjones@redhat.com>

	Import hivex into transifex.
	http://www.transifex.net/projects/p/hivex/

2010-12-23  Richard W.M. Jones  <rjones@redhat.com>

	Refresh documentation.

2010-12-16  Richard W.M. Jones  <rjones@redhat.com>

	ocaml: Fix segfault in Hivex.value_value binding.

2010-12-02  Richard W.M. Jones  <rjones@redhat.com>

	Version 1.2.4.

2010-11-28  Richard W.M. Jones  <rjones@redhat.com>

	Python bindings.

2010-08-27  Richard Jones  <rjones@redhat.com>

	Version 1.2.3.

2010-08-27  Richard Jones  <rjones@redhat.com>

	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.

2010-08-27  Geert Warrink  <geert.warrink@onsnet.nu>

	Add Dutch translations (RHBZ#624455).

2010-08-13  Matthew Booth  <mbooth@redhat.com>

	Add debug output to hivex_close.

2010-07-12  Richard Jones  <rjones@redhat.com>

	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.

2010-07-12  Hilko Bengen  <bengen@hilluzination.de>

	Call iconv_close along error path out of function.

2010-07-11  Richard Jones  <rjones@redhat.com>

	perl: Fix generated XS code for value_dword binding.
	Thanks to Hilko Bengen for spotting the problem.

2010-07-08  Conrad Meyer  <cemeyer@cs.washington.edu>

	Add hivex_set_value API call, and ocaml and perl bindings, and tests.

2010-06-13  Richard Jones  <rjones@redhat.com>

	hivex_value_type: Returns -1 on error.  Fix documentation.

2010-05-13  Richard Jones  <rjones@redhat.com>

	Include a test for regimport of values containing backslash chars.

2010-04-30  Richard Jones  <rjones@redhat.com>

	regedit: Fix documentation for CurrentControlSet (thanks Yuval Kashtan).

2010-04-28  Richard Jones  <rjones@redhat.com>

	Version 1.2.2.

	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.

2010-04-20  Richard Jones  <rjones@redhat.com>

	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.

2010-04-03  Richard Jones  <rjones@redhat.com>

	Add a linker script to limit visibility to exported symbols.

2010-04-03  TJ  <linux@tjworld.net>

	Remove explicit dependency on ncurses.

	Spelling: reencode -> re-encode.

2010-04-02  TJ  <linux@tjworld.net>

	Add CLEANFILES rules.

2010-04-01  Yulia  <ypoyarko@redhat.com>

	New Russian translation (RHBZ#578347).

2010-03-30  Richard Jones  <rjones@redhat.com>

	Update PO files.

	Add maintainer rule for updating the website.

	hivexml: Fix path so HTML documentation is generated correctly.

	Prepare for version 1.2.1.

	hivexregedit: Low-level tool for merging and export in regedit format.

	Win::Hivex::Regedit module for importing and exporting regedit format files.

	hivexsh: '-f' option takes an argument (found by Marko Myllynen).

2010-03-29  Richard Jones  <rjones@redhat.com>

	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).

2010-03-29  Richard Jones  <rjones@redhat.com>

	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.

2010-03-26  Richard Jones  <rjones@redhat.com>

	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

	hivex: Add debugging message when returning ERANGE error.

	hivexsh: Fix building of HTML-format manpages.

2010-03-25  Richard Jones  <rjones@redhat.com>

	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).

	Fix generation of po/POTFILES.in.
	Contains some obsolete code copied in from libguestfs, and we
	need to exclude Perl 'blib' files.

	perl: Small fix to 006-pod-coverage test.
	Some code copied over from libguestfs, fixed.

	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.

2010-03-08  Richard Jones  <rjones@redhat.com>

	Fix documentation for Win::Hivex->open

2010-03-01  Richard Jones  <rjones@redhat.com>

	RHEL 5: Fixes for old version of OCaml in EPEL 5.

2010-03-01  Richard Jones  <rjones@redhat.com>

	Prepare for version 1.2.0.
	Fix hivexsh_SOURCES.

	Update PO files.

2010-03-01  Daniel Cabrera  <logan@fedoraproject.org>

	Update Spanish translations (RHBZ#569178).

2010-03-01  Richard Jones  <rjones@redhat.com>

	Update PO files.

2010-03-01  Piotr Drąg  <piotrdrag@gmail.com>

	Update Polish translations (RHBZ#502533).

2010-02-26  Richard W.M. Jones  <rjones@redhat.com>

	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.

	generator: Perl bindings.
	This also adds a small test suite for the Perl bindings.

	generator: Clarify LGPLv2 boilerplate.

	More documentation in README file.

	hivexsh: Fix compilation on 32 bit machines.

2010-02-25  Richard Jones  <rjones@redhat.com>

	Remove bogus msgstr from kn.po.

2010-02-24  Richard Jones  <rjones@redhat.com>

	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.

2010-02-24  Richard Jones  <rjones@redhat.com>

	Add build framework for OCaml, Perl, Python bindings.
	(No bindings are actually built, this just adds the build, test
	and generator framework for them).

2010-02-24  Richard Jones  <rjones@redhat.com>

	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).

2010-02-24  Richard Jones  <rjones@redhat.com>

	Create separate toplevel directories for hivexsh and hivexml.

	Rename hivex/ -> lib/

2010-02-24  Richard Jones  <rjones@redhat.com>

	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/.

2010-02-24  Shankar Prasad  <svenkate@redhat.com>

	Added Kannada translation (RHBZ#567860).

2010-02-23  Richard Jones  <rjones@redhat.com>

	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.

2010-02-23  Richard Jones  <rjones@redhat.com>

	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.

2010-02-22  Richard Jones  <rjones@redhat.com>

	generator: More minor formatting adjustments to POD documentation.

	generator: Minor adjustments to the C POD documentation.

	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.

	Remove bogus reference to src/ directory which no longer exists.

	Update copyright notice and change libguestfs to hivex.

	Version 1.1.2

	Install hivex.h in $includedir.

	Version 1.1.1.
	Also some minor fixes to the build system.

2010-02-19  Richard Jones  <rjones@redhat.com>

	Move README, LICENSE files to the toplevel directory.

	gnulib: Remove some unused modules.

	Version 1.1.0

	po: Import pofiles and various build fixes.

	Sort and complete m4/.gitignore file.

	Add gettext.h, omitted from earlier import.

	gnulib: Include xstrtol, xstrtoll modules.
	These were omitted from the earlier code import from libguestfs.

	Add html/ directory, include POD CSS.

	hivexsh: Print hex bytes >= 0x80 correctly.
	These were being interpreted as signed chars, and thus printed
	as "ffffff80" etc.

	Remove some unused variables.
	Since we have to compile with -Wno-unused-variables, we don't
	spot unused variables in code.  I found these by compiling the
	code in Ubuntu.

	Add scripts to EXTRA_DIST.

	hivex: example6: Don't double backslashes.

	hivex: example6: Hypothetical addition of keys for viostor.

	hivex: Fix handling of inline VKs.

	hivexsh: Set correct type for 'expandstring' values.

	hivex: Documentation and cleanups.

	hivex: Make limits into macros.

	hivexsh: Remove unused variable.
	This removes an unused variable left over by
	commit ab608f3948d903af64e814b2e67949a1a71d93a4.

	hivex: Complete the implementation of adding child nodes.

	hivex: More debugging around nk 'unknown2' field.

	hivex: Check hash fields in lf/lh records.

	hivexsh: del command: Fix error message.

	hivexsh: lsval: Remove stray quotation mark.

	hivexsh: cd command: fix error handling
	The error behaviour of hivex_node_get_child is subtle, so the 'cd'
	command wouldn't always report errors correctly.  This fixes it.

	hivex: allocate_block should update valid block bitmap.
	The internal allocate_block() function wasn't updating the bitmap,
	so if you revisited a block which you had allocated in the same
	session, you could get an EFAULT error.

	hivex: More debug messages.

	hivex: Documentation update.
	ntreg_lf_record can have id "lf" (old-style hashes) or "lh" (new-
	style hashes).

	hivex: Some missing le32toh endianness conversions.

	hivexsh: Document some peculiarities of the "cd" command.

	hivex: Implement deleting child nodes.

2010-02-19  Richard Jones  <rjones@redhat.com>

	hivex: Add flags argument to internal get_children() function.
	When we later call get_children to visit the intermediate
	ri/lf/lh records, we have already deleted the subkey nk-records,
	so checking that those nk-records are still valid is not very
	helpful.

	This commit adds a flag to turn these checks off.

2010-02-19  Richard Jones  <rjones@redhat.com>

	hivex: Don't die on valid registries which have bad declared data lengths.
	Some apparently valid registries contain value data length
	declarations which exceed the allocated block size for the
	value.

	Previously the code would return EFAULT for such registries.
	However since these appear to be otherwise valid registries,
	turn this into a warning and just use the allocated block size
	as the data length (in other words, truncate the value).

2010-02-19  Richard Jones  <rjones@redhat.com>

	hivex: Minimal registry example.
	This is the smallest registry you can make and still have it
	load correctly in Windows regedit.

2010-02-19  Richard Jones  <rjones@redhat.com>

	hivexsh: Add 'setval' and 'commit' commands.
	This adds the 'setval' and 'commit' commands to the hivex shell.

	Also adds some example scripts showing use of these.

2010-02-19  Richard Jones  <rjones@redhat.com>

	hivex: Begin implementation of writing to hives.
	This implements hivex_node_set_values which is used to
	delete the (key, value) pairs at a node and optionally
	replace them with a new set.

	This also implements hivex_commit which is used to commit
	changes to hives back to disk.

2010-02-19  Richard Jones  <rjones@redhat.com>

	hivex: Add HIVEX_OPEN_WRITE flag to allow hive to be opened for writing.
	If this flag is omitted (as in the case for all existing callers)
	then the hive is still opened read-only.

	We add a 'writable' flag to the hive handle, and we change the way
	that the hive file (data) is stored.  The data is still mmapped if
	the file is opened read-only, since that is more efficient and allows
	us to handle larger hives.  However if we need to write to the file
	then we have to read it all into memory, since if we had to extend the
	file we need to realloc that data.

	Note the manpage section L</WRITING TO HIVE FILES> comes in a later
	commit.

2010-02-19  Richard Jones  <rjones@redhat.com>

	Tools for analyzing and reverse engineering hive files.
	This commit is not of general interest.  It contains the tools which
	I used to reverse engineer the hive format and to test changes.
	Keeping these with the rest of the code is useful in case in future
	we encounter a hive file that we fail to modify.

	Note that the tools are not compiled by default.  You have to compile
	each explicitly with:

	  make -C hivex/tools <toolname>.opt

	You will also need ocaml-extlib-devel and ocaml-bitstring-devel.

2010-02-19  Richard Jones  <rjones@redhat.com>

	hivexsh: Change some exit(1) -> exit(EXIT_FAILURE)

	hivexsh: Only print final \n when interactive.
	When hivexsh was called non-interactively, it would print an
	annoying extra line.  Only print this line if we are being
	used interactively.

2010-02-19  Richard Jones  <rjones@redhat.com>

	hivexsh: Change handling of prompt argument to rl_gets()
	Make the result of isatty into a global variable (is_tty).

	Change the rl_gets() function so it takes the prompt string
	instead of a "display prompt?" flag.  rl_gets() then consults
	the global to find out if it should display the prompt at all.

2010-02-19  Richard Jones  <rjones@redhat.com>

	Document that this flag is clear for default keys.

	Misc documentation and gitignore update.

	Move htole*/le*toh macros into a separate header file.
	This allows us to reuse these macros in hivexsh later.

	hivex: Reimplement hivexget as a simple shell script.
	hivexget is currently a large C program.  Now that we have hivexsh
	(the shell) we can reimplement hivexget as a simple bash script that
	calls out to hivexsh.

	hivex: Add 'hivexsh' program (shell for navigating registry hives).

2010-02-19  Richard Jones  <rjones@redhat.com>

	Set locale in C programs so l10n works (RHBZ#559962).
	This commit adds the calls to setlocale &c to all of the current
	C programs.

	It also adds l10n support to hivexget and hivexml which lacked them
	previously.

	To test this, try:

	LANG=pa_IN.UTF-8 guestfish --cmd-help

	(You can only do this test after installing the package, or at
	least the 'pa.mo' mo-file in the correct place).

2010-02-19  Richard Jones  <rjones@redhat.com>

	hivex: Const-correctness fix on header_checksum (thanks Jim Meyering).

	hivex: Update some previously unknown nk-record fields.
	Update these fields with what we found out from reverse engineering
	the file.  Also bring the unknownX field names into line with
	visualizer.ml.

	hivex: Fix calculation of block size for vk data blocks.

	hivex: Display incorrect block size as unsigned in an error message.

	hivex: display bad block offset in hex

	hivex: hive type in vk-record is an unsigned 32 bit int

	hivex: Add missing le32toh conversion around field access.
	This was missing.  It only worked because we test on a little
	endian platform.

	hivex: Clarify some more fields.
	Taken from sentinelchicken.com documentation.

2010-02-19  Richard Jones  <rjones@redhat.com>

	hivex: Modify children/values functions to return intermediate blocks.
	Modify the functions that return child subnodes and values so they
	can also be used to return a list of the intermediate blocks.  This
	is so we can delete those intermediate blocks (in a later commit).

	We also introduce an offset_list structure which is used for collecting
	lists of offsets, ie. lists of nodes, values or blocks.

	Note that this commit should not change the semantics of the code.

2010-02-19  Richard Jones  <rjones@redhat.com>

	hivex: Add value_any callback to the visitor.
	The visitor currently contains lots of value_* callbacks, such as
	value_string which is called back when the value has type string.

	This is fine but it makes it complicated to deal with the case where
	you just want to see 'a value', and don't care about its type.

	The value_any callback allows visitors to see values generically.

2010-02-19  Richard Jones  <rjones@redhat.com>

	hivex: Move header checksum code into a function.
	This function can be reused later.

	hivex: page 'offset_next' field is really 'page_size'.
	The documentation, as usual, is contradictory.  However this
	field is definitely the page size in all observed registries.
	Furthermore the following field marked 'unknown' is always
	zero, although this contradicts what the sentinelchicken.com
	paper says.

	hivex: Collect more statistics about registries.

	hivex: Store filename in hive handle.

	hivex: Various improvements in header parsing, thanks to better documentation.

	hivex: Print header fields.  Print all offsets in hex (in debug output).

	hivex: Reenable checksum calculations, but don't check result.

	hivex: Update documentation.

	hivex: Send all debug messages to stderr.

	hivex: Remove stray debugging message.

	hivex: Documentation: Add environment variables section.

	hivex: Whitespace change.

	hivex: Move STR* macros into C file.
	Don't pollute the public header file with these macros.

	hivex: Small updates to the documentation.

2010-02-19  Jim Meyering  <meyering@redhat.com>

	maint: use EXIT_* symbol (not constant, 2) to indicate key/path not found
	* hivex/hivexget.c (EXIT_NOT_FOUND): Define.
	(main): Use exit (EXIT_NOT_FOUND), not "exit (2)".

2010-02-19  Jim Meyering  <meyering@redhat.com>

	maint: use EXIT_SUCCESS and EXIT_FAILURE, not 0 and 1 to exit
	Convert all uses automatically, via these two commands:
	git grep -l '\<exit *(1)' \
	  | grep -vEf .x-sc_prohibit_magic_number_exit \
	  | xargs --no-run-if-empty \
	    perl -pi -e 's/\b(exit ?)\(1\)/$1(EXIT_FAILURE)/'
	git grep -l '\<exit *(0)' \
	  | grep -vEf .x-sc_prohibit_magic_number_exit \
	  | xargs --no-run-if-empty \
	  perl -pi -e 's/\b(exit ?)\(0\)/$1(EXIT_SUCCESS)/'
	* .x-sc_prohibit_magic_number_exit: New file.

	Edit (RWMJ): Don't change Java code.

2010-02-19  Jim Meyering  <meyering@redhat.com>

	use STREQ, not strcmp: part 1
	git grep -l 'strcmp *([^=]*== *0'|xargs \
	  perl -pi -e 's/\bstrcmp( *\(.*?\)) *== *0/STREQ$1/g'

	change strncmp() == 0 to STREQLEN()
	git grep -l 'strncmp *([^=]*== *0'|xargs \
	  perl -pi -e 's/\bstrncmp( *\(.*?\)) *== *0\b/STREQLEN$1/g'

	convert uses of strcasecmp to STRCASEEQ
	git grep -l 'strcasecmp *([^=]*== *0'| xargs \
	  perl -pi -e 's/\bstrcasecmp( *\(.*?\)) *== *0/STRCASEEQ$1/'

	define STREQ, STRNEQ, STREQLEN, STRCASEQ, etc.
	* src/guestfs.h: Define STREQ and company.
	* daemon/daemon.h: Likewise.
	* hivex/hivex.h: Likewise.

	indent with spaces, not TABs
	* HACKING: Expand indentation TABs.
	* configure.ac: Likewise.
	* daemon/daemon.h: Likewise.
	* daemon/guestfsd.c: Likewise.
	* fuse/guestmount.c: Likewise.
	* hivex/LICENSE: Likewise.
	* src/generator.ml: Likewise.
	* tools/virt-win-reg: Likewise.

	placate 'make syntax-check'
	* hivex/hivex.c: Remove unused "#include <assert.h>".

2010-02-19  Jim Meyering  <jim@meyering.net>

	hivex: fail upon integer overflow
	* hivex/hivex.c (windows_utf16_to_utf8): Avoid overflow and a
	potential infloop.

2010-02-19  Richard Jones  <rjones@redhat.com>

	hivex: Check unchecked calloc (Jim Meyering).

	Add HTML documentation to website.

	Fix misspelling in previous commit.

	RHEL 5: Also add le{16,64}toh functions

	RHEL 5: Detect endianness functions and supply them.

	Prepare for version 1.0.75.

2010-02-19  Richard Jones  <rjones@redhat.com>

	Support for Windows Registry.
	In hivex/:  This mini-library allows us to extract Windows
	Registry binary files ("hives").

	There are also two tools: hivexml converts a hive to a
	self-describing XML format.  hivexget can be used to extract
	single subkeys from a hive.
