Displaying 20 results from an estimated 700 matches similar to: "[PATCH] Introduce a wrapper around xmlParseURI."
2018 Nov 02
0
[PATCH REPOST] Introduce a wrapper around xmlParseURI.
We only use xmlParseURI to parse our own "homebrew" URIs, for example
the ones used by guestfish --add or virt-v2v. Unfortunately
xmlParseURI cannot handle URIs with spaces or other non-RFC-compliant
characters so simple commands like these fail:
$ guestfish -a 'ssh://example.com/virtual machine.img'
guestfish: --add: could not parse URI 'ssh://example.com/virtual
2017 Dec 12
1
[PATCH] Introduce a wrapper around xmlParseURI.
An alternate solution to:
https://www.redhat.com/archives/libguestfs/2017-December/msg00035.html
"[PATCH] v2v: -i vmx: Allow ssh URLs to use spaces."
is to classify all URLs processed by libguestfs as either ordinary
URLs or the special non-standard URLs that we use for things like
‘virt-v2v -i vmx’ and ‘guestfish --add’.
For the non-standard URLs, provide a wrapper around
2018 Nov 02
2
[PATCH REPOST] Introduce a wrapper around xmlParseURI.
Previously posted:
https://www.redhat.com/archives/libguestfs/2017-December/msg00046.html
Rich.
2018 Feb 28
0
[PATCH v3 1/2] common: extract UTF-8 conversion function
libxml2-utils.c local_string_to_utf8() function could easily be reused
in other places. This commit extracts it with a new parameter to allow
giving the encoding of the input string and publishes it in
guestfs-utils.h as guestfs_int_string_to_utf8()
---
common/utils/guestfs-utils.h | 11 +++++++
common/utils/libxml2-utils.c | 69 +-------------------------------------------
common/utils/utils.c
2017 Feb 07
0
[PATCH v2 2/7] Move xml and xpath_helpers OCAML code to mllib
To allow other pieces of code to process XML files easily, move the
xml.ml* and xpath_helpers.ml* from v2v to mllib.
---
docs/C_SOURCE_FILES | 2 +-
mllib/Makefile.am | 9 ++++++--
{v2v => mllib}/xml-c.c | 47 +++++++++++++++++++-------------------
{v2v => mllib}/xml.ml | 49 ++++++++++++++++++++++------------------
{v2v =>
2017 Jun 15
0
[PATCH v6 10/41] mllib, v2v: Split out OCaml utils bindings ‘common/mlutils’.
Create a module ‘C_utils’ containing functions like ‘drive_name’ and
‘shell_unquote’ which come from the C utilities.
The new directory ‘common/mlutils’ also contains the ‘Unix_utils’
wrappers around POSIX functions missing from the OCaml stdlib.
---
.gitignore | 3 +
Makefile.am | 24 ++---
builder/Makefile.am
2020 Oct 17
3
Why does libxml2 limit port numbers to 999,999,999?
The AF_VSOCK protocol added in Linux 5.6 uses a 32 bit port number.
For NBD we map this to simple URIs[1] like nbd+vsock://CID:PORT (where
CID is a number that acts a bit like a hostname and PORT is a 32 bit
port number). eg: nbd+vsock://1:1000000000/ would be port 10^9 on the
loopback address VMADDR_CID_LOCAL (== 1).
The problem is that libxml2 arbitrarily limits port numbers to
999,999,999.
2018 Feb 28
2
[PATCH v3 0/2] inspect: basic UTF-8 encoding for rpm
Diff to v2:
* inlined local_string_to_utf8
Cédric Bosdonnat (2):
common: extract UTF-8 conversion function
inspector: rpm summary and description may not be utf-8
common/utils/guestfs-utils.h | 11 +++++
common/utils/libxml2-utils.c | 69 +--------------------------
common/utils/utils.c | 64 +++++++++++++++++++++++++
2020 Aug 14
0
[libnbd PATCH v2 09/13] info: Simplify by using nbd_opt_go
Instead of having to munge a URI to supply a different export name, we
can exploit the fact that nbd_opt_mode lets us change the preferred
export name after nbd_connect_uri has established its socket.
In fact, by doing this, nbdinfo no longer needs to directly link
against libxml2, so it can now be built regardless of whether the
underlying libnbd.so supports URIs (although use of the program
2010 Jul 22
0
Fwd: [PATCH hivex] non-ASCII characters in node names
Hilko, forwarding this to the mailing list. Please post patches
over there.
Rich.
----- Forwarded message -----
Date: Wed, 21 Jul 2010 17:09:53 +0200
From: Hilko Bengen
Subject: patch: non-ASCII characters in node names
Hi Richard,
I was a little bit surprised when a colleague claimed that key and value
names in the registry could contain non-ASCII characters.
I created keys and values
2014 Apr 30
3
[PATCH 2/2] Fix handling of passwords in URLs
So far, passwords in URLs (eg http://user:password@host..) have been
handled as part of the username, and thus passing
add-drive path username:username:password ...
instead of
add-drive path username:username secret:password ...
Fix the parsing of URLs to handle passwords as separate elements,
properly passing it as "secret" parameter for add-drive, and properly
readd it when
2015 Feb 02
1
RFC: Handle query strings for http and https (RHBZ#1092583)
Parse the query string from URLs, and pass it as new add_drive optarg;
use it when building the file= URL for qemu.
Accept query string only for http and https protocols, for now.
---
Possibly it looks like an ad-hoc solution for http(s), although I'm not
sure how it could possibly be generalized somehow (maybe "extra params"
which would be the query string for http(s)?).
2019 Mar 29
0
[PATCH v2 1/3] common/mlpcre: add offset flag for PCRE.matches
This way it is possible to change where the matching start, instead of
always assuming it is the beginning.
---
common/mlpcre/PCRE.ml | 2 +-
common/mlpcre/PCRE.mli | 5 ++++-
common/mlpcre/pcre-c.c | 16 +++++++++++++---
common/mlpcre/pcre_tests.ml | 11 ++++++++---
4 files changed, 26 insertions(+), 8 deletions(-)
diff --git a/common/mlpcre/PCRE.ml b/common/mlpcre/PCRE.ml
2019 Feb 25
0
[PATCH 1/3] common/mlpcre: add offset flag for PCRE.matches
This way it is possible to change where the matching start, instead of
always assuming it is the beginning.
---
common/mlpcre/PCRE.ml | 2 +-
common/mlpcre/PCRE.mli | 5 ++++-
common/mlpcre/pcre-c.c | 16 +++++++++++++---
common/mlpcre/pcre_tests.ml | 15 ++++++++++++---
4 files changed, 30 insertions(+), 8 deletions(-)
diff --git a/common/mlpcre/PCRE.ml b/common/mlpcre/PCRE.ml
2017 Oct 09
1
[PATCH] Fully initialize the custom_operations structs
Use also custom_compare_ext_default for the compare_ext field.
According to the git logs, this was introduced in OCaml 3.12.1, which is
earlier than out minimum required version.
mlaugeas is not touched by this change, since it is a copy of a 3rd
party library (and thus it will be fixed there first).
---
common/mlpcre/pcre-c.c | 3 ++-
common/mlprogress/progress-c.c | 3 ++-
2009 Nov 03
1
[PATCH libguestfs] hivex: fail upon integer overflow
This is probably only theoretical, but just the same...
>From 29edcca195d2998ca4a54aacec261752a3bdeb3d Mon Sep 17 00:00:00 2001
From: Jim Meyering <meyering at redhat.com>
Date: Tue, 3 Nov 2009 18:50:23 +0100
Subject: [PATCH libguestfs] hivex: fail upon integer overflow
* hivex/hivex.c (windows_utf16_to_utf8): Avoid overflow and a
potential infloop.
---
hivex/hivex.c | 3 +++
1
2018 Feb 09
0
Re: [PATCH] Add a cache for iconv_t handles to hive_t
On Fri, Feb 09, 2018 at 01:52:52AM +0100, Hilko Bengen wrote:
> 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
2019 Apr 23
0
[PATCH nbdkit v2 1/2] ocaml: Change pread method to avoid leaking heap memory.
In the C part of the OCaml plugin we created a ‘bytes’ [byte array]
and passed it to the OCaml pread method. The plugin is supposed to
overwrite the array with the returned data.
However if (eg. because of a bug) the plugin does not fill the array
then whatever was in the OCaml or possibly even the C heap before the
allocation is returned to the client, possibly resulting in a leak of
sensitive
2019 May 28
1
[PATCH] build: build C sources using OCaml API with CAML_NAME_SPACE
This way no non-namespaced OCaml C symbols are used, reducing the risk
of clashes with other code.
The only exception is ocaml-augeas, which does not build with
CAML_NAME_SPACE; it will be fixed upstream, and it affects only
ocaml-augeas itself.
---
builder/Makefile.am | 2 ++
common/mllibvirt/Makefile.am | 1 +
common/mlpcre/Makefile.am | 1 +
common/mlprogress/Makefile.am | 1 +
2018 Feb 09
2
[PATCH] 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