Displaying 20 results from an estimated 40 matches for "hivex_node_set_valu".
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
I'm not entirely sure the 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!
--...
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
guestfsd: main_loop: new request, len 0x44
guestfsd: receive_file: reading length word
libgu...
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 = strl...
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, valu...
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, valu...
2016 Jun 06
1
[PATCH] v2v:windows: prevent Parallels drivers from loading at boot
...fun svc ->
+ let svc_node = g#hivex_node_get_child services svc in
+ if svc_node <> 0L then (
+ (* Disable the service rather than delete the node as it would
+ * confuse the uninstaller called from firstboot script. *)
+ g#hivex_node_set_value svc_node "Start" 4_L (le32_of_int 4_L)
+ )
+ ) prl_svcs;
+
+ (* perfrom the equivalent of DelReg from prl_strg.inf:
+ * HKLM, System\CurrentControlSet\Control\Class\{4d36e967-e325-11ce-bfc1-08002be10318}, LowerFilters, 0x00018002, prl_strg
+ *)
+ let strg_...
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 = strl...
2016 Apr 05
0
[PATCH 1/7] v2v: check next free oem%d.inf in /Windows/Inf
...t;
- let rec loop node i =
- let oem_inf = sprintf "oem%d.inf" i in
- let value = g#hivex_node_get_value node oem_inf in
- if value = 0_L then oem_inf else loop node (i+1)
- in
- let oem_inf = loop node 1 in
- (* Create the key. *)
- g#hivex_node_set_value node oem_inf (* REG_NONE *) 0_L "";
- oem_inf in
+ let oem_inf = set_free_oem_inf g root scsi_adapter_guid "viostor.inf" driverdir in
(* There should be a key
* HKLM\SYSTEM\ControlSet001\Control\Class\<scsi_adapter_guid>
@@ -398,6 +378,28 @@ and add_vios...
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: upload: /Windows/Drivers...
2016 Apr 05
2
Re: [PATCH 1/7] v2v: check next free oem%d.inf in /Windows/Inf
...so
incorrect for a few reasons:
- It should use windows_systemroot, instead of "/Windows"
- It doesn't handle case sensitive path stuff
Do we still need to check for the registry key? (I have no idea)
> + let oem_inf = loop 1 in
> + (* Create the key. *)
> + g#hivex_node_set_value node oem_inf (* REG_NONE *) 0_L "";
> + g#cp (driverdir // driver_inf) ("/Windows/Inf/" ^ oem_inf);
And this line seems like a bit of a hack. We have a place where
drivers are copied into the driverdir. I think it would be better if
we returned oem_inf from add_viostor...
2016 Sep 02
0
[PATCH] v2v: Don't remove Processor and Intelppm nodes (RHBZ#1372668).
...<> 0L then (
- (* Delete the node instead of trying to disable it (RHBZ#737600) *)
- g#hivex_node_delete_child node
- )
- ) disable
+ let node = g#hivex_node_get_child services "rhelscsi" in
+ if node <> 0L then
+ g#hivex_node_set_value node "Start" 4_L (le32_of_int 4_L)
and disable_prl_drivers root current_cs =
(* Prevent Parallels drivers from loading at boot. *)
--
2.7.4
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 (na...
2014 Dec 04
0
[PATCH] v2v: Disable autoreboot when converting Windows guests.
...t current_cs =
+ (* If the guest reboots after a crash, it's hard to see the original
+ * error (eg. the infamous 0x0000007B). Turn off autoreboot.
+ *)
+ try
+ let crash_control =
+ get_node root [current_cs; "Control"; "CrashControl"] in
+ g#hivex_node_set_value crash_control "AutoReboot" 4_L (le32_of_int 0_L)
+ with
+ Not_found -> ()
+
and install_virtio_drivers root current_cs =
(* Copy the virtio drivers to the guest. *)
let driverdir = sprintf "%s/Drivers/VirtIO" systemroot in
--
2.1.0
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 sa...
2016 Apr 05
0
Re: [PATCH 1/7] v2v: check next free oem%d.inf in /Windows/Inf
...dle case sensitive path stuff
Indeed, I'll need to fix those
> Do we still need to check for the registry key? (I have no idea)
As we add the key just a few lines below, we need to check for it
> > + let oem_inf = loop 1 in
> > + (* Create the key. *)
> > + g#hivex_node_set_value node oem_inf (* REG_NONE *) 0_L "";
> > + g#cp (driverdir // driver_inf) ("/Windows/Inf/" ^ oem_inf);
>
> And this line seems like a bit of a hack. We have a place where
> drivers are copied into the driverdir. I think it would be better if
> we returned...