search for: hivex_node_set_values

Displaying 20 results from an estimated 40 matches for "hivex_node_set_values".

Did you mean: hivex_node_set_value
2011 Jun 28
2
minor Hivex.xs leaks
...y on it. It spotted one problem but missed a similar one nearby. The following are from Hivex.xs: (generated by generator.ml) void node_set_values (h, node, values) hive_h *h; int node; pl_set_values values = unpack_pl_set_values (ST(2)); PREINIT: int r; PPCODE: r = hivex_node_set_values (h, node, values.nr_values, values.values, 0); free (values.values); if (r == -1) croak ("%s: %s", "node_set_values", strerror (errno)); void node_set_value (h, node, val) hive_h *h; int node; hive_set_value *val = unpack_set_value (ST(2));...
2010 Jul 03
1
[PATCH] hivex: add hivex_set_value api call
...he generator/generator.ml changes are as correct as they could be. I'm not very familiar with Caml. The hivex_node_set_value call builds up a list of hive_set_values by walking the existing values at the node, adding or replacing the passed hive_set_value as necessary, then shoving the list at hivex_node_set_values. Not included: Perl or OCaml binding glue. I'm not on the list, please CC me to replies. Thanks! --- generator/generator.ml | 29 +++++++++++++-- lib/hivex.c | 90 ++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 115 insertions(+), 4 deletions(-) diff --git...
2014 Sep 23
1
Another possible bug in the preview version of virt-v2v for RHEL/CentOS 7.1
I have been able to get a litle further with converting a windows VM. After getting the updated virt-v2v code and rhsrvany, I now get this error: libguestfs: trace: hivex_node_set_value = 0 libguestfs: trace: upload "/usr/share/virtio-win/drivers/amd64/Win2012R2/netkvm.cat" "/Windows/Drivers/VirtIO" guestfsd: main_loop: proc 365 (hivex_node_set_value) took 0.01 seconds
2013 Nov 25
3
Re: [PATCH 3/3] lib: Add support for creating nodes (keys) and values with UTF-16LE-encoded names
...code makes the same mistake ... Could we get the true length from the hivex_encode_string function? > + if (le16toh (parent_nk->max_subkey_name_len) < utf16_len) > + parent_nk->max_subkey_name_len = htole16 (utf16_len); > return nkoffset; > } > @@ -942,7 +954,12 @@ hivex_node_set_values (hive_h *h, hive_node_h node, > for (i = 0; i < nr_values; ++i) { > /* Allocate vk record to store this (key, value) pair. */ > static const char vk_id[2] = { 'v', 'k' }; > - seg_len = sizeof (struct ntreg_vk_record) + strlen (values[i].key); > +...
2013 Nov 25
1
[PATCH 3/3, take 2] lib: Add support for creating nodes (keys) and values with UTF-16LE-encoded names
...ax_subkey_name_len = htole16 (strlen (name) * 2); + size_t utf16_len = use_utf16 ? recoded_name_len : recoded_name_len * 2; + if (le16toh (parent_nk->max_subkey_name_len) < utf16_len) + parent_nk->max_subkey_name_len = htole16 (utf16_len); return nkoffset; } @@ -942,7 +954,12 @@ hivex_node_set_values (hive_h *h, hive_node_h node, for (i = 0; i < nr_values; ++i) { /* Allocate vk record to store this (key, value) pair. */ static const char vk_id[2] = { 'v', 'k' }; - seg_len = sizeof (struct ntreg_vk_record) + strlen (values[i].key); + size_t name_len = strlen...
2010 Jul 07
1
[PATCH] hivex: add hivex_set_value api call and ocaml/perl bindings, tests
...enerator.ml @@ -71,6 +71,7 @@ and argt = (* Note, cannot be NULL/0 unless it | AOpenFlags (* HIVEX_OPEN_* flags list. *) | AUnusedFlags (* Flags arg that is always 0 *) | ASetValues (* See hivex_node_set_values. *) + | ASetValue (* See hivex_node_set_value. *) (* Hive types, from: * https://secure.wikimedia.org/wikipedia/en/wiki/Windows_Registry#Keys_and_values @@ -304,8 +305,15 @@ subnodes become invalid. You cannot delete the root node."; "set (key, value)...
2013 Nov 24
4
[PATCH 1/3] lib: Further generalize iconv wrapper function.
--- lib/hivex-internal.h | 8 +++++--- lib/utf16.c | 11 +++++++---- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/lib/hivex-internal.h b/lib/hivex-internal.h index 4135f58..64fd49a 100644 --- a/lib/hivex-internal.h +++ b/lib/hivex-internal.h @@ -268,11 +268,13 @@ extern size_t * _hivex_return_offset_list (offset_list *list); extern void _hivex_print_offset_list
2010 Jul 03
1
[PATCH] hivex: add hivex_set_value api call and perl bindings, tests
...enerator.ml @@ -71,6 +71,7 @@ and argt = (* Note, cannot be NULL/0 unless it | AOpenFlags (* HIVEX_OPEN_* flags list. *) | AUnusedFlags (* Flags arg that is always 0 *) | ASetValues (* See hivex_node_set_values. *) + | ASetValue (* See hivex_node_set_value. *) (* Hive types, from: * https://secure.wikimedia.org/wikipedia/en/wiki/Windows_Registry#Keys_and_values @@ -304,8 +305,15 @@ subnodes become invalid. You cannot delete the root node."; "set (key, value)...
2016 Jun 06
1
[PATCH] v2v:windows: prevent Parallels drivers from loading at boot
Parallels proprietary hypervisor uses RDPMC as the hypercall instruction. As this instruction is supported since early P6 family, the drivers didn't even bother to check for the presence of the corresponding feature in CPUID. In QEMU/KVM, however, this instruction triggers #GP unless the VM is run with PMU (performance monitoring unit) enabled, which is often not the case (due to its impact
2013 Nov 24
0
[PATCH 3/3] lib: Add support for creating nodes (keys) and values with UTF-16LE-encoded names
...ax_subkey_name_len = htole16 (strlen (name) * 2); + size_t utf16_len = use_utf16 ? recoded_name_len : recoded_name_len * 2; + if (le16toh (parent_nk->max_subkey_name_len) < utf16_len) + parent_nk->max_subkey_name_len = htole16 (utf16_len); return nkoffset; } @@ -942,7 +954,12 @@ hivex_node_set_values (hive_h *h, hive_node_h node, for (i = 0; i < nr_values; ++i) { /* Allocate vk record to store this (key, value) pair. */ static const char vk_id[2] = { 'v', 'k' }; - seg_len = sizeof (struct ntreg_vk_record) + strlen (values[i].key); + size_t name_len = strlen...
2016 Apr 05
0
[PATCH 1/7] v2v: check next free oem%d.inf in /Windows/Inf
It seems that checking for oem%d.inf in the DeviceIds registry entry doesn't always list all oemXX.inf files. For example we may have oem1.inf free in the registry key, but used in another one. Also extract this into a separate function for later use to setup another driver. --- v2v/windows_virtio.ml | 52 ++++++++++++++++++++++++++------------------------- 1 file changed, 27 insertions(+),
2017 Feb 18
11
[PATCH 0/8] Miscellaneous cleanups to Windows registry code.
A very miscellaneous set of cleanups to how we handle the Windows registry in virt-v2v, firstboot, and inspection code. This should all be straightforward non-controversial refactoring. Some highlights: - Add a new mllib Registry module containing various utility functions that are currently scattered all around. - Only compute the software/system hive paths once during inspection, and
2014 Sep 24
4
Re: Virt-v2v conversion issue
Hi, Thank you Richard for your work, but I have also like Jeff Forbes a new issue : libguestfs: trace: hivex_node_set_value = 0 libguestfs: trace: upload "/usr/share/virtio-win/drivers/amd64/Win2008/viostor.sys" "/Windows/Drivers/VirtIO" libguestfs: trace: upload = -1 (error) libguestfs: trace: hivex_close libguestfs: trace: hivex_close = 0 virt-v2v: error: libguestfs error:
2016 Apr 05
2
Re: [PATCH 1/7] v2v: check next free oem%d.inf in /Windows/Inf
On Tue, Apr 05, 2016 at 01:47:27PM +0200, Cédric Bosdonnat wrote: > + let oem_inf = set_free_oem_inf g root scsi_adapter_guid "viostor.inf" driverdir in Seems better if it was called *get_next*_free_oem_inf? > > (* There should be a key > * HKLM\SYSTEM\ControlSet001\Control\Class\<scsi_adapter_guid> > @@ -398,6 +378,28 @@ and
2016 Sep 02
0
[PATCH] v2v: Don't remove Processor and Intelppm nodes (RHBZ#1372668).
Don't remove the Processor and Intelppm nodes since that just breaks the device driver. The only remaining node being removed by the original code was "rhelscsi" (the xenpv-win driver). I changed this so that instead of deleting the whole node, it simply disables that driver. If you look at RHBZ#737600, it's not even clear that deleting nodes was the right fix for anything. I
2013 Nov 25
0
Re: [PATCH 3/3] lib: Add support for creating nodes (keys) and values with UTF-16LE-encoded names
...name); >> + nk->name_len = htole16 (recoded_name_len); >> + memcpy (nk->name, recoded_name, recoded_name_len); >> + free(recoded_name); > > Please put spaces after function names! It improves readability: Sorry, I'll fix those. I also forgot to add a free() in hivex_node_set_values. >> /* Update max_subkey_name_len in parent nk. */ >> - uint16_t max = le16toh (parent_nk->max_subkey_name_len); >> - if (max < strlen (name) * 2) /* *2 because "recoded" in UTF16-LE. */ >> - parent_nk->max_subkey_name_len = htole16 (strlen (name...
2014 Dec 04
0
[PATCH] v2v: Disable autoreboot when converting Windows guests.
This allows users to see stop errors, so we can get an accurate report when things go wrong. --- v2v/convert_windows.ml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/v2v/convert_windows.ml b/v2v/convert_windows.ml index e37c6b8..c8db860 100644 --- a/v2v/convert_windows.ml +++ b/v2v/convert_windows.ml @@ -191,6 +191,7 @@ echo uninstalling Xen PV driver if verbose then
2013 Dec 31
2
[PATCH 1/2] lib: write: Remove unused variable.
--- lib/write.c | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/write.c b/lib/write.c index 8c4dd8e..384c6b2 100644 --- a/lib/write.c +++ b/lib/write.c @@ -954,7 +954,6 @@ hivex_node_set_values (hive_h *h, hive_node_h node, for (i = 0; i < nr_values; ++i) { /* Allocate vk record to store this (key, value) pair. */ static const char vk_id[2] = { 'v', 'k' }; - size_t name_len = strlen (values[i].key); size_t recoded_name_len; int use_utf16;...
2012 Dec 03
2
sample code for guestfs_hivex_node_set_value
Is there any sample code available to demonstrate the use of the guestfs_hivex_node_set_value API? I have no problem traversing and reading keys using libguestfs hivex wrappers - but continue to fail on any write attempts. The return is always -1 and errno is unchanged. I've set the environment variable HIVEX_DEBUG to 1 on a chance that this may help - but it doesn't. The only sample I
2016 Apr 05
0
Re: [PATCH 1/7] v2v: check next free oem%d.inf in /Windows/Inf
On Tue, 2016-04-05 at 13:04 +0100, Richard W.M. Jones wrote: > On Tue, Apr 05, 2016 at 01:47:27PM +0200, Cédric Bosdonnat wrote: > > + let oem_inf = set_free_oem_inf g root scsi_adapter_guid > > "viostor.inf" driverdir in > > Seems better if it was called *get_next*_free_oem_inf? Yes, sounds better. > > (* There should be a key > > *