search for: hivex_node_add_child

Displaying 20 results from an estimated 25 matches for "hivex_node_add_child".

2011 Apr 13
1
[PATCH hivex] maint: split long lines
...of page free starting at 0x%zx, size %zd\n", - h->endblocks, rem); + fprintf (stderr, "allocate_block: marking remainder of page free" + " starting at 0x%zx, size %zd\n", h->endblocks, rem); assert (rem >= 4); @@ -2196,7 +2234,8 @@ hivex_node_add_child (hive_h *h, hive_node_h parent, const char *name) return 0; if (h->msglvl >= 2) - fprintf (stderr, "hivex_node_add_child: allocated new nk-record for child at 0x%zx\n", node); + fprintf (stderr, "hivex_node_add_child: allocated new nk-record" + " f...
2013 Nov 25
1
[PATCH 3/3, take 2] lib: Add support for creating nodes (keys) and values with UTF-16LE-encoded names
--- lib/write.c | 50 +++++++++++++++++++++++++++++++++++--------------- 1 file changed, 35 insertions(+), 15 deletions(-) diff --git a/lib/write.c b/lib/write.c index dbb8292..8c4dd8e 100644 --- a/lib/write.c +++ b/lib/write.c @@ -608,9 +608,17 @@ hivex_node_add_child (hive_h *h, hive_node_h parent, const char *name) return 0; } + size_t recoded_name_len; + int use_utf16 = 0; + char* recoded_name = _hivex_encode_string (name, &recoded_name_len, &use_utf16); + if (recoded_name == NULL) { + SET_ERRNO (EINVAL, "malformed name"); +...
2013 Nov 25
3
Re: [PATCH 3/3] lib: Add support for creating nodes (keys) and values with UTF-16LE-encoded names
...ote: > --- > lib/write.c | 49 ++++++++++++++++++++++++++++++++++--------------- > 1 file changed, 34 insertions(+), 15 deletions(-) > > diff --git a/lib/write.c b/lib/write.c > index dbb8292..72b1f8a 100644 > --- a/lib/write.c > +++ b/lib/write.c > @@ -608,9 +608,17 @@ hivex_node_add_child (hive_h *h, hive_node_h parent, const char *name) > return 0; > } > > + size_t recoded_name_len; > + int use_utf16 = 0; > + char* recoded_name = _hivex_encode_string (name, &recoded_name_len, &use_utf16); > + if (recoded_name == NULL) { > + SET_ERRNO...
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
2013 Nov 24
0
[PATCH 3/3] lib: Add support for creating nodes (keys) and values with UTF-16LE-encoded names
--- lib/write.c | 49 ++++++++++++++++++++++++++++++++++--------------- 1 file changed, 34 insertions(+), 15 deletions(-) diff --git a/lib/write.c b/lib/write.c index dbb8292..72b1f8a 100644 --- a/lib/write.c +++ b/lib/write.c @@ -608,9 +608,17 @@ hivex_node_add_child (hive_h *h, hive_node_h parent, const char *name) return 0; } + size_t recoded_name_len; + int use_utf16 = 0; + char* recoded_name = _hivex_encode_string (name, &recoded_name_len, &use_utf16); + if (recoded_name == NULL) { + SET_ERRNO (EINVAL, "malformed name"); +...
2011 Apr 27
2
[PATCH] hivex/python fix for i386 integer size issue
...n 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...
2010 Feb 05
13
[PATCH 01/14] hivexsh: Document some peculiarities of the "cd" command.
--- hivex/hivexsh.pod | 9 ++++++++- 1 files changed, 8 insertions(+), 1 deletions(-) diff --git a/hivex/hivexsh.pod b/hivex/hivexsh.pod index 277e3ae..9336798 100644 --- a/hivex/hivexsh.pod +++ b/hivex/hivexsh.pod @@ -100,7 +100,14 @@ or even: Path elements (node names) are matched case insensitively, and characters like space, C<*>, and C<?> have I<no> special
2014 Aug 07
4
[PATCH 0/2] Fix errors found by Clang static analyzer
Hi, Here is one trivial initialization fix and another patch to convert a huge macro to an inline function. The result of the expansion would show up in an assertion which triggered a -Woverlength-strings warning. Peter Wu (2): Fix garbage return value on error Fix overly long assertion string lib/hivex-internal.h | 28 ++++++++++++++++------------ lib/node.c | 18
2013 Jul 25
19
[PATCH hivex 00/19] Fix read/write handling of li-records.
This is, hopefully, a full fix for handling of li-records. See: https://bugzilla.redhat.com/show_bug.cgi?id=717583 https://bugzilla.redhat.com/show_bug.cgi?id=987463 Rich.
2016 Aug 23
0
Re: [PATCH 2/2] v2v:windows: prevent conflicts with PnP on firstboot
...o REG_DWORD 1, creating intermediate keys if needed *) > + let node = > + let rec loop parent = function > + | [] -> parent > + | x :: xs -> > + let node = > + match g#hivex_node_get_child parent x with > + | 0L -> g#hivex_node_add_child parent x (* not found, create *) > + | node -> node in > + loop node xs > + in > + loop root key_path in > + let valueh = g#hivex_node_get_value node name in > + let value = > + match valueh with > + | 0L -> None > +...
2016 Sep 01
0
Re: [PATCH v2 2/2] v2v:windows: prevent conflicts with PnP on firstboot
...o REG_DWORD 1, creating intermediate keys if needed *) > + let node = > + let rec loop parent = function > + | [] -> parent > + | x :: xs -> > + let node = > + match g#hivex_node_get_child parent x with > + | 0L -> g#hivex_node_add_child parent x (* not found, create *) > + | node -> node in > + loop node xs > + in > + loop root key_path in > + let valueh = g#hivex_node_get_value node name in > + let value = > + match valueh with > + | 0L -> None > +...
2018 Feb 09
3
[PATCH] Add a cache for iconv_t handles to hive_t
...ret[nr_strings-1] = _hivex_recode (h, utf16le_to_utf8, p, plen, NULL); ret[nr_strings] = NULL; if (ret[nr_strings-1] == NULL) { _hivex_free_strings (ret); diff --git a/lib/write.c b/lib/write.c index 33b64e4..70105c9 100644 --- a/lib/write.c +++ b/lib/write.c @@ -610,7 +610,7 @@ hivex_node_add_child (hive_h *h, hive_node_h parent, const char *name) size_t recoded_name_len; int use_utf16 = 0; char *recoded_name = - _hivex_encode_string (name, &recoded_name_len, &use_utf16); + _hivex_encode_string (h, name, &recoded_name_len, &use_utf16); if (recoded_name == NUL...
2016 Sep 01
3
[PATCH v2 0/2] v2v:windows: prevent conflicts with PnP on firstboot
Wait for driver installations fired by the PnP manager to complete before running firstboot scripts. The first patch is a minor refactoring to pave the way for the second patch. The latter contains the bulk of the changes as well as the description of the idea. Roman Kagan (2): v2v:windows: factor out getting CurrentControlSet v2v:windows: prevent conflicts with PnP on firstboot --- v1
2011 Aug 13
2
[Hivex] [PATCH v3] Report last-modified time of hive root and nodes
...reg_nk_record *) (h->addr + node); + + ret = le64toh (nk->timestamp); + return hivex_timestamp_check (h, node, ret); +} + #if 0 /* I think the documentation for the sk and classname fields in the nk * record is wrong, or else the offset field is in the wrong place. @@ -2264,7 +2304,7 @@ hivex_node_add_child (hive_h *h, hive_node_h parent, const char *name) nk->sk = htole32 (parent_sk_offset - 0x1000); /* Inherit parent timestamp. */ - memcpy (nk->timestamp, parent_nk->timestamp, sizeof (parent_nk->timestamp)); + nk->timestamp = parent_nk->timestamp; /* What I found out...
2011 Aug 10
1
[PATCH] Report last-modified time of hive root and nodes
...opaque, node, name, last_modified) == -1) goto error; values = hivex_node_values (h, node); @@ -1764,6 +1801,7 @@ hivex__visit_node (hive_h *h, hive_node_h node, error: free (name); + free (last_modified); free (values); free (children); free (key); @@ -2264,7 +2302,7 @@ hivex_node_add_child (hive_h *h, hive_node_h parent, const char *name) nk->sk = htole32 (parent_sk_offset - 0x1000); /* Inherit parent timestamp. */ - memcpy (nk->timestamp, parent_nk->timestamp, sizeof (parent_nk->timestamp)); + nk->timestamp = parent_nk->timestamp; /* What I found out...
2018 Feb 09
0
Re: [PATCH] Add a cache for iconv_t handles to hive_t
...utf16le_to_utf8, p, plen, NULL); > ret[nr_strings] = NULL; > if (ret[nr_strings-1] == NULL) { > _hivex_free_strings (ret); > diff --git a/lib/write.c b/lib/write.c > index 33b64e4..70105c9 100644 > --- a/lib/write.c > +++ b/lib/write.c > @@ -610,7 +610,7 @@ hivex_node_add_child (hive_h *h, hive_node_h parent, const char *name) > size_t recoded_name_len; > int use_utf16 = 0; > char *recoded_name = > - _hivex_encode_string (name, &recoded_name_len, &use_utf16); > + _hivex_encode_string (h, name, &recoded_name_len, &use_utf16); &...
2011 Aug 10
1
[Hivex][PATCH v2] Report last-modified time of hive root and nodes
...goto error; + values = hivex_node_values (h, node); if (!values) { ret = skip_bad ? 0 : -1; @@ -1764,6 +1852,7 @@ hivex__visit_node (hive_h *h, hive_node_h node, error: free (name); + free (last_modified); free (values); free (children); free (key); @@ -2264,7 +2353,7 @@ hivex_node_add_child (hive_h *h, hive_node_h parent, const char *name) nk->sk = htole32 (parent_sk_offset - 0x1000); /* Inherit parent timestamp. */ - memcpy (nk->timestamp, parent_nk->timestamp, sizeof (parent_nk->timestamp)); + nk->timestamp = parent_nk->timestamp; /* What I found out...
2018 Feb 09
2
[PATCH] Add a cache for iconv_t handles to hive_t
...ret[nr_strings-1] = _hivex_recode (h, utf16le_to_utf8, p, plen, NULL); ret[nr_strings] = NULL; if (ret[nr_strings-1] == NULL) { _hivex_free_strings (ret); diff --git a/lib/write.c b/lib/write.c index 33b64e4..70105c9 100644 --- a/lib/write.c +++ b/lib/write.c @@ -610,7 +610,7 @@ hivex_node_add_child (hive_h *h, hive_node_h parent, const char *name) size_t recoded_name_len; int use_utf16 = 0; char *recoded_name = - _hivex_encode_string (name, &recoded_name_len, &use_utf16); + _hivex_encode_string (h, name, &recoded_name_len, &use_utf16); if (recoded_name == NUL...
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
2012 Aug 29
5
[PATCH 0/4] Add hivex APIs into the libguestfs API (RHBZ#852394)
This adds most of the hivex APIs directly to the libguestfs API, so that you can read and write Windows Registry hive files from libguestfs without needing to download and upload hive files from the guest. This is analogous to how Augeas APIs are exposed already (guestfs_aug_*) Also, inspection is now done using the new APIs, which fixes the following bug: