[Pkg-libvirt-commits] [SCM] Libguestfs Debian packaging branch, experimental, updated. debian/1%1.21.40-1
Richard W.M. Jones
rjones at redhat.com
Sat Jun 1 11:04:18 UTC 2013
The following commit has been merged in the experimental branch:
commit c5f356a60351dd51cbd3a9aabcac2cd40562f36a
Author: Richard W.M. Jones <rjones at redhat.com>
Date: Mon Apr 29 15:23:27 2013 +0100
daemon: Properly quote arguments for tar-out, base64-out commands (RHBZ#957772).
This fixes commit c78ec7e085e99bfddd0509dece72bf6a8d0188ce
which was an attempt to fix RHBZ#908322.
diff --git a/daemon/base64.c b/daemon/base64.c
index 263c87a..04b29fd 100644
--- a/daemon/base64.c
+++ b/daemon/base64.c
@@ -125,7 +125,7 @@ do_base64_out (const char *file)
}
/* Construct the command. */
- if (asprintf_nowarn (&cmd, "%s %s", str_base64, buf) == -1) {
+ if (asprintf_nowarn (&cmd, "%s %Q", str_base64, buf) == -1) {
reply_with_perror ("asprintf");
return -1;
}
diff --git a/daemon/tar.c b/daemon/tar.c
index 9bf85f5..461e529 100644
--- a/daemon/tar.c
+++ b/daemon/tar.c
@@ -342,7 +342,7 @@ do_tar_out (const char *dir, const char *compress, int numericowner,
}
/* "tar -C /sysroot%s -cf - ." but we have to quote the dir. */
- if (asprintf_nowarn (&cmd, "%s -C %s%s%s%s -cf - .",
+ if (asprintf_nowarn (&cmd, "%s -C %Q%s%s%s -cf - .",
str_tar,
buf, filter,
numericowner ? " --numeric-owner" : "",
--
Libguestfs Debian packaging
More information about the Pkg-libvirt-commits
mailing list