| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
| |
(cherry picked from commit 0721464b83915fbfae6d6a9da787f5069b2c6d6a)
|
|
|
|
|
|
|
|
|
| |
(RHBZ#801298).
Error: USE_AFTER_FREE:
/builddir/build/BUILD/libguestfs-1.16.5/src/inspect_apps.c:392: freed_arg: "fclose" frees "fp".
/builddir/build/BUILD/libguestfs-1.16.5/src/inspect_apps.c:404: deref_arg: Calling "fclose" dereferences freed pointer "fp".
(cherry picked from commit 270daae52b6a96b4d05cbe03e0b31a0b2e4ac1ae)
|
|
|
|
|
|
|
| |
Error: USE_AFTER_FREE:
/builddir/build/BUILD/libguestfs-1.16.5/src/dbdump.c:132: freed_arg: "pclose" frees "pp".
/builddir/build/BUILD/libguestfs-1.16.5/src/dbdump.c:142: deref_arg: Calling "pclose" dereferences freed pointer "pp".
(cherry picked from commit 3f3b08a6bc610ca0886e02972257dfcb633a9d40)
|
|
|
|
|
|
|
|
|
|
| |
Error: UNINIT:
/builddir/build/BUILD/libguestfs-1.16.5/daemon/glob.c:32: var_decl: Declaring variable "buf" without initializer.
/builddir/build/BUILD/libguestfs-1.16.5/daemon/glob.c:36: uninit_use_in_call: Using uninitialized value "buf.gl_offs" when calling "rpl_glob".
/builddir/build/BUILD/libguestfs-1.16.5/gnulib/lib/glob.c:557: read_parm_fld: Reading a parameter field.
/builddir/build/BUILD/libguestfs-1.16.5/daemon/glob.c:36: uninit_use_in_call: Using uninitialized value "buf.gl_pathc" when calling "rpl_glob".
/builddir/build/BUILD/libguestfs-1.16.5/gnulib/lib/glob.c:557: read_parm_fld: Reading a parameter field.
(cherry picked from commit b2c1d8be39d4689267ef7e4188e2cf936b30628f)
|
|
|
|
| |
(cherry picked from commit 3345444cccfe2e2fb07d4769d1e764eca59dd6f9)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The Coverity error is this (which I think is wrong):
Error: TAINTED_SCALAR:
/builddir/build/BUILD/libguestfs-1.16.5/daemon/inotify.c:211: tainted_data_argument: Calling function "read" taints argument "inotify_buf".
/builddir/build/BUILD/libguestfs-1.16.5/daemon/inotify.c:232: var_assign_var: Assigning: "event" = "(struct inotify_event *)&inotify_buf[n]". Both are now tainted.
/builddir/build/BUILD/libguestfs-1.16.5/daemon/inotify.c:258: lower_bounds: Checking lower bounds of unsigned scalar "event->len" by "event->len > 0U".
/builddir/build/BUILD/libguestfs-1.16.5/daemon/inotify.c:272: var_assign_var: Compound assignment involving tainted variable "16UL + event->len" to variable "n" taints "n".
/builddir/build/BUILD/libguestfs-1.16.5/daemon/inotify.c:228: lower_bounds: Checking lower bounds of unsigned scalar "n" by "n < inotify_posn".
/builddir/build/BUILD/libguestfs-1.16.5/daemon/inotify.c:281: tainted_data: Using tainted variable "n" as an index into an array "inotify_buf".
Adding a sanity check of event->len is prudent.
(cherry picked from commit ae0f9f149b2b527b924d4532aa38302056d8a6b0)
|
|
|
|
|
|
|
|
|
| |
Error: RESOURCE_LEAK:
/builddir/build/BUILD/libguestfs-1.16.5/daemon/debug.c:469: open_fn: Calling opening function "open".
/builddir/build/BUILD/libguestfs-1.16.5/daemon/debug.c:469: var_assign: Assigning: "fd" = handle returned from "open("/proc/sys/kernel/core_pattern", 1)".
/builddir/build/BUILD/libguestfs-1.16.5/daemon/debug.c:474: noescape: Variable "fd" is not closed or saved in function "write".
/builddir/build/BUILD/libguestfs-1.16.5/daemon/debug.c:476: leaked_handle: Handle variable "fd" going out of scope leaks the handle.
(cherry picked from commit 3b3d9ca4e1fa0a4f566cb2a8008540ee640b738b)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This also includes some tidying up of the generated code.
Error: RESOURCE_LEAK:
/builddir/build/BUILD/libguestfs-1.16.5/fish/cmds.c:13254: alloc_fn: Calling allocation function "parse_string_list".
/builddir/build/BUILD/libguestfs-1.16.5/fish/fish.c:1386: alloc_fn: Storage is returned from allocation function "realloc".
/builddir/build/BUILD/libguestfs-1.16.5/fish/fish.c:1386: var_assign: Assigning: "argv_new" = "realloc(argv, 8UL * argv_len)".
/builddir/build/BUILD/libguestfs-1.16.5/fish/fish.c:1392: var_assign: Assigning: "argv" = "argv_new".
/builddir/build/BUILD/libguestfs-1.16.5/fish/fish.c:1396: return_alloc: Returning allocated memory "argv".
/builddir/build/BUILD/libguestfs-1.16.5/fish/cmds.c:13254: var_assign: Assigning: "devices" = storage returned from "parse_string_list(argv[i++])".
/builddir/build/BUILD/libguestfs-1.16.5/fish/cmds.c:13271: leaked_storage: Variable "devices" going out of scope leaks the storage it points to.
/builddir/build/BUILD/libguestfs-1.16.5/fish/cmds.c:13288: leaked_storage: Variable "devices" going out of scope leaks the storage it points to.
/builddir/build/BUILD/libguestfs-1.16.5/fish/cmds.c:13293: leaked_storage: Variable "devices" going out of scope leaks the storage it points to.
/builddir/build/BUILD/libguestfs-1.16.5/fish/cmds.c:13311: leaked_storage: Variable "devices" going out of scope leaks the storage it points to.
/builddir/build/BUILD/libguestfs-1.16.5/fish/cmds.c:13316: leaked_storage: Variable "devices" going out of scope leaks the storage it points to.
/builddir/build/BUILD/libguestfs-1.16.5/fish/cmds.c:13334: leaked_storage: Variable "devices" going out of scope leaks the storage it points to.
/builddir/build/BUILD/libguestfs-1.16.5/fish/cmds.c:13349: leaked_storage: Variable "devices" going out of scope leaks the storage it points to.
/builddir/build/BUILD/libguestfs-1.16.5/fish/cmds.c:13355: leaked_storage: Variable "devices" going out of scope leaks the storage it points to.
(cherry picked from commit 4dd26c28a3786f756c20f204488bfbcfc5e75309)
|
|
|
|
|
|
|
|
|
|
| |
Error: RESOURCE_LEAK:
/builddir/build/BUILD/libguestfs-1.16.5/src/proto.c:894: open_fn: Calling opening function "open".
/builddir/build/BUILD/libguestfs-1.16.5/src/proto.c:894: var_assign: Assigning: "fd" = handle returned from "open(filename, 0)".
/builddir/build/BUILD/libguestfs-1.16.5/src/proto.c:903: noescape: Variable "fd" is not closed or saved in function "read".
/builddir/build/BUILD/libguestfs-1.16.5/src/proto.c:911: leaked_handle: Handle variable "fd" going out of scope leaks the handle.
/builddir/build/BUILD/libguestfs-1.16.5/src/proto.c:918: leaked_handle: Handle variable "fd" going out of scope leaks the handle.
(cherry picked from commit d0453c02545c825810fec6e5874c55d7ac5ec678)
|
|
|
|
|
|
|
|
|
| |
Error: RESOURCE_LEAK:
/builddir/build/BUILD/libguestfs-1.16.5/daemon/upload.c:225: open_fn: Calling opening function "open".
/builddir/build/BUILD/libguestfs-1.16.5/daemon/upload.c:225: var_assign: Assigning: "fd" = handle returned from "open(filename, 0)".
/builddir/build/BUILD/libguestfs-1.16.5/daemon/upload.c:233: noescape: Variable "fd" is not closed or saved in function "lseek".
/builddir/build/BUILD/libguestfs-1.16.5/daemon/upload.c:235: leaked_handle: Handle variable "fd" going out of scope leaks the handle.
(cherry picked from commit fbf10d7f682178a6a71cfa8dbac2acd23f869597)
|
|
|
|
|
|
|
|
|
|
| |
Error: RESOURCE_LEAK:
/builddir/build/BUILD/libguestfs-1.16.5/daemon/9p.c:130: open_fn: Calling opening function "open".
/builddir/build/BUILD/libguestfs-1.16.5/daemon/9p.c:130: var_assign: Assigning: "fd" = handle returned from "open(filename, 0)".
/builddir/build/BUILD/libguestfs-1.16.5/daemon/9p.c:142: leaked_handle: Handle variable "fd" going out of scope leaks the handle.
/builddir/build/BUILD/libguestfs-1.16.5/daemon/9p.c:149: noescape: Variable "fd" is not closed or saved in function "read".
/builddir/build/BUILD/libguestfs-1.16.5/daemon/9p.c:153: leaked_handle: Handle variable "fd" going out of scope leaks the handle.
(cherry picked from commit cba36e730524525b5fc1c0df2ec3dd878d55ff15)
|
|
|
|
|
|
|
|
|
|
| |
Error: RESOURCE_LEAK:
/builddir/build/BUILD/libguestfs-1.16.5/src/proto.c:1125: open_fn: Calling opening function "open".
/builddir/build/BUILD/libguestfs-1.16.5/src/proto.c:1125: var_assign: Assigning: "fd" = handle returned from "open(filename, 833, 438)".
/builddir/build/BUILD/libguestfs-1.16.5/src/proto.c:1133: noescape: Variable "fd" is not closed or saved in function "xwrite".
/builddir/build/BUILD/libguestfs-1.16.5/src/proto.c:1146: leaked_handle: Handle variable "fd" going out of scope leaks the handle.
/builddir/build/BUILD/libguestfs-1.16.5/src/proto.c:1173: leaked_handle: Handle variable "fd" going out of scope leaks the handle.
(cherry picked from commit 855aaf414af3b8c8ca1f722a589fd251cc8317ee)
|
|
|
|
|
|
|
|
|
|
| |
Error: NULL_RETURNS:
/builddir/build/BUILD/libguestfs-1.16.5/examples/virt-dhcp-address.c:129: var_assigned: Assigning: "guest_distro" = null return value from "guestfs_inspect_get_distro".
/builddir/build/BUILD/libguestfs-1.16.5/examples/virt-dhcp-address.c:131: dereference: Dereferencing a pointer that might be null "guest_distro" when calling "__coverity_strcmp".
[...]
/builddir/build/BUILD/libguestfs-1.16.5/examples/virt-dhcp-address.c:126: var_assigned: Assigning: "guest_type" = null return value from "guestfs_inspect_get_type".
/builddir/build/BUILD/libguestfs-1.16.5/examples/virt-dhcp-address.c:128: dereference: Dereferencing a pointer that might be null "guest_type" when calling "__coverity_strcmp".
(cherry picked from commit 618954a6b0adc3e0eacda799b88f020c801a0106)
|
|
|
|
|
|
|
|
|
|
|
|
| |
Error: NULL_RETURNS:
/builddir/build/BUILD/libguestfs-1.16.5/src/inspect.c:417: returned_null: Function "calloc" returns null (checked 67 out of 81 times).
/builddir/build/BUILD/libguestfs-1.16.5/src/inspect.c:417: var_assigned: Assigning: "ret" = null return value from "calloc".
/builddir/build/BUILD/libguestfs-1.16.5/src/inspect.c:418: dereference: Dereferencing a null pointer "ret".
[...]
/builddir/build/BUILD/libguestfs-1.16.5/src/inspect.c:374: returned_null: Function "calloc" returns null (checked 67 out of 81 times).
/builddir/build/BUILD/libguestfs-1.16.5/src/inspect.c:374: var_assigned: Assigning: "ret" = null return value from "calloc".
/builddir/build/BUILD/libguestfs-1.16.5/src/inspect.c:375: dereference: Dereferencing a null pointer "ret".
(cherry picked from commit 35d5be22b1c09c3a99b445f65453601ec25b9f60)
|
|
|
|
|
|
|
|
|
| |
Error: DEADCODE:
/builddir/build/BUILD/libguestfs-1.16.5/fish/event-names.c:65: dead_error_condition: On this path, the condition "comma" cannot be true.
/builddir/build/BUILD/libguestfs-1.16.5/fish/event-names.c:57: const: After this line, the value of "comma" is equal to 0.
/builddir/build/BUILD/libguestfs-1.16.5/fish/event-names.c:57: assignment: Assigning: "comma" = "0".
/builddir/build/BUILD/libguestfs-1.16.5/fish/event-names.c:65: dead_error_line: Execution cannot reach this statement "fputc(44, fp);".
(cherry picked from commit 0ffa223a75fe4b5b077e4ec68534155039772c3a)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Remove dead code; however only comment it out since if we change the
preceeding code we may need this line again.
Error: DEADCODE:
/builddir/build/BUILD/libguestfs-1.16.5/src/listfs.c:107: dead_error_condition: On this path, the condition "lvs" cannot be true.
/builddir/build/BUILD/libguestfs-1.16.5/src/listfs.c:54: const: After this line, the value of "lvs" is equal to 0.
/builddir/build/BUILD/libguestfs-1.16.5/src/listfs.c:91: const: After this line, the value of "lvs" is equal to 0.
/builddir/build/BUILD/libguestfs-1.16.5/src/listfs.c:54: assignment: Assigning: "lvs" = "NULL".
/builddir/build/BUILD/libguestfs-1.16.5/src/listfs.c:91: new_values: Noticing condition "lvs == NULL".
/builddir/build/BUILD/libguestfs-1.16.5/src/listfs.c:107: dead_error_line: Execution cannot reach this statement "guestfs___free_string_list(...".
(cherry picked from commit 109d3ad34aac8d50a1c02437928a64d9bad9f1a6)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Error: CHECKED_RETURN:
/builddir/build/BUILD/libguestfs-1.16.5/java/com_redhat_et_libguestfs_GuestFS.c:9552: example_assign: Assigning: "r" = return value from "guestfs_internal_autosync(g)".
/builddir/build/BUILD/libguestfs-1.16.5/java/com_redhat_et_libguestfs_GuestFS.c:9555: example_checked: "r" has its value checked in "r == -1".
/builddir/build/BUILD/libguestfs-1.16.5/ocaml/guestfs_c_actions.c:5584: example_assign: Assigning: "r" = return value from "guestfs_internal_autosync(g)".
/builddir/build/BUILD/libguestfs-1.16.5/ocaml/guestfs_c_actions.c:5586: example_checked: "r" has its value checked in "r == -1".
/builddir/build/BUILD/libguestfs-1.16.5/perl/Guestfs.xs:5990: example_assign: Assigning: "r" = return value from "guestfs_internal_autosync(g)".
/builddir/build/BUILD/libguestfs-1.16.5/perl/Guestfs.xs:5991: example_checked: "r" has its value checked in "r == -1".
/builddir/build/BUILD/libguestfs-1.16.5/python/guestfs-py.c:13702: example_assign: Assigning: "r" = return value from "guestfs_internal_autosync(g)".
/builddir/build/BUILD/libguestfs-1.16.5/python/guestfs-py.c:13707: example_checked: "r" has its value checked in "r == -1".
/builddir/build/BUILD/libguestfs-1.16.5/ruby/ext/guestfs/_guestfs.c:16000: example_assign: Assigning: "r" = return value from "guestfs_internal_autosync(g)".
/builddir/build/BUILD/libguestfs-1.16.5/ruby/ext/guestfs/_guestfs.c:16001: example_checked: "r" has its value checked in "r == -1".
/builddir/build/BUILD/libguestfs-1.16.5/src/guestfs.c:191: check_return: Calling function "guestfs_internal_autosync" without checking return value (as is done elsewhere 5 out of 6 times).
/builddir/build/BUILD/libguestfs-1.16.5/src/guestfs.c:191: unchecked_value: No check of the return value of "guestfs_internal_autosync(g)".
(cherry picked from commit 07a8c3c0c25974e0b9496966a7a1354be9ee844f)
|
|
|
|
| |
(cherry picked from commit 10f240a07f156493eb0540a95f9a3deba36c6862)
|
|
|
|
| |
(cherry picked from commit 4504f424f5589f81086f5250674b55708e162e5f)
|
|
|
|
| |
(cherry picked from commit 4d8ae8f5a2e309a6a518fdb0b6f65685aa9137e0)
|
|
|
|
|
| |
This program is noisy on stderr. Send that to /dev/null.
(cherry picked from commit e40f408faeea204417bc46024590a07272eeda92)
|
|
|
|
|
|
|
|
|
| |
Netpbm and icoutils (wrestool) have always been dependencies. Since
they are not always present, make these into optional dependencies
(which they were, sort of, before).
Also document these dependencies in the README file.
(cherry picked from commit 2c9c0525ebda105f37e6a6eea2307db4cb2f0a73)
|
|
|
|
| |
(cherry picked from commit b106dda97c9e18563bb27a44a025016fef6dec97)
|
| |
|
|
|
|
|
|
|
| |
Function guestfs_mkdtemp uses c++ keyword "template" as a parameter
name. In result, attempt to use guestfs.h header in c++ program
results in compile error.
(cherry picked from commit 49611f121fa10d1497e46ab9aa6a7448cb89cd86)
|
| |
|
|
|
|
|
| |
I have checked, and this works with Ruby 1.8 as well.
(cherry picked from commit 3b78b3a8496cdd66567b6f433206273966858e74)
|
|
|
|
|
|
|
|
|
|
|
| |
This is just the 'kernel', 'initrd' and 'root' files, copied from one
machine to another, along with a 'README.fixed' file which is also
used for identification.
This allows the appliance to be copied from one machine to another,
making it easier for us to distribute a starter appliance for people
who cannot get febootstrap or appliance-building working.
(cherry picked from commit 5e8a4627d9f0d313485f186a63dc2250f6fd5c01)
|
|
|
|
|
| |
This is just code motion.
(cherry picked from commit 49726b9269490e331e740d55952da87552ca2500)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
--20cf303ea4a84a7a7c04ba331375
Content-Type: text/plain; charset=ISO-8859-1
Hello Richard,
I found what the problem was and the udev symlinks where not created. The
init script in the appliance uses a full paths for udevadm (/sbin/udevadm)
which in my case was wrong. In Arch Linux udevadm is hosted under /usr/bin,
not /sbin. When I fixed this, libguestfs was able to communicate with the
appliance VM.
Since PATH variable is defined and exported in init, there is no need in
using full paths for external programs. As far as I've seen this affects
all the git branches in libguestfs's repository. Please find attached a
patch for the master branch.
Nikos Skalkotos,
Athens, Greece
On 24 February 2012 10:25, Richard W.M. Jones <rjones@redhat.com> wrote:
> On Thu, Feb 23, 2012 at 08:50:12PM +0200, Nikos Skalkotos wrote:
> [...]
>
> I don't know specifically why it fails with ArchLinux, but the problem
> is caused by the /dev/virtio-ports/* symlinks not getting created by
> udev.
>
> /dev/vport0p1 exists:
>
> > crw------- 1 root root 252, 1 Feb 23 18:17 vport0p1
>
> but udev doesn't make the corresponding /dev/virtio-ports symlink:
>
> > /dev/virtio-ports/org.libguestfs.channel.0: No such file or directory
>
> The symlink is supposed to be created by this udev rule:
>
> /lib/udev/rules.d/50-udev-default.rules:KERNEL=="vport*",
> ATTR{name}=="?*", SYMLINK+="virtio-ports/$attr{name}"
>
> So I'd start by looking to see if that rule exists in the udev rules
> that Arch is using. Secondly if it does exist, is the corresponding
> *.rules being copied into the appliance? (Check appliance/supermin.d/
> hostfiles)
>
> In an old Ubuntu that has udev that predates having this rule, we add
> the following patch:
>
>
> http://libguestfs.org/download/binaries/ubuntu1004-packages/0002-ubuntu-10.04-Use-dev-vport0p1.patch
>
> Rich.
>
> --
> Richard Jones, Virtualization Group, Red Hat
> http://people.redhat.com/~rjones
> virt-p2v converts physical machines to virtual machines. Boot with a
> live CD or over the network (PXE) and turn machines into Xen guests.
> http://et.redhat.com/~rjones/virt-p2v
>
Hello Richard,<br><br>I found what the problem was and the udev symlinks where not created. The init script in the appliance uses a full paths for udevadm (/sbin/udevadm) which in my case was wrong. In Arch Linux udevadm is hosted under /usr/bin, not /sbin. When I fixed this, libguestfs was able to communicate with the appliance VM.<br>
<br>Since PATH variable is defined and exported in init, there is no need in using full paths for external programs. As far as I've seen this affects all the git branches in libguestfs's repository. Please find attached a patch for the master branch.<br>
<br>Nikos Skalkotos,<br>Athens, Greece<br><br><div class="gmail_quote">On 24 February 2012 10:25, Richard W.M. Jones <span dir="ltr"><<a href="mailto:rjones@redhat.com">rjones@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On Thu, Feb 23, 2012 at 08:50:12PM +0200, Nikos Skalkotos wrote:<br>
[...]<br>
<br>
I don't know specifically why it fails with ArchLinux, but the problem<br>
is caused by the /dev/virtio-ports/* symlinks not getting created by<br>
udev.<br>
<br>
/dev/vport0p1 exists:<br>
<div class="im"><br>
> crw------- 1 root root 252, 1 Feb 23 18:17 vport0p1<br>
<br>
</div>but udev doesn't make the corresponding /dev/virtio-ports symlink:<br>
<div class="im"><br>
> /dev/virtio-ports/org.libguestfs.channel.0: No such file or directory<br>
<br>
</div>The symlink is supposed to be created by this udev rule:<br>
<br>
/lib/udev/rules.d/50-udev-default.rules:KERNEL=="vport*", ATTR{name}=="?*", SYMLINK+="virtio-ports/$attr{name}"<br>
<br>
So I'd start by looking to see if that rule exists in the udev rules<br>
that Arch is using. Secondly if it does exist, is the corresponding<br>
*.rules being copied into the appliance? (Check appliance/supermin.d/<br>
hostfiles)<br>
<br>
In an old Ubuntu that has udev that predates having this rule, we add<br>
the following patch:<br>
<br>
<a href="http://libguestfs.org/download/binaries/ubuntu1004-packages/0002-ubuntu-10.04-Use-dev-vport0p1.patch" target="_blank">http://libguestfs.org/download/binaries/ubuntu1004-packages/0002-ubuntu-10.04-Use-dev-vport0p1.patch</a><br>
<br>
Rich.<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
Richard Jones, Virtualization Group, Red Hat <a href="http://people.redhat.com/%7Erjones%0Avirt-p2v" target="_blank">http://people.redhat.com/~rjones<br>
virt-p2v</a> converts physical machines to virtual machines. Boot with a<br>
live CD or over the network (PXE) and turn machines into Xen guests.<br>
<a href="http://et.redhat.com/%7Erjones/virt-p2v" target="_blank">http://et.redhat.com/~rjones/virt-p2v</a><br>
</font></span></blockquote></div><br>
(cherry picked from commit ba468e9c5ecb32046299dd69a6e045f2aa7ba982)
|
| |
|
|
|
|
|
| |
Update the test to use the --format and --output-format flags.
(cherry picked from commit 88ba4da4d6c07762fc95c96ea67019f0ebf4677c)
|
|
|
|
|
| |
(Thanks Grant Williamson for finding and fixing this problem)
(cherry picked from commit a93d4a9dc1aea6940886c85d4b09f21cbfc80969)
|
|
|
|
|
|
| |
tracker-miner-fs jumps into newly mounted filesystems. This prevents
the filesystem from being unmounted, so retry a few times.
(cherry picked from commit 5fa7aace200a49961173de6316a81e239987c179)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Appliance building can be called from multiple processes, but this is
only safe if each process holds a lock on the 'checksum' file.
However threads within a process are not excluded by a file lock, and
so this strategy completely failed for a multithreaded program calling
guestfs_launch in parallel.
Since it makes no sense for threads in a single program to race each
other to try to create the appliance, add a lock around appliance
building.
This serialises building the appliance, but the rest of guestfs_launch
(eg. starting up qemu) can run in parallel.
(cherry picked from commit afed7e493dcd594620f19b93e9fb73e58553f60a)
|
|
|
|
| |
(cherry picked from commit c9ea94810e2f7a5fcce2a7136eb07ce795f49c53)
|
|
|
|
| |
(cherry picked from commit 6a70cb337cff736831b51bbc9c4331785d756c20)
|
| |
|
|
|
|
|
|
| |
Test all the ways that the 'mount' command can fail. Ensure that none
of them result in failures or desynchronization.
(cherry picked from commit cd06ddf4422a31528f4a268dad813938947e1a0d)
|
|
|
|
|
|
|
|
|
|
| |
rhbz727178.sh exists, but historically was never added to the list of
tests, so it doesn't run. Create a special variable for this test and
ensure it is added to EXTRA_DIST.
Test was originally added in
commit d7356a2801130907997acd5c7502e8417566e782.
(cherry picked from commit 1b15e543a8efee027451dcfb68743d35eda95dfc)
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(RHBZ#789960).
In the case where the caller attempts to mount the "hidden"
appliance root device (eg. /dev/vdb if /dev/vda is the only
normal block device added), we were calling reply_with_error
but not actually returning immediately, resulting in protocol
desynchronization.
This commit fixes this obvious mistake.
(cherry picked from commit 07081591cf9928454148db84828da8a7f39b6c6f)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
For stubs of functions that had arguments, code did this:
static void
mount_stub (XDR *xdr_in)
{
int r;
struct guestfs_mount_args args;
if (optargs_bitmask != 0) {
//...
goto done;
}
// possibly other tests here
memset (&args, 0, sizeof args);
[...]
done:
xdr_free ((xdrproc_t) xdr_guestfs_mount_args, (char *) &args);
return;
}
This caused xdr_free to be called on uninitialized 'args' struct,
causing a segfault.
The fix is to add another label, so the code looks like:
static void
mount_stub (XDR *xdr_in)
{
int r;
struct guestfs_mount_args args;
if (optargs_bitmask != 0) {
//...
goto done_no_free;
}
// possibly other tests here
memset (&args, 0, sizeof args);
[...]
done:
xdr_free ((xdrproc_t) xdr_guestfs_mount_args, (char *) &args);
done_no_free:
return;
}
This fixes commit 330fbea5b2d6bd7db84f7ea7afe87cf1bcd438e0
and commit 0344248af55802bbbd816b349ec1ba9305996f6e.
(cherry picked from commit ba443ae0486ae30ea597c4e126de63371f8fa7a8)
|
|
|
|
| |
(cherry picked from commit c8a11468c4dc761acdcb9b184d345bafe1b5114d)
|
| |
|
|
|
|
| |
(cherry picked from commit badf2d6c4d2c2a3e12bad4dcbd5854401156bb5f)
|
|
|
|
|
|
| |
files (RHBZ#788641).
(cherry picked from commit 7c21e49c2c83092e9fd5f40c43a03c764a6d3663)
|
|
|
|
|
|
|
|
| |
If the upload fails, this means we don't leave a partially
written file.
Also add a test for the edit command.
(cherry picked from commit ddae5abf80f65fc149eec253f14f073d397b49c2)
|
|
|
|
|
| |
This is just code motion.
(cherry picked from commit ca80e4490463d646de4504fc2bcb4e4a722bedb8)
|
|
|
|
| |
(cherry picked from commit 39625b59ee5aeecfb855575abb939934216eeff2)
|