search for: xmluriptr

Displaying 20 results from an estimated 32 matches for "xmluriptr".

2018 Feb 15
0
[PATCH] Introduce a wrapper around xmlParseURI.
...nclude <libxml/uri.h> +#include "libxml2-utils.h" + #pragma GCC diagnostic ignored "-Wmissing-prototypes" /* xmlDocPtr type */ @@ -426,16 +430,11 @@ mllib_xml_doc_get_root_element (value docv) } } -value -mllib_xml_parse_uri (value strv) +static value +Val_uri (xmlURIPtr uri) { - CAMLparam1 (strv); + CAMLparam0 (); CAMLlocal3 (rv, sv, ov); - xmlURIPtr uri; - - uri = xmlParseURI (String_val (strv)); - if (uri == NULL) - caml_invalid_argument ("parse_uri: unable to parse URI"); rv = caml_alloc_tuple (9); @@ -514,7 +513,37 @@ mllib_xml_par...
2018 Nov 02
0
[PATCH REPOST] Introduce a wrapper around xmlParseURI.
...nclude <libxml/uri.h> +#include "libxml2-utils.h" + #pragma GCC diagnostic ignored "-Wmissing-prototypes" /* xmlDocPtr type */ @@ -426,16 +430,11 @@ mllib_xml_doc_get_root_element (value docv) } } -value -mllib_xml_parse_uri (value strv) +static value +Val_uri (xmlURIPtr uri) { - CAMLparam1 (strv); + CAMLparam0 (); CAMLlocal3 (rv, sv, ov); - xmlURIPtr uri; - - uri = xmlParseURI (String_val (strv)); - if (uri == NULL) - caml_invalid_argument ("parse_uri: unable to parse URI"); rv = caml_alloc_tuple (9); @@ -514,7 +513,37 @@ mllib_xml_par...
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.
2014 Apr 30
3
[PATCH 2/2] Fix handling of passwords in URLs
...ri (const char *arg); -static int parse (const char *arg, char **path_ret, char **protocol_ret, char ***server_ret, char **username_ret); +static int parse (const char *arg, char **path_ret, char **protocol_ret, char ***server_ret, char **username_ret, char **password_ret); static char *query_get (xmlURIPtr uri, const char *search_name); static int make_server (xmlURIPtr uri, const char *socket, char ***ret); @@ -45,10 +45,11 @@ parse_uri (const char *arg, struct uri *uri_ret) char *protocol = NULL; char **server = NULL; char *username = NULL; + char *password = NULL; /* Does it look...
2015 Feb 02
1
RFC: Handle query strings for http and https (RHBZ#1092583)
...(const char *arg, char **path_ret, char **protocol_ret, char ***server_ret, char **username_ret, char **password_ret); +static int parse (const char *arg, char **path_ret, char **protocol_ret, char ***server_ret, char **username_ret, char **password_ret, char **query_ret); static char *query_get (xmlURIPtr uri, const char *search_name); static int make_server (xmlURIPtr uri, const char *socket, char ***ret); @@ -46,10 +46,11 @@ parse_uri (const char *arg, struct uri *uri_ret) char **server = NULL; char *username = NULL; char *password = NULL; + char *query = NULL; /* Does it look li...
2020 Aug 14
0
[libnbd PATCH v2 09/13] info: Simplify by using nbd_opt_go
...dinfo.c +++ b/info/nbdinfo.c @@ -29,7 +29,6 @@ #include <limits.h> #include <errno.h> -#include <libxml/uri.h> #include <libnbd.h> static bool list_all = false; @@ -422,7 +421,6 @@ static void list_all_exports (struct nbd_handle *nbd1, const char *uri) { int i; - xmlURIPtr xmluri = NULL; int count = nbd_get_nr_list_exports (nbd1); if (count == -1) { @@ -434,49 +432,38 @@ list_all_exports (struct nbd_handle *nbd1, const char *uri) printf ("\t\"exports\": []\n"); for (i = 0; i < count; ++i) { - char *name, *desc, *new_path, *ne...
2020 Jul 29
0
[libnbd PATCH 2/2] info: Expose description in list mode
...t;description\": "); + print_json_string (desc); + printf (",\n"); + } + if (content) { printf ("\t\"content\": "); print_json_string (content); @@ -402,7 +411,7 @@ list_all_exports (struct nbd_handle *nbd1, const char *uri) xmlURIPtr xmluri = NULL; for (i = 0; i < nbd_get_nr_list_exports (nbd1); ++i) { - char *name, *new_path, *new_uri; + char *name, *desc, *new_path, *new_uri; struct nbd_handle *nbd2; name = nbd_get_list_export_name (nbd1, i); @@ -437,10 +446,12 @@ list_all_exports (struct nbd_handle *n...
2018 Feb 28
0
[PATCH v3 1/2] common: extract UTF-8 conversion function
...utils.h" -static char *local_string_to_utf8 (/* const */ char *input); - /** * This is a wrapper around C<xmlParseURI>. That function cannot * handle spaces and some non-ASCII characters found in URIs. This @@ -73,7 +69,7 @@ guestfs_int_parse_nonstandard_uri (const char *arg) xmlURIPtr ret; /* Convert the string to UTF-8. */ - uri = local_string_to_utf8 ((char *) arg); + uri = guestfs_int_local_string_to_utf8 ((char *) arg); if (uri == NULL) return NULL; @@ -113,66 +109,3 @@ guestfs_int_parse_nonstandard_uri (const char *arg) return ret; } - -/* Would be co...
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.
2020 Oct 17
3
Why does libxml2 limit port numbers to 999,999,999?
...evice/nbd/blob/master/doc/uri.md [2] https://tools.ietf.org/html/rfc3986#section-3.2.3 [3] $ cat port.c #include <stdio.h> #include <stdlib.h> #include <stdint.h> #include <inttypes.h> #include <libxml/uri.h> int main (int argc, char *argv[]) { xmlURIPtr uri = xmlParseURI (argv[1]); if (!uri) { fprintf (stderr, "xmlParseURI failed\n"); exit (EXIT_FAILURE); } printf ("%s => uri->port = %d\n", argv[1], uri->port); exit (EXIT_SUCCESS); } $ ./port nbd+vsock://1:1000 nbd+vsock://1:1000 =&gt...
2015 Jul 01
2
Re: URI Handling Patch
Hi All, Here's the latest patch. I think this should address the problem. The query string is now only appended to the end of a URI in the HTTP and HTTPS cases. The add-uri test now passes, and 'make check' still passes. -- Gabriel
2019 Aug 10
0
[PATCH libnbd 9/9] FOR DISCUSSION ONLY: api: Add ‘allow’ parameter to nbd_connect_uri to control permitted URIs.
...return wait_until_connected (h); @@ -228,7 +229,8 @@ error: #endif int -nbd_unlocked_aio_connect_uri (struct nbd_handle *h, const char *raw_uri) +nbd_unlocked_aio_connect_uri (struct nbd_handle *h, + const char *raw_uri, uint32_t allow) { #ifdef HAVE_LIBXML2 xmlURIPtr uri = NULL; @@ -276,6 +278,31 @@ nbd_unlocked_aio_connect_uri (struct nbd_handle *h, const char *raw_uri) goto cleanup; } + /* If the user specified the REQUIRE_TLS flag, we assume they must + * also mean to ALLOW_TLS. + */ + if ((allow & LIBNBD_CONNECT_URI_REQUIRE_TLS) != 0) +...
2017 Jun 15
0
[PATCH v6 05/41] utils: Split out cleanups into common/cleanups.
...rFree (void *ptr) +{ + xmlBufferPtr xb = * (xmlBufferPtr *) ptr; + + if (xb) + xmlBufferFree (xb); +} + +void +guestfs_int_cleanup_xmlFreeDoc (void *ptr) +{ + xmlDocPtr doc = * (xmlDocPtr *) ptr; + + if (doc) + xmlFreeDoc (doc); +} + +void +guestfs_int_cleanup_xmlFreeURI (void *ptr) +{ + xmlURIPtr uri = * (xmlURIPtr *) ptr; + + if (uri) + xmlFreeURI (uri); +} + +void +guestfs_int_cleanup_xmlFreeTextWriter (void *ptr) +{ + xmlTextWriterPtr xo = * (xmlTextWriterPtr *) ptr; + + if (xo) + xmlFreeTextWriter (xo); +} + +void +guestfs_int_cleanup_xmlXPathFreeContext (void *ptr) +{ + xmlXP...
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 03
5
[libnbd PATCH 0/4] More nbdinfo fixes
This rounds up the remaining bugs that I originally identified in: https://www.redhat.com/archives/libguestfs/2020-July/msg00153.html Eric Blake (4): api: Permit export list APIs when Connected info: Support --list with serializing servers info: Fix --json output when list size != 1 info: Permit --size --json generator/API.ml | 6 +++--- info/info-list-json.sh | 9 +++++++++
2020 Jul 29
3
[libnbd PATCH 0/2] Expose export description
An incremental improvement on top of listing exports. I still think it's worth experimenting with revisiting how our API for list mode should actually work [1] (so that we can reuse a single connection for both grabbing the list and finally using NBD_OPT_GO), but this change was easier to whip together while still thinking about that. [1]
2014 Jan 23
7
[PATCH 0/7] Various fixes for Ceph drives and parsing libvirt XML.
Miscellaneous fixes to: - Handling of Ceph drives now works end-to-end (RHBZ#1026688). - In particular, you can now use rbd:/// URIs in guestfish (and they work). - Parse Ceph & NBD network drives from libvirt XML correctly, so that existing domains with Ceph/NBD drives can be added (eg. using guestfish -d option). - Add more testing of the above.
2013 Aug 24
46
[PATCH 00/46] Proposed patches for libguestfs 1.20.11.
Tested with 'make check-release'. tests/parallel (in check-slow) failed, although it does regularly and that seems to be because of libvirt. Rich.
2019 Jul 09
7
[PATCH 0/5] Split virt-p2v in own repository
Hi, as it was already discussed on this list, here it is my attempt in splitting virt-p2v in an own repository. Sadly there are things that must be copied from libguestfs, as it cannot be avoided. The approach taken was to run a script (will send separately) to just get the "p2v" subdirectory with its history as own repository, and then add in few followup commits all the bits needed