libguestfs.git
12 years agodaemon: debug segv correct use of dereferencing NULL. master
Richard W.M. Jones [Mon, 9 Jan 2012 16:55:49 +0000 (16:55 +0000)]
daemon: debug segv correct use of dereferencing NULL.

12 years agolaunch: move the filename checking to a wrapper
Wanlong Gao [Mon, 9 Jan 2012 12:53:24 +0000 (20:53 +0800)]
launch: move the filename checking to a wrapper

Move the filename's comma character checking to a wrapper.

Signed-off-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>
12 years agolaunch: don't add a drive twice
Wanlong Gao [Mon, 9 Jan 2012 07:22:43 +0000 (15:22 +0800)]
launch: don't add a drive twice

1. Change the g->path to restore a absolute path instead of the mixed.
2. Check that if the adding drive is duplicated with the added drive.

Signed-off-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>
RWMJ:

- Make sure abs_path is NULL before it is assigned, so freeing it
  will work along the error path.

- Fix the test which added /dev/null multiple times.

12 years agogenerator: Create a separate type for optional arguments
Matthew Booth [Mon, 9 Jan 2012 10:16:35 +0000 (10:16 +0000)]
generator: Create a separate type for optional arguments

Previously, optional arguments had the same type as regular arguments, but were
constrained by various runtime tests to be only Bool, Int, Int64 or String. This
change makes the type of optional arguments stronger by giving them their own
type.

A convenience function, optargs_to_args is defined to convert optargs in the few
places where they are genuinely treated identically to mandatory arguments.

It also allows for future changes to optional arguments which do not affect
mandatory arguments.

RWMJ:
 - removed redundant parens
 - readded the check for > 64 optargs, but changed it to > 63
 - changed the new function to args_of_optargs

12 years agogenerator: Rename java_structs to camel_structs to better reflect their purpose
Matthew Booth [Mon, 9 Jan 2012 10:16:34 +0000 (10:16 +0000)]
generator: Rename java_structs to camel_structs to better reflect their purpose

This map was originally included just for the java bindings, but is generally
useful to any binding which uses camel case by requirement or convention.

12 years agolaunch: add a goto label when add_drive error
Wanlong Gao [Mon, 9 Jan 2012 07:22:42 +0000 (15:22 +0800)]
launch: add a goto label when add_drive error

Code cleanup.
Add a goto label to simplify the code.

Signed-off-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>
12 years agoVersion 1.15.15. 1.15.15
Richard W.M. Jones [Sun, 8 Jan 2012 19:12:46 +0000 (19:12 +0000)]
Version 1.15.15.

12 years agodebian: Add build-dep erlang-dev.
Richard W.M. Jones [Fri, 6 Jan 2012 21:08:25 +0000 (21:08 +0000)]
debian: Add build-dep erlang-dev.

12 years agoUpdate to latest gnulib.
Richard W.M. Jones [Fri, 6 Jan 2012 18:44:41 +0000 (18:44 +0000)]
Update to latest gnulib.

12 years agoTempora mutantur, nos et mutamur in illis.
Matthew Booth [Wed, 4 Jan 2012 11:15:24 +0000 (11:15 +0000)]
Tempora mutantur, nos et mutamur in illis.

12 years agobuild: Fix automake warnings
Matthew Booth [Wed, 4 Jan 2012 09:56:16 +0000 (09:56 +0000)]
build: Fix automake warnings

12 years agoSort .gitignore (using sort -d -- dictionary order).
Richard W.M. Jones [Wed, 4 Jan 2012 10:16:29 +0000 (10:16 +0000)]
Sort .gitignore (using sort -d -- dictionary order).

12 years agogitignore: ignore the git related files
Wanlong Gao [Fri, 30 Dec 2011 08:10:50 +0000 (16:10 +0800)]
gitignore: ignore the git related files

*.eml for email picked patches
other for orginal git patch related files.

