summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* hivex: Begin implementation of writing to hives.Richard Jones2010-02-193-0/+521
| | | | | | | | | 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.
* hivex: Add HIVEX_OPEN_WRITE flag to allow hive to be opened for writing.Richard Jones2010-02-196-22/+54
| | | | | | | | | | | | | | | 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.
* Tools for analyzing and reverse engineering hive files.Richard Jones2010-02-1912-2/+1631
| | | | | | | | | | | | | | 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.
* hivexsh: Change some exit(1) -> exit(EXIT_FAILURE)Richard Jones2010-02-191-2/+2
|
* hivexsh: Only print final \n when interactive.Richard Jones2010-02-191-1/+2
| | | | | | When hivexsh was called non-interactively, it would print an annoying extra line. Only print this line if we are being used interactively.
* hivexsh: Change handling of prompt argument to rl_gets()Richard Jones2010-02-191-9/+10
| | | | | | | | 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.
* Document that this flag is clear for default keys.Richard Jones2010-02-191-1/+2
|
* Misc documentation and gitignore update.Richard Jones2010-02-191-1/+3
|
* Move htole*/le*toh macros into a separate header file.Richard Jones2010-02-193-42/+93
| | | | This allows us to reuse these macros in hivexsh later.
* hivex: Reimplement hivexget as a simple shell script.Richard Jones2010-02-194-295/+45
| | | | | | 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).Richard Jones2010-02-198-6/+995
|
* Set locale in C programs so l10n works (RHBZ#559962).Richard Jones2010-02-193-9/+40
| | | | | | | | | | | | | | | 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).
* hivex: Const-correctness fix on header_checksum (thanks Jim Meyering).Richard Jones2010-02-191-1/+1
|
* hivex: Update some previously unknown nk-record fields.Richard Jones2010-02-191-5/+11
| | | | | | 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.Richard Jones2010-02-191-1/+1
|
* hivex: Display incorrect block size as unsigned in an error message.Richard Jones2010-02-191-1/+1
|
* hivex: display bad block offset in hexRichard Jones2010-02-191-1/+1
|
* hivex: hive type in vk-record is an unsigned 32 bit intRichard Jones2010-02-191-1/+1
|
* hivex: Add missing le32toh conversion around field access.Richard Jones2010-02-191-3/+3
| | | | | This was missing. It only worked because we test on a little endian platform.
* hivex: Clarify some more fields.Richard Jones2010-02-191-2/+3
| | | | Taken from sentinelchicken.com documentation.
* hivex: Modify children/values functions to return intermediate blocks.Richard Jones2010-02-191-70/+168
| | | | | | | | | | | 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.
* hivex: Add value_any callback to the visitor.Richard Jones2010-02-193-83/+101
| | | | | | | | | | 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.
* hivex: Move header checksum code into a function.Richard Jones2010-02-191-8/+16
| | | | This function can be reused later.
* hivex: page 'offset_next' field is really 'page_size'.Richard Jones2010-02-191-8/+8
| | | | | | | | 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.Richard Jones2010-02-191-20/+31
|
* hivex: Store filename in hive handle.Richard Jones2010-02-191-0/+7
|
* hivex: Various improvements in header parsing, thanks to better documentation.Richard Jones2010-02-191-22/+74
|
* hivex: Print header fields. Print all offsets in hex (in debug output).Richard Jones2010-02-191-16/+26
|
* hivex: Reenable checksum calculations, but don't check result.Richard Jones2010-02-191-3/+4
|
* hivex: Update documentation.Richard Jones2010-02-191-0/+4
|
* hivex: Send all debug messages to stderr.Richard Jones2010-02-191-55/+55
|
* hivex: Remove stray debugging message.Richard Jones2010-02-191-1/+0
|
* hivex: Documentation: Add environment variables section.Richard Jones2010-02-191-0/+11
|
* hivex: Whitespace change.Richard Jones2010-02-191-1/+1
|
* hivex: Move STR* macros into C file.Richard Jones2010-02-192-10/+10
| | | | Don't pollute the public header file with these macros.
* hivex: Small updates to the documentation.Richard Jones2010-02-192-8/+92
|
* maint: use EXIT_* symbol (not constant, 2) to indicate key/path not foundJim Meyering2010-02-191-2/+4
| | | | | * hivex/hivexget.c (EXIT_NOT_FOUND): Define. (main): Use exit (EXIT_NOT_FOUND), not "exit (2)".
* maint: use EXIT_SUCCESS and EXIT_FAILURE, not 0 and 1 to exitJim Meyering2010-02-193-13/+15
| | | | | | | | | | | | | | | 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.
* use STREQ, not strcmp: part 1Jim Meyering2010-02-191-1/+1
| | | | | git grep -l 'strcmp *([^=]*== *0'|xargs \ perl -pi -e 's/\bstrcmp( *\(.*?\)) *== *0/STREQ$1/g'
* change strncmp() == 0 to STREQLEN()Jim Meyering2010-02-191-1/+1
| | | | | git grep -l 'strncmp *([^=]*== *0'|xargs \ perl -pi -e 's/\bstrncmp( *\(.*?\)) *== *0\b/STREQLEN$1/g'
* convert uses of strcasecmp to STRCASEEQJim Meyering2010-02-191-2/+2
| | | | | git grep -l 'strcasecmp *([^=]*== *0'| xargs \ perl -pi -e 's/\bstrcasecmp( *\(.*?\)) *== *0/STRCASEEQ$1/'
* define STREQ, STRNEQ, STREQLEN, STRCASEQ, etc.Jim Meyering2010-02-191-0/+10
| | | | | | * src/guestfs.h: Define STREQ and company. * daemon/daemon.h: Likewise. * hivex/hivex.h: Likewise.
* indent with spaces, not TABsJim Meyering2010-02-191-6/+6
| | | | | | | | | | | * 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'Jim Meyering2010-02-191-1/+0
| | | | * hivex/hivex.c: Remove unused "#include <assert.h>".
* hivex: fail upon integer overflowJim Meyering2010-02-191-0/+3
| | | | | * hivex/hivex.c (windows_utf16_to_utf8): Avoid overflow and a potential infloop.
* hivex: Check unchecked calloc (Jim Meyering).Richard Jones2010-02-191-0/+2
|
* Add HTML documentation to website.Richard Jones2010-02-191-0/+29
|
* Fix misspelling in previous commit.Richard Jones2010-02-191-2/+2
|
* RHEL 5: Also add le{16,64}toh functionsRichard Jones2010-02-191-0/+12
|
* RHEL 5: Detect endianness functions and supply them.Richard Jones2010-02-194-2/+35
|