[Pkg-libvirt-commits] [SCM] Libvirt Debian packaging branch, master, updated. debian/0.9.11-2
Guido Günther
agx at sigxcpu.org
Mon Apr 9 16:23:44 UTC 2012
The following commit has been merged in the master branch:
commit 5152b85af4e79d851ddb7b36ce8ecc3c1c4d4685
Author: Guido Günther <agx at sigxcpu.org>
Date: Mon Apr 9 17:29:21 2012 +0200
virURIParse: don't forget to copy the user part
Closes: #667636
diff --git a/debian/patches/series b/debian/patches/series
index 53c08fe..9a22cbe 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -10,3 +10,4 @@ Disable-daemon-start-test.patch
Disable-gnulib-s-test-nonplocking-pipe.sh.patch
Disable-failing-virnetsockettest.patch
Don-t-fail-if-we-can-t-setup-avahi.patch
+virURIParse-don-t-forget-to-copy-the-user-part.patch
diff --git a/debian/patches/virURIParse-don-t-forget-to-copy-the-user-part.patch b/debian/patches/virURIParse-don-t-forget-to-copy-the-user-part.patch
new file mode 100644
index 0000000..8d1e5c1
--- /dev/null
+++ b/debian/patches/virURIParse-don-t-forget-to-copy-the-user-part.patch
@@ -0,0 +1,93 @@
+From: =?UTF-8?q?Guido=20G=C3=BCnther?= <agx at sigxcpu.org>
+Date: Thu, 5 Apr 2012 17:52:42 +0200
+Subject: virURIParse: don't forget to copy the user part
+
+This got dropped with 300e60e15b22387dda41ed5985a9ebadfd86dd25
+
+Closes: #667636
+---
+ src/util/viruri.c | 5 ++++-
+ tests/viruritest.c | 24 +++++++++++++-----------
+ 2 files changed, 17 insertions(+), 12 deletions(-)
+
+diff --git a/src/util/viruri.c b/src/util/viruri.c
+index 2c6de51..a41f345 100644
+--- a/src/util/viruri.c
++++ b/src/util/viruri.c
+@@ -185,7 +185,9 @@ virURIParse(const char *uri)
+ if (xmluri->fragment &&
+ !(ret->fragment = strdup(xmluri->fragment)))
+ goto no_memory;
+-
++ if (xmluri->user &&
++ !(ret->user = strdup(xmluri->user)))
++ goto no_memory;
+
+ /* First check: does it even make sense to jump inside */
+ if (ret->server != NULL &&
+@@ -249,6 +251,7 @@ virURIFormat(virURIPtr uri)
+ xmluri.query = uri->query;
+ #endif
+ xmluri.fragment = uri->fragment;
++ xmluri.user = uri->user;
+
+ /* First check: does it make sense to do anything */
+ if (xmluri.server != NULL &&
+diff --git a/tests/viruritest.c b/tests/viruritest.c
+index 3570217..4bb6a03 100644
+--- a/tests/viruritest.c
++++ b/tests/viruritest.c
+@@ -42,6 +42,7 @@ struct URIParseData {
+ const char *path;
+ const char *query;
+ const char *fragment;
++ const char *user;
+ virURIParamPtr params;
+ };
+
+@@ -143,33 +144,34 @@ mymain(void)
+ signal(SIGPIPE, SIG_IGN);
+
+ #define TEST_FULL(uri, uri_out, scheme, server, port, path, query, \
+- fragment, params) \
++ fragment, user, params) \
+ do { \
+ const struct URIParseData data = { \
+ uri, (uri_out) ? (uri_out) : (uri), scheme, server, port, \
+- path, query, fragment, params \
++ path, query, fragment, user, params \
+ }; \
+ if (virtTestRun("Test URI " # uri, 1, testURIParse, &data) < 0) \
+ ret = -1; \
+ } while (0)
+-#define TEST_PARSE(uri, scheme, server, port, path, query, fragment, params) \
+- TEST_FULL(uri, NULL, scheme, server, port, path, query, fragment, params)
++#define TEST_PARSE(uri, scheme, server, port, path, query, fragment, user, params) \
++ TEST_FULL(uri, NULL, scheme, server, port, path, query, fragment, user, params)
+ #define TEST_PARAMS(query_in, query_out, params) \
+ TEST_FULL("test://example.com/?" query_in, \
+ *query_out ? "test://example.com/?" query_out : NULL, \
+- "test", "example.com", 0, "/", query_in, NULL, params)
++ "test", "example.com", 0, "/", query_in, NULL, NULL, params)
+
+ virURIParam params[] = {
+ { (char*)"name", (char*)"value" },
+ { NULL, NULL },
+ };
+
+- TEST_PARSE("test://example.com", "test", "example.com", 0, NULL, NULL, NULL, NULL);
+- TEST_PARSE("test://example.com:123", "test", "example.com", 123, NULL, NULL, NULL, NULL);
+- TEST_PARSE("test://example.com:123/system?name=value#foo", "test", "example.com", 123, "/system", "name=value", "foo", params);
+- TEST_PARSE("test://127.0.0.1:123/system", "test", "127.0.0.1", 123, "/system", NULL, NULL, NULL);
+- TEST_PARSE("test://[::1]:123/system", "test", "::1", 123, "/system", NULL, NULL, NULL);
+- TEST_PARSE("test://[2001:41c8:1:4fd4::2]:123/system", "test", "2001:41c8:1:4fd4::2", 123, "/system", NULL, NULL, NULL);
++ TEST_PARSE("test://example.com", "test", "example.com", 0, NULL, NULL, NULL, NULL, NULL);
++ TEST_PARSE("test://foo@example.com", "test", "example.com", 0, NULL, NULL, NULL, "foo", NULL);
++ TEST_PARSE("test://example.com:123", "test", "example.com", 123, NULL, NULL, NULL, NULL, NULL);
++ TEST_PARSE("test://example.com:123/system?name=value#foo", "test", "example.com", 123, "/system", "name=value", "foo", NULL, params);
++ TEST_PARSE("test://127.0.0.1:123/system", "test", "127.0.0.1", 123, "/system", NULL, NULL, NULL, NULL);
++ TEST_PARSE("test://[::1]:123/system", "test", "::1", 123, "/system", NULL, NULL, NULL, NULL);
++ TEST_PARSE("test://[2001:41c8:1:4fd4::2]:123/system", "test", "2001:41c8:1:4fd4::2", 123, "/system", NULL, NULL, NULL, NULL);
+
+ virURIParam params1[] = {
+ { (char*)"foo", (char*)"one" },
--
Libvirt Debian packaging
More information about the Pkg-libvirt-commits
mailing list