summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* ocaml: Use automake to build the C part of the bindings.Richard W.M. Jones2012-01-181-18/+21
| | | | | By arranging the C part of the bindings into a library, we can get automake to build it instead of using $(CC) directly.
* ocaml: Don't include guestfs-internal.h directly.Richard W.M. Jones2012-01-182-2/+2
| | | | | | However since the OCaml bindings use guestfs_safe_strdup and guestfs_safe_memdup we need to export those two (in the private functions section) from <guestfs.h>.
* ocaml: Add -Wno-missing-field-initializers to avoid a warning.Richard W.M. Jones2012-01-181-0/+4
|
* New tool: virt-format: erase and make blank disks.Richard W.M. Jones2012-01-1810-1/+758
| | | | | This tool allows you to easily reformat a disk, creating a blank disk with optional partition, LVM and empty filesystem.
* fish options parsing: Allow add_drives to be called multiple times.Richard W.M. Jones2012-01-189-28/+23
| | | | | | Ensure that the drv structure is always zeroed on allocation. Don't leak old drv->device when add_drives is called multiple times.
* c: Allow NULL optargs to be passed to _argv callsMatthew Booth2012-01-171-0/+15
| | | | | | Previously, passing NULL optargs to an _argv call resulted in a segfault. This change causes NULL optargs to be interpreted as no optargs, and to be correctly handled accordingly.
* c: NFC Remove redundant parenthesesMatthew Booth2012-01-171-1/+1
|
* generator: Add an explicit Cancellable flagMatthew Booth2012-01-173-19/+43
| | | | | | | | | Currently any api which takes a FileIn or FileOut parameter is implicitly cancellable. This change make cancellable an explicit flag in anticipation of it being added to other apis. Note that a Cancellable function must be able to return an error, which means it can't return RConstOptString.
* generator: Add CamelName flagMatthew Booth2012-01-173-5/+13
| | | | | | | | | | We can make a good guess at camel case names for most APIs. For example, add_drive_opts can be automatically transformed to AddDriveOpts. However, other apis don't produce a satisfactory name when transformed automatically. For example, we would want md_create to produce MDCreate rather than MdCreate. This change adds a CamelName flag which allows a camel case name to be specified explicitly when the automatic transformation isn't satisfactory.
* resize2fs-M: fix double-free along error path (thanks Matthew Booth).Richard W.M. Jones2012-01-161-4/+2
|
* e2fsck: Tidy up the documentation for this API.Richard W.M. Jones2012-01-161-4/+8
|
* e2fsck-f: change the internal to use e2fsckWanlong Gao2012-01-131-21/+7
| | | | | | | | Since we implement the new api e2fsck, just change the internal of e2fsck_f to use e2fsck now. v1->v2: use optargs_bitmask Signed-off-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>
* NEW API: add a new api e2fsckWanlong Gao2012-01-133-1/+74
| | | | | | | | | | | | | | m: Wanlong Gao <gaowanlong@cn.fujitsu.com> Add a new api e2fsck with two options: correct: same as '-p' option of e2fsck forceall: same as '-y' option of e2fsck Thanks for Rich's idea. v1->v2: use optargs_bitmask v2->v3: change the optargs_bitmask check Signed-off-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>
* ext2: tweak the error returned message of resize2fs-M(BZ755729)Wanlong Gao2012-01-131-2/+7
| | | | | | | Tweak the error message "e2fsck -f" and "e2fsck -fy". Indicate the user to use the correct and/or forceall options. Signed-off-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>
* build: Remove .depend files from gitMatthew Booth2012-01-119-183/+8
| | | | | Remove generated .depend files from source control, and don't barf when they don't exist while bootstrapping.
* Update RELEASE-NOTES.Richard W.M. Jones2012-01-111-0/+127
|
* extra-tests: Only test 5 random guests.Richard W.M. Jones2012-01-101-6/+10
| | | | | | | | | If you have a lot of guests, running extra tests takes a lot of time, but (arguably) you're not really doing any more detailed testing. Thus pick up to 5 guests at random to test. A different random selection is done on each run, ensuring that data-driven errors (eg in inspection) will still be found eventually.
* Version 1.15.16.1.15.16Richard W.M. Jones2012-01-1018-200/+275
|
* Allow /dev/null to be added multiple times.Richard W.M. Jones2012-01-102-30/+11
| | | | | | | | Change the test for duplicate drives so that you're allowed to add /dev/null multiple times. This corresponds to traditional usage. This amends commit be47b66c3033105a2b880dbc10bfc2b163b7eafe.
* daemon: debug segv correct use of dereferencing NULL.Richard W.M. Jones2012-01-091-1/+7
|
* launch: move the filename checking to a wrapperWanlong Gao2012-01-091-6/+12
| | | | | | Move the filename's comma character checking to a wrapper. Signed-off-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>
* launch: don't add a drive twiceWanlong Gao2012-01-092-5/+41
| | | | | | | | | | | | | | 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.
* generator: Create a separate type for optional argumentsMatthew Booth2012-01-0917-199/+179
| | | | | | | | | | | | | | | | | | 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
* generator: Rename java_structs to camel_structs to better reflect their purposeMatthew Booth2012-01-095-19/+17
| | | | | 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.
* launch: add a goto label when add_drive errorWanlong Gao2012-01-091-18/+11
| | | | | | | Code cleanup. Add a goto label to simplify the code. Signed-off-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>
* Version 1.15.15.1.15.15Richard W.M. Jones2012-01-0820-403/+391
|
* debian: Add build-dep erlang-dev.Richard W.M. Jones2012-01-061-0/+2
|
* Update to latest gnulib.Richard W.M. Jones2012-01-061-0/+0
|
* Tempora mutantur, nos et mutamur in illis.Matthew Booth2012-01-041-1/+1
|
* build: Fix automake warningsMatthew Booth2012-01-043-8/+12
|
* Sort .gitignore (using sort -d -- dictionary order).Richard W.M. Jones2012-01-041-55/+54
|
* gitignore: ignore the git related filesWanlong Gao2012-01-041-0/+7
| | | | | | | *.eml for email picked patches other for orginal git patch related files. Signed-off-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>
* fish: fix the Ctrl-\ causes guestfish to abort bug(RHBZ#596761)Wanlong Gao2012-01-041-0/+1
| | | | | | Handle SIGQUIT by guestfish, so that it can't be terminated. Signed-off-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>
* AUTHORS: add the email address for each authorsWanlong Gao2012-01-032-25/+25
| | | | | | | Add the email address for authors. It would be better. Signed-off-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>
* fish: mount can be used instead of mount-options with libguestfs >= 1.14Richard W.M. Jones2011-12-231-1/+1
|
* fish: Fix --format parameter in man page.Richard W.M. Jones2011-12-231-1/+1
|
* Version 1.15.14.1.15.14Richard W.M. Jones2011-12-2318-337/+343
|
* lib: Try harder to remove temporary directory along error paths (RHBZ#769680).Richard W.M. Jones2011-12-231-1/+11
|
* lib: Add guestfs___remove_tmpdir helper function.Richard W.M. Jones2011-12-235-46/+35
| | | | | | | 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.
* gitignore: ignore the guestfs.* directoryWanlong Gao2011-12-231-0/+1
| | | | | | Let git ignore the guestfs.* directorys. Signed-off-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>
* extra-tests: add test-guests to prevent test errorWanlong Gao2011-12-231-0/+4
| | | | | | | | | | | | 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>
* fish: Fix test-guestfish-events.sh so it works when LIBGUESTFS_DEBUG=1 is set.Richard W.M. Jones2011-12-231-7/+1
| | | | | Various messages were added and changed when this variable was set while tests were running.
* mkfs: optimization and code cleanupWanlong Gao2011-12-231-15/+14
| | | | | | | | | | | 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.
* tests/lvm: Contains a Perl test so we must set PERL5LIB.Richard W.M. Jones2011-12-221-1/+2
| | | | This fixes commit 498758faee6be7e989869bf7feba5e1026a1bb65.
* tests/protocol: Contains a Perl test so we must set PERL5LIB.Richard W.M. Jones2011-12-221-1/+2
| | | | This fixes commit 498758faee6be7e989869bf7feba5e1026a1bb65.
* Version 1.15.13.1.15.13Richard W.M. Jones2011-12-2217-124/+124
|
* Security: Mitigate possible privilege escalation via SG_IO ioctl ↵Richard W.M. Jones2011-12-221-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (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>
* Fixed checks for libpython featuresHilko Bengen2011-12-221-11/+12
| | | | | The python3.1 package shipped with Debian/squeeze does not have the 'mu' suffix that was assumed before.
* Version 1.15.12.1.15.12Richard W.M. Jones2011-12-2220-10600/+11415
|
* tests: Add a simple liveness tests for qemu.Richard W.M. Jones2011-12-222-0/+53
|