Displaying 14 results from an estimated 14 matches for "query_raw".
2015 Jun 25
4
URI Handling Patch
I have written a patch (please see attached) which fixes both of these bugs:
https://bugzilla.redhat.com/show_bug.cgi?id=1092583
https://bugzilla.redhat.com/show_bug.cgi?id=1232477
By default, when saving a URI using xmlSaveUri it escapes everything in the
URI. QEMU doesn't want anything escaped, so now I unescape everything
after the URI is generated. Unfortunately there's no flag to
2015 Jun 26
0
Re: URI Handling Patch
...git a/fish/uri.c b/fish/uri.c
> index 593e62a..1566cdf 100644
> --- a/fish/uri.c
> +++ b/fish/uri.c
> @@ -178,12 +178,20 @@ parse (const char *arg, char **path_ret, char **protocol_ret,
> }
> }
>
> + if (asprintf(&path, "%s?%s", uri->path, uri->query_raw) == -1) {
> + perror ("asprintf: path + query_raw");
> + free (*protocol_ret);
> + guestfs_int_free_string_list (*server_ret);
> + free (*username_ret);
> + free (*password_ret);
> + return -1;
> + }
'path' created here is leaked. Also, thi...
2015 Feb 02
1
RFC: Handle query strings for http and https (RHBZ#1092583)
...P_FREE char *socket = NULL;
@@ -201,6 +204,24 @@ parse (const char *arg, char **path_ret, char **protocol_ret,
return -1;
}
+ *query_ret = NULL;
+ /* Copy the query string part only when not building a unix: URI
+ * (e.g. for nbd). See logic done in make_server.
+ */
+ if (uri->query_raw && STRNEQ (uri->query_raw, "") &&
+ !(socket && (uri->server == NULL || STREQ (uri->server, "")))) {
+ *query_ret = strdup (uri->query_raw);
+ if (*query_ret == NULL) {
+ perror ("strdup: query");
+ free (*protoc...
2020 Oct 27
6
[PATCH libnbd 0/5] info: --map: Coalesce adjacent extents of the same type.
This adds coalescing of adjacent extents of the same type, as
mentioned by Eric Blake in the commit message here:
https://github.com/libguestfs/libnbd/commit/46072f6611f80245846a445766da071e457b00cd
The patch series is rather long because it detours through adding the
<vector.h> library from nbdkit into libnbd and replacing ad hoc uses
of realloc, char ** etc in various places.
Rich.
2017 Jun 28
2
Re: [PATCH] libvirt: disallow non-local connections (RHBZ#1347830)
On Tuesday, 27 June 2017 22:56:25 CEST Richard W.M. Jones wrote:
>
> Not that I'm opposed to this patch, but there's a bit of history here:
>
> https://www.redhat.com/archives/libguestfs/2012-December/msg00120.html
Hm it doesn't say much more about that though, and the solution I
implemented is even less strict than what Dan suggested back then.
> I think it would be
2015 Jun 26
3
Re: URI Handling Patch
...;/pool/disk" so we have to knock off the leading '/' character.
*/
This is talking about removing leading the '/' in the path sometimes
depending on protocol. Nothing to do with the query string.
> > + if (asprintf(&path, "%s?%s", uri->path, uri->query_raw) == -1) {
> > + perror ("asprintf: path + query_raw");
> > + free (*protocol_ret);
> > + guestfs_int_free_string_list (*server_ret);
> > + free (*username_ret);
> > + free (*password_ret);
> > + return -1;
> > + }
>
> '...
2017 Jun 29
0
Re: [PATCH] libvirt: disallow non-local connections (RHBZ#1347830)
...remote URIs, but probably we wouldn't
> > want to deny it completely, but allow a way for callers to bypass the
> > check if they know better.
>
> That could be a good idea, how would you expect this bypass to look
> like?
I'm not sure. An extra parameter passed in .query_raw I suppose.
Rich.
--
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
libguestfs lets you edit virtual machines. Supports shell scripting,
bindings from many languages. http://libguestfs.org
2019 Aug 10
0
[PATCH libnbd 4/9] api: Change nbd_set_tls (, 2) -> nbd_set_tls (, LIBNBD_TLS_REQUIRE).
...b/lib/connect.c
@@ -292,7 +292,7 @@ nbd_unlocked_aio_connect_uri (struct nbd_handle *h, const char *raw_uri)
}
/* TLS */
- if (tls && nbd_unlocked_set_tls (h, 2) == -1)
+ if (tls && nbd_unlocked_set_tls (h, LIBNBD_TLS_REQUIRE) == -1)
goto cleanup;
/* XXX If uri->query_raw includes TLS parameters, we should call
* nbd_unlocked_set_tls_* to match...
diff --git a/tests/aio-parallel-load.c b/tests/aio-parallel-load.c
index f4ba635..614c22b 100644
--- a/tests/aio-parallel-load.c
+++ b/tests/aio-parallel-load.c
@@ -207,7 +207,7 @@ start_thread (void *arg)
/* Requir...
2017 Jun 29
1
Re: [PATCH] libvirt: disallow non-local connections (RHBZ#1347830)
...n't
> > > want to deny it completely, but allow a way for callers to bypass the
> > > check if they know better.
> >
> > That could be a good idea, how would you expect this bypass to look
> > like?
>
> I'm not sure. An extra parameter passed in .query_raw I suppose.
Regards,
Daniel
--
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o- https://fstop138.berrange.com :|
|: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
2016 May 18
2
[PATCH v2 0/2] lib: qemu: Memoize qemu feature detection.
v1 -> v2:
- Rebase on top of Pino's version work.
Two patches went upstream, these are the two remaining patches.
Note the generation number is still inside the qemu.stat file. We
could put it in the filename, I have no particular preference.
Rich.
2014 Jan 16
3
[PATCH 0/2] Don't use snapshot=on
QEMU upstream has broken snapshot=on ... again.
These two patches stop using it entirely. Instead we run
'qemu-img create' to create overlay disks as required.
Note that the libvirt and UML backends were already doing this: The
libvirt backend because <transient/> has never worked, and the UML
backend was running uml_mkcow because the UML-equivalent syntax of
snapshot=on was
2016 May 12
7
[PATCH 0/4] lib: qemu: Memoize qemu feature detection.
Doing qemu feature detection in the direct backend takes ~100ms
because we need to run `qemu -help' and `qemu -devices ?', and each of
those interacts with glibc's very slow link loader.
Fixing the link loader is really hard. Instead memoize the
output of those two commands.
This patch series first separates all the code dealing with qemu into
a separate module (src/qemu.c) and
2019 Aug 10
17
[PATCH libnbd 0/9] Add Enum and Flags types.
This largish series adds several new features to the generator.
Enum maps to enumerated types (like enum in C). The only current use
for this is replacing the nbd_set_tls (nbd, 0/1/2) parameter with
LIBNBD_TLS_DISABLE, LIBNBD_TLS_ALLOW, LIBNBD_TLS_REQUIRE (and natural
equivalents in other programming languages).
Flags maps to any uint32_t bitmask. It is basically a non-optional,
generalized
2013 Aug 24
67
[PATCH 00/67] Proposed patches for libguestfs 1.22.6.
In the kernel and qemu communities it is routine for patches that will
be backported to stable branches to be posted for review. I'm
proposing we do the same for libguestfs stable branches.
All of the attached have been tested with 'make check-release'.
Rich.