Signed-off-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>
12 years agofish: fix the Ctrl-\ causes guestfish to abort bug(RHBZ#596761)
Wanlong Gao [Wed, 28 Dec 2011 09:59:38 +0000 (17:59 +0800)]
fish: fix the Ctrl-\ causes guestfish to abort bug(RHBZ#596761)

Handle SIGQUIT by guestfish, so that it can't be terminated.

Signed-off-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>
12 years agoAUTHORS: add the email address for each authors
Wanlong Gao [Tue, 3 Jan 2012 15:41:43 +0000 (23:41 +0800)]
AUTHORS: add the email address for each authors

Add the email address for authors.
It would be better.

Signed-off-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>
12 years agofish: mount can be used instead of mount-options with libguestfs >= 1.14
Richard W.M. Jones [Fri, 23 Dec 2011 22:30:29 +0000 (22:30 +0000)]
fish: mount can be used instead of mount-options with libguestfs >= 1.14

12 years agofish: Fix --format parameter in man page.
Richard W.M. Jones [Fri, 23 Dec 2011 22:30:09 +0000 (22:30 +0000)]
fish: Fix --format parameter in man page.

12 years agoVersion 1.15.14. 1.15.14
Richard W.M. Jones [Fri, 23 Dec 2011 13:26:31 +0000 (13:26 +0000)]
Version 1.15.14.

12 years agolib: Try harder to remove temporary directory along error paths (RHBZ#769680).
Richard W.M. Jones [Fri, 23 Dec 2011 10:37:04 +0000 (10:37 +0000)]
lib: Try harder to remove temporary directory along error paths (RHBZ#769680).

12 years agolib: Add guestfs___remove_tmpdir helper function.
Richard W.M. Jones [Fri, 23 Dec 2011 10:33:25 +0000 (10:33 +0000)]
lib: Add guestfs___remove_tmpdir helper function.

This function does 'rm -rf <dir>' for temporary directories, safely
working if '<dir>' contains shell meta-characters.

Replace existing code for removing directories with this.

12 years agogitignore: ignore the guestfs.* directory
Wanlong Gao [Fri, 23 Dec 2011 06:54:04 +0000 (14:54 +0800)]
gitignore: ignore the guestfs.* directory

Let git ignore the guestfs.* directorys.

Signed-off-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>
12 years agoextra-tests: add test-guests to prevent test error
Wanlong Gao [Fri, 23 Dec 2011 03:46:21 +0000 (11:46 +0800)]
extra-tests: add test-guests to prevent test error

extra-tests is depending on tests-guests.
We need guests/*.img when doing extra-tests.

/work/git/libguestfs/run valgrind --log-file=/work/git/libguestfs/tests/extra/valgrind.log --leak-check=full --error-exitcode=119 --suppressions=/work/git/libguestfs/tests/extra/suppressions ../../cat/virt-cat -a ../guests/fedora.img /etc/fstab >/dev/null
../guests/fedora.img: No such file or directory
make[1]: *** [test-tools-internal] Error 1
make[1]: Leaving directory `/work/git/libguestfs/tests/extra'

Signed-off-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>
12 years agofish: Fix test-guestfish-events.sh so it works when LIBGUESTFS_DEBUG=1 is set.
Richard W.M. Jones [Fri, 23 Dec 2011 08:28:26 +0000 (08:28 +0000)]
fish: Fix test-guestfish-events.sh so it works when LIBGUESTFS_DEBUG=1 is set.

Various messages were added and changed when this variable was set
while tests were running.

12 years agomkfs: optimization and code cleanup
Wanlong Gao [Wed, 14 Dec 2011 09:40:56 +0000 (17:40 +0800)]
mkfs: optimization and code cleanup

v1->v2: fix a typo pointed by Matt

Optimizations by reducing the STREQ operations and do some
code cleanup.

Signed-off-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>
RWMJ: Whitespace changes.

12 years agotests/lvm: Contains a Perl test so we must set PERL5LIB.
Richard W.M. Jones [Thu, 22 Dec 2011 22:17:17 +0000 (22:17 +0000)]
tests/lvm: Contains a Perl test so we must set PERL5LIB.

This fixes commit 498758faee6be7e989869bf7feba5e1026a1bb65.

12 years agotests/protocol: Contains a Perl test so we must set PERL5LIB.
Richard W.M. Jones [Thu, 22 Dec 2011 19:12:14 +0000 (19:12 +0000)]
tests/protocol: Contains a Perl test so we must set PERL5LIB.

This fixes commit 498758faee6be7e989869bf7feba5e1026a1bb65.

12 years agoVersion 1.15.13. 1.15.13
Richard W.M. Jones [Thu, 22 Dec 2011 18:34:22 +0000 (18:34 +0000)]
Version 1.15.13.

12 years agoSecurity: Mitigate possible privilege escalation via SG_IO ioctl (CVE-2011-4127,...
Richard W.M. Jones [Thu, 22 Dec 2011 17:56:47 +0000 (17:56 +0000)]
Security: Mitigate possible privilege escalation via SG_IO ioctl (CVE-2011-4127, RHBZ#757071)

CVE-2011-4127 is a serious qemu & kernel privilege escalation bug
found by Paolo Bonzini.

http://seclists.org/oss-sec/2011/q4/536

An untrusted guest kernel is able to issue special SG_IO ioctls on
virtio devices which qemu passes through to the host kernel without
filtering or sanitizing.  These ioctls allow raw sectors from the
underlying host device to be read and written.  Significantly, neither
qemu nor the host kernel checks that the range of sectors is within
the partition / LV assigned to the guest.  For example, if the guest
is assigned host partition /dev/sda3, it would be able to read or
write any part of /dev/sda including other partitions and the boot
sector.  Exploits through LVs passed to the guest are also possible,
with some limitations.  File-backed virtual block devices are not
vulnerable.  Non-virtio block devices are not vulnerable.

This patch mitigates the problem by disabling the SG_IO ioctl
passthrough in qemu.  Thus if libguestfs is examining an untrusted
guest and the libguestfs appliance/daemon is compromised (eg. by
executing guest commands, or through some other compromise), then the
compromised appliance will not be able to issue the above SG_IO ioctls
and exploit the host.

Note that this is just mitigation for libguestfs.  Users will still
want to fully update their host kernel, qemu/KVM and libvirt, in order
to prevent other (non-libguestfs) routes to compromise.

The following versions of libguestfs (will/have) this patch applied.

  libguestfs >= 1.15.13
  libguestfs >= 1.14.8
  libguestfs >= 1.12.11
  libguestfs >= 1.10.12
  libguestfs >= 1.8.16

Earlier versions may be vulnerable unless a downstream packager has
applied this patch.

Cc: Hilko Bengen <bengen@hilluzination.de>
12 years agoFixed checks for libpython features
Hilko Bengen [Sat, 10 Dec 2011 21:16:55 +0000 (22:16 +0100)]
Fixed checks for libpython features

The python3.1 package shipped with Debian/squeeze does not have the
'mu' suffix that was assumed before.

12 years agoVersion 1.15.12. 1.15.12
Richard W.M. Jones [Thu, 22 Dec 2011 16:13:08 +0000 (16:13 +0000)]
Version 1.15.12.

12 years agotests: Add a simple liveness tests for qemu.
Richard W.M. Jones [Thu, 22 Dec 2011 15:09:19 +0000 (15:09 +0000)]
tests: Add a simple liveness tests for qemu.

12 years agotests: Finalize the order we run the tests.
Richard W.M. Jones [Thu, 22 Dec 2011 13:12:43 +0000 (13:12 +0000)]
tests: Finalize the order we run the tests.

12 years agotests: Put test-tool and comment into own section.
Richard W.M. Jones [Thu, 22 Dec 2011 13:05:34 +0000 (13:05 +0000)]
tests: Put test-tool and comment into own section.

12 years agotests: Split images -> tests/data + tests/guests
Richard W.M. Jones [Thu, 22 Dec 2011 12:15:06 +0000 (12:15 +0000)]
tests: Split images -> tests/data + tests/guests

12 years agotests: Rename extratests -> tests/extra.
Richard W.M. Jones [Thu, 22 Dec 2011 12:00:44 +0000 (12:00 +0000)]
tests: Rename extratests -> tests/extra.

12 years agotests: Split regressions -> various subdirectories of tests/
Richard W.M. Jones [Thu, 22 Dec 2011 11:35:43 +0000 (11:35 +0000)]
tests: Split regressions -> various subdirectories of tests/

12 years agotests: Rename capitests -> tests/c-api.
Richard W.M. Jones [Thu, 22 Dec 2011 08:40:30 +0000 (08:40 +0000)]
tests: Rename capitests -> tests/c-api.

12 years agotests: Rename caution -> tests/qemu.
Richard W.M. Jones [Thu, 22 Dec 2011 08:34:57 +0000 (08:34 +0000)]
tests: Rename caution -> tests/qemu.

12 years agotests: Document new tests/ subdirectory.
Richard W.M. Jones [Thu, 22 Dec 2011 08:34:08 +0000 (08:34 +0000)]
tests: Document new tests/ subdirectory.

12 years agodocs: Arrange directory names in alphabetical order.
Richard W.M. Jones [Thu, 22 Dec 2011 08:33:16 +0000 (08:33 +0000)]
docs: Arrange directory names in alphabetical order.

12 years agoextra-tests: Add an extra suppression for OCaml 3.11.2 in RHEL 6.
Richard W.M. Jones [Tue, 20 Dec 2011 18:26:20 +0000 (18:26 +0000)]
extra-tests: Add an extra suppression for OCaml 3.11.2 in RHEL 6.

12 years agofish: Allow events to be processed in guestfish.
Richard W.M. Jones [Wed, 14 Dec 2011 08:38:27 +0000 (08:38 +0000)]
fish: Allow events to be processed in guestfish.

Add 'event', 'list-events' and 'delete-event' commands so that event
handlers can be registered, listed and deleted in guestfish.  The
event handler is a shell script snippet or host command.

Cc: Pádraig Brady <P@draigBrady.com>
12 years agopython: Missing () in guestfs-python(1) examples.
Richard W.M. Jones [Wed, 14 Dec 2011 12:07:31 +0000 (12:07 +0000)]
python: Missing () in guestfs-python(1) examples.

12 years agoVersion 1.15.11. 1.15.11
Richard W.M. Jones [Fri, 9 Dec 2011 17:34:01 +0000 (17:34 +0000)]
Version 1.15.11.

12 years agofuse: Return EXIT_FAILURE if fuse_main fails.
Richard W.M. Jones [Fri, 9 Dec 2011 15:30:23 +0000 (15:30 +0000)]
fuse: Return EXIT_FAILURE if fuse_main fails.

fuse_main can return any non-zero value on error.  In particular on
certain sorts of error such as unsupported -o options it returns 1
(not -1).

Therefore make sure any non-zero return is turned into EXIT_FAILURE.

(Thanks Pádraig Brady)

12 years agofish: -i option should fail if / is not mountable, but warn about others.
Richard W.M. Jones [Fri, 9 Dec 2011 09:49:37 +0000 (09:49 +0000)]
fish: -i option should fail if / is not mountable, but warn about others.

In particular this stops a problem with guestmount where if the -i
option half-recognizes the guest OS, it would mount the disk (and
fail, giving only warnings), leaving the mountpoint unusable.

(Thanks Pádraig Brady)

12 years agodaemon: Fix utimens so it doesn't hang on named pipes (RHBZ#761460).
Richard W.M. Jones [Thu, 8 Dec 2011 11:39:58 +0000 (11:39 +0000)]
daemon: Fix utimens so it doesn't hang on named pipes (RHBZ#761460).

This also adds comprehensive tests for utimens on regular files,
directories (RHBZ#761451), named pipes (RHBZ#761460), symbolic links,
block and char devices.

Note that there is a small change in the (previously undefined)
semantics of this call: It now sets the time on a symbolic link
itself, not on what the symbolic link points to.

12 years agodaemon: Allow utimens to work for directories (RHBZ#761451).
Richard W.M. Jones [Thu, 8 Dec 2011 11:15:18 +0000 (11:15 +0000)]
daemon: Allow utimens to work for directories (RHBZ#761451).

You don't need to open the file O_WRONLY in order to call futimens on
the file descriptor.  Opening it O_WRONLY fails for directories.
Therefore open O_RDONLY instead.

12 years agocopy-in/copy-out: Wait for the tar subprocess only (RHBZ#760669).
Richard W.M. Jones [Wed, 7 Dec 2011 12:12:35 +0000 (12:12 +0000)]
copy-in/copy-out: Wait for the tar subprocess only (RHBZ#760669).

12 years agofish: Improve error messages when no OS / multi-boot OS found with inspection (RHBZ...
Richard W.M. Jones [Wed, 7 Dec 2011 11:46:43 +0000 (11:46 +0000)]
fish: Improve error messages when no OS / multi-boot OS found with inspection (RHBZ#760775).

12 years agolet the user explicitly choose ruby and rake programs
Hilko Bengen [Tue, 6 Dec 2011 19:42:11 +0000 (20:42 +0100)]
let the user explicitly choose ruby and rake programs

12 years agoVersion 1.15.10. 1.15.10
Richard W.M. Jones [Tue, 6 Dec 2011 15:10:46 +0000 (15:10 +0000)]
Version 1.15.10.

12 years agoFix rpcgen post-processing for out-of-tree builds
Hilko Bengen [Mon, 5 Dec 2011 17:35:57 +0000 (18:35 +0100)]
Fix rpcgen post-processing for out-of-tree builds

12 years agoruby: Use RSTRING_PTR, RSTRING_LEN for compat with Ruby 1.9 (RHBZ#760000).
Richard W.M. Jones [Mon, 5 Dec 2011 10:36:13 +0000 (10:36 +0000)]
ruby: Use RSTRING_PTR, RSTRING_LEN for compat with Ruby 1.9 (RHBZ#760000).

12 years agoblkid: split the RHEL5 which can't support some options
Wanlong Gao [Mon, 5 Dec 2011 10:06:43 +0000 (18:06 +0800)]
blkid: split the RHEL5 which can't support some options

RHEL5 shoult not support '-p', '-i' and '-o export' options.
But we just split it according to the '-p' option.

Signed-off-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>
12 years agoTODO: remove the implemented command blkid
Wanlong Gao [Mon, 5 Dec 2011 08:57:22 +0000 (16:57 +0800)]
TODO: remove the implemented command blkid

Remove the implemented command blkid from TODO lists.

Signed-off-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>
12 years agoRevert "blkid: Use -c /dev/null because RHEL 5 blkid doesn't have -p option."
Richard W.M. Jones [Sun, 4 Dec 2011 16:47:37 +0000 (16:47 +0000)]
Revert "blkid: Use -c /dev/null because RHEL 5 blkid doesn't have -p option."

This reverts commit 6533491b178d18bfab8240cf093be4ef9b547548.

12 years agoRevert "blkid: Fix mistake in previous commit."
Richard W.M. Jones [Sun, 4 Dec 2011 16:47:29 +0000 (16:47 +0000)]
Revert "blkid: Fix mistake in previous commit."

This reverts commit c48226a5026816b115ab63b50d3601531aff59dc.

12 years agoblkid: Fix mistake in previous commit.
Richard W.M. Jones [Sat, 3 Dec 2011 23:16:00 +0000 (23:16 +0000)]
blkid: Fix mistake in previous commit.

This updates commit 6533491b178d18bfab8240cf093be4ef9b547548.

12 years agoblkid: Use -c /dev/null because RHEL 5 blkid doesn't have -p option.
Richard W.M. Jones [Sat, 3 Dec 2011 22:58:03 +0000 (22:58 +0000)]
blkid: Use -c /dev/null because RHEL 5 blkid doesn't have -p option.

12 years agodaemon: Use pkg-config to locate Augeas CFLAGS / libraries.
Richard W.M. Jones [Sat, 3 Dec 2011 14:34:52 +0000 (14:34 +0000)]
daemon: Use pkg-config to locate Augeas CFLAGS / libraries.

Augeas 0.10 depends on libxml2, so this is now required in the
appliance (in fact, it was already present).

However this exposed two bugs:

(1) In libguestfs we use a home-brewed recipe for Augeas flags,
resulting in this error:
/usr/include/augeas.h:24:25: fatal error: libxml/tree.h: No such file or directory

(2) Augeas's own augeas.pc didn't include the libxml2 flags, so
it was broken.  This requires a patch to Augeas 0.10, see:
https://www.redhat.com/archives/augeas-devel/2011-December/msg00008.html

Change to using pkg-config to detect Augeas.  It is still an optional
library.

12 years agoVersion 1.15.9. 1.15.9
Richard W.M. Jones [Sat, 3 Dec 2011 12:59:27 +0000 (12:59 +0000)]
Version 1.15.9.

12 years agoNEW API: add blkid command to print the attributes of the device
Wanlong Gao [Sat, 3 Dec 2011 09:07:47 +0000 (17:07 +0800)]
NEW API: add blkid command to print the attributes of the device

A NEW API blkid.
It can print the device attributes.
Use it after list-devices, we can list ower devices and the attributes
of each device.
Use it like:
blkid <device>
It's should be a usefull function.

Signed-off-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>
12 years agoextra tests: Test that valgrind and libtool are installed.
Richard W.M. Jones [Fri, 2 Dec 2011 15:03:19 +0000 (15:03 +0000)]
extra tests: Test that valgrind and libtool are installed.

12 years agoinspection: Add a test for MD device mapping in fstab
Matthew Booth [Fri, 2 Dec 2011 14:04:20 +0000 (14:04 +0000)]
inspection: Add a test for MD device mapping in fstab

Check that we properly handle fstab entries of the form /dev/md0 and
/dev/md/foo.

RWMJ: Add a skip to test if the Augeas lens is not available.

12 years agoinspection: Handle MD devices in fstab
Matthew Booth [Fri, 2 Dec 2011 14:04:19 +0000 (14:04 +0000)]
inspection: Handle MD devices in fstab

This patch fixes inspection when fstab contains devices md devices
specified as /dev/mdN. The appliance creates these devices without reference to
the guest's mdadm.conf so, for e.g. /dev/md0 in the guest will often be created
as /dev/md127 in the appliance. With this patch, we match the uuids of detected
md devices against uuids specified in mdadm.conf, and map them appropriately
when we encounter them in fstab.

12 years agobuild: Add more suppressions for valgrind tests
Matthew Booth [Fri, 2 Dec 2011 14:04:18 +0000 (14:04 +0000)]
build: Add more suppressions for valgrind tests

12 years agomkfs: enable to make xfs filesystems when the device already has a filesystem
Wanlong Gao [Fri, 2 Dec 2011 13:47:51 +0000 (21:47 +0800)]
mkfs: enable to make xfs filesystems when the device already has a filesystem

Just add the -f option to mkfs.xfs to make sure we can
make a xfs filesystem when the device already has a
filesystem on it.

Signed-off-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>
12 years agolibguestfs: Added gnulib includes from builddir, as suggested by the Gnulib documentation
Hilko Bengen [Thu, 1 Dec 2011 21:06:30 +0000 (22:06 +0100)]
libguestfs: Added gnulib includes from builddir, as suggested by the Gnulib documentation

    Since some modules (`getopt', for example) may copy files
    into the build directory, `top_builddir/lib' is needed as well as
    `top_srcdir/lib'. -- GNU Gnulib manual, section 2.2 Initial import

12 years agotodo: Suggestion for UUIDs in /etc/fstab (thanks Joshua Daniel Franklin).
Richard W.M. Jones [Wed, 30 Nov 2011 17:08:33 +0000 (17:08 +0000)]
todo: Suggestion for UUIDs in /etc/fstab (thanks Joshua Daniel Franklin).

12 years agoocaml: Fix OCaml dependencies.
Richard W.M. Jones [Wed, 30 Nov 2011 17:08:27 +0000 (17:08 +0000)]
ocaml: Fix OCaml dependencies.

12 years agoVersion 1.15.8. 1.15.8
Richard W.M. Jones [Tue, 29 Nov 2011 23:31:30 +0000 (23:31 +0000)]
Version 1.15.8.

12 years agopython: Memory leak: Free roots array along handle close path.
Richard W.M. Jones [Tue, 29 Nov 2011 18:20:05 +0000 (18:20 +0000)]
python: Memory leak: Free roots array along handle close path.

12 years agoperl: Memory leak: Free roots array along handle close path.
Richard W.M. Jones [Tue, 29 Nov 2011 18:19:54 +0000 (18:19 +0000)]
perl: Memory leak: Free roots array along handle close path.

12 years agoruby: Memory leak: Free roots array along handle close path.
Richard W.M. Jones [Tue, 29 Nov 2011 17:47:18 +0000 (17:47 +0000)]
ruby: Memory leak: Free roots array along handle close path.

12 years agoextra tests: Add comments about what is not tested here.
Richard W.M. Jones [Tue, 29 Nov 2011 17:51:59 +0000 (17:51 +0000)]
extra tests: Add comments about what is not tested here.

12 years agoextra tests: Absolute path for 'run' command.
Richard W.M. Jones [Tue, 29 Nov 2011 17:32:19 +0000 (17:32 +0000)]
extra tests: Absolute path for 'run' command.

12 years agoextra tests: Split up and reorder tests more logically.
Richard W.M. Jones [Tue, 29 Nov 2011 17:22:56 +0000 (17:22 +0000)]
extra tests: Split up and reorder tests more logically.

12 years agoextra tests: Test virt-sparsify.
Richard W.M. Jones [Tue, 29 Nov 2011 17:20:11 +0000 (17:20 +0000)]
extra tests: Test virt-sparsify.

This adds the virt-sparsify --debug-gc option which causes
virt-sparsify to call Gc.compact before exiting, allowing
GC and memory problems to be tested.

Add an extratest which runs virt-sparsify under valgrind.

12 years agoextra tests: Test virt-resize.
Richard W.M. Jones [Tue, 29 Nov 2011 17:14:18 +0000 (17:14 +0000)]
extra tests: Test virt-resize.

This adds the virt-resize --debug-gc option which causes
virt-resize to call Gc.compact before exiting, allowing
GC and memory problems to be tested.

Add an extratest which runs virt-resize under valgrind.

12 years agoocaml: Load test should call Gc.compact to flag memory errors.
Richard W.M. Jones [Tue, 29 Nov 2011 17:13:45 +0000 (17:13 +0000)]
ocaml: Load test should call Gc.compact to flag memory errors.

12 years agoocaml: Fix memory leak in bindings for functions that return buffers.
Richard W.M. Jones [Tue, 29 Nov 2011 17:13:17 +0000 (17:13 +0000)]
ocaml: Fix memory leak in bindings for functions that return buffers.

RBufferOut binding didn't free the buffer after copying it onto
the OCaml heap.

Found by valgrind.

12 years agoVersion 1.15.7. 1.15.7
Richard W.M. Jones [Tue, 29 Nov 2011 16:11:21 +0000 (16:11 +0000)]
Version 1.15.7.

12 years agoextra tests: Run C API tests under valgrind.
Richard W.M. Jones [Tue, 29 Nov 2011 13:13:44 +0000 (13:13 +0000)]
extra tests: Run C API tests under valgrind.

12 years agoprotocol: Memory leak: Free temporary buffer along recv_discard path.
Richard W.M. Jones [Tue, 29 Nov 2011 13:13:06 +0000 (13:13 +0000)]
protocol: Memory leak: Free temporary buffer along recv_discard path.

12 years agoextra tests: Run OCaml tests under valgrind.
Richard W.M. Jones [Tue, 29 Nov 2011 12:52:15 +0000 (12:52 +0000)]
extra tests: Run OCaml tests under valgrind.

12 years agoextra tests: Split VG variable into VG / RUN_VG.
Richard W.M. Jones [Tue, 29 Nov 2011 12:51:20 +0000 (12:51 +0000)]
extra tests: Split VG variable into VG / RUN_VG.

This is just code motion.

12 years agoocaml: Memory leak: Free roots array along handle close path.
Richard W.M. Jones [Tue, 29 Nov 2011 12:25:34 +0000 (12:25 +0000)]
ocaml: Memory leak: Free roots array along handle close path.

12 years agoinspection: Cleanup iteration over fstab entries in inspect_fs_unix.c
Matthew Booth [Fri, 25 Nov 2011 13:16:54 +0000 (13:16 +0000)]
inspection: Cleanup iteration over fstab entries in inspect_fs_unix.c

Select non-comment labels using an augeas path to return the correct
nodes in the first instance, rather than applying a regular expression
to all results.

There is no functional change to the code.

RWMJ:
 - Rebased to current HEAD.
 - Move variable decls to top of function.
 - Some whitespace changes.
 - Remove check for errors from snprintf since it can never happen.

12 years agoinspection: Add outline support for GNU/Hurd.
Richard W.M. Jones [Mon, 28 Nov 2011 20:40:01 +0000 (20:40 +0000)]
inspection: Add outline support for GNU/Hurd.

12 years agofish: When -m option fails, canonicalize device names that are printed.
Richard W.M. Jones [Mon, 28 Nov 2011 19:12:44 +0000 (19:12 +0000)]
fish: When -m option fails, canonicalize device names that are printed.

The error message now looks like this:

  guestfish: '/dev/vda6' could not be mounted.  Did you mean one of these?
            /dev/sda1 (ext4)
            /dev/vg_f15x32/lv_root (ext4)
            /dev/vg_f15x32/lv_swap (swap)

Note that '/dev/sda1' has been canonicalized.

12 years agofish: Rearrange code for displaying mountpoints when -m option fails.
Richard W.M. Jones [Mon, 28 Nov 2011 19:07:30 +0000 (19:07 +0000)]
fish: Rearrange code for displaying mountpoints when -m option fails.

This also frees the list returned by guestfs_list_filesystems.

13 years agodocs: Tidy up documentation for md-stop.
Richard W.M. Jones [Fri, 25 Nov 2011 08:34:59 +0000 (08:34 +0000)]
docs: Tidy up documentation for md-stop.

This cleans up commit cbd1c45d95c530c8d94103dcc2c521bf5501ef59.

13 years agoVersion 1.15.6. 1.15.6
Richard W.M. Jones [Thu, 24 Nov 2011 20:28:02 +0000 (20:28 +0000)]
Version 1.15.6.

13 years agoubuntu: Add extra suppressions for libnl.1 leaks.
Richard W.M. Jones [Thu, 24 Nov 2011 20:17:57 +0000 (20:17 +0000)]
ubuntu: Add extra suppressions for libnl.1 leaks.

13 years agoUpdate API support.
Richard W.M. Jones [Thu, 24 Nov 2011 19:36:50 +0000 (19:36 +0000)]
Update API support.

13 years agoextra-tests: Include valgrind suppressions file.
Richard W.M. Jones [Thu, 24 Nov 2011 17:47:13 +0000 (17:47 +0000)]
extra-tests: Include valgrind suppressions file.

This updates commit c55bad93fbde03a3daa6058913f02098c45e55f5.

13 years agoregressions: Allow test-launch-race.pl to be skipped.
Richard W.M. Jones [Thu, 24 Nov 2011 16:54:17 +0000 (16:54 +0000)]
regressions: Allow test-launch-race.pl to be skipped.

export SKIP_TEST_LAUNCH_RACE_PL=1
will cause this test to be skipped.

13 years agodebian: Use mdadm -D --export instead of mdadm -DY.
Richard W.M. Jones [Thu, 24 Nov 2011 16:27:36 +0000 (16:27 +0000)]
debian: Use mdadm -D --export instead of mdadm -DY.

For compatibility with mdadm on Debian Squeeze.

13 years agoAdd 'make extra-tests' rule and run extra tests.
Richard W.M. Jones [Thu, 24 Nov 2011 14:08:09 +0000 (14:08 +0000)]
Add 'make extra-tests' rule and run extra tests.

These tests are optional, and require a special environment and
tools to run.