summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix strict-overflow bugs and reenable this warning.Richard W.M. Jones2012-03-123-9/+4
| | | | | | | | In two places, we were counting things in an array using an 'int'. In theory, the int could overflow, so gcc determines this to be undefined behaviour. The fix is to use size_t or ssize_t instead.
* fish: remote: Output from close event now passed over stdout (RHBZ#802389).Richard W.M. Jones2012-03-123-3/+55
|
* fish: remote: Make sure global cleanups are called for guestfish --listen.Richard W.M. Jones2012-03-123-2/+5
| | | | | Return to the main program ('fish.c') and perform global cleanups when the guestfish remote server exits.
* fish: remote: Move close_stdout just before accept() call.Richard W.M. Jones2012-03-121-6/+6
| | | | This is just code motion.
* fish: Rename tests and make test paths relative.Richard W.M. Jones2012-03-1215-49/+49
| | | | | | | | | | When these tests were originally in the old regressions/ directory, they used to refer to guestfish via the path '../fish/guestfish'. Some of the tests were also called 'test-guestfish-*'. Now that the tests have been moved into the fish/ directory, neither of these things make sense. So change the relative path to './guestfish' and rename all 'test-guestfish-*' as 'test-*'.
* tests: Remove/fix unused variables warnings.Richard W.M. Jones2012-03-123-1/+2
|
* Version 1.17.15.1.17.15Richard W.M. Jones2012-03-1220-10957/+11110
|
* tests: Remove unused variable.Richard W.M. Jones2012-03-121-1/+0
|
* configure: Enable more warnings, and some cleanup.Richard W.M. Jones2012-03-121-17/+13
| | | | | However -Wstrict-overflow is still disabled, see: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52560
* erlang: Remove unused variables.Richard W.M. Jones2012-03-121-2/+0
|
* format: Remove unused variables.Richard W.M. Jones2012-03-121-1/+1
|
* daemon: Remove unused variables.Richard W.M. Jones2012-03-122-8/+0
|
* inspect: Move variable decl to top of function.Richard W.M. Jones2012-03-121-1/+3
|
* inspect: Use 1/0 instead of true/false, and fix a bug in UUID parsing.Richard W.M. Jones2012-03-121-9/+13
| | | | | UUID parsing returned 'false' (ie. 0 == OK) when the UUID contained illegal characters. Now it returns -1 == failure.
* lib: Remove some unused variables.Richard W.M. Jones2012-03-124-7/+1
|
* lib: Use size_t instead of int for array iterator.Richard W.M. Jones2012-03-121-1/+1
|
* inspect: Use uint64_t for maximum file size in bytes.Richard W.M. Jones2012-03-122-3/+3
|
* lib: Use size_t for allocation size in safe realloc function.Richard W.M. Jones2012-03-122-2/+2
|
* bindtests: Use size_t instead of int for array iterators.Richard W.M. Jones2012-03-121-7/+7
|
* Coalesce printable characters in debug and trace messages (RHBZ#802109).Richard W.M. Jones2012-03-111-8/+17
|
* Document error message from resize2fs (RHBZ#755729, RHBZ#801640).Richard W.M. Jones2012-03-092-3/+35
|
* resize2fs: Run 'e2fsck -f' automatically if filesystem is not mounted.Richard W.M. Jones2012-03-095-14/+84
|
* e2fsck: Comment, whitespace, error message cleanups.Richard W.M. Jones2012-03-091-2/+2
|
* Mark e2fsck-f as deprecated, replaced by e2fsck API.Richard W.M. Jones2012-03-091-1/+1
|
* Revert "ext2: tweak the error returned message of resize2fs-M(BZ755729)"Richard W.M. Jones2012-03-091-4/+1
| | | | This reverts commit 0eaf06e673833bc25673d5c3d2487fffae310285.
* Version 1.17.14.1.17.14Richard W.M. Jones2012-03-0918-125/+131
|
* example: Copying a directory between two guests using threads.Richard W.M. Jones2012-03-093-0/+309
|
* Close all file descriptors and remove all signal handlers in the recovery ↵Richard W.M. Jones2012-03-091-0/+25
| | | | | | | | | | | | | | | | | process. If the parent process uses a pipe (or any fd, but pipes are a particular problem), then the recovery process would hold open the file descriptor(s) of the pipe, meaning that it could not be fully closed in the parent. Because the recovery process doesn't use exec(2), this wasn't avoidable even using FD_CLOEXEC. Avoid this by closing all file descriptors when starting the recovery process. After discussion with Dan Berrange, he points out that it's also a good idea to set signal handlers to the default after forking, so that any signal handlers set up in the parent don't affect the child.
* extra-tests: Export LIBVIRT_DEFAULT_URI to pick-guests.pl.Richard W.M. Jones2012-03-081-1/+6
| | | | This fixes commit 2912e4e1173226f461517a0008664e01b5d3066d.
* Version 1.17.13.1.17.13Richard W.M. Jones2012-03-0820-15204/+24959
|
* extra-tests: Check that guests are accessible before picking them.Richard W.M. Jones2012-03-082-11/+65
|
* fish: Document that guestfish sets pgroup to true (RHBZ#801273).Richard W.M. Jones2012-03-081-1/+3
|
* inspect_apps: Avoid double-close on error path (found by Coverity) ↵Richard W.M. Jones2012-03-081-0/+1
| | | | | | | | (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".
* dbdump: Avoid double-close on error path (found by Coverity).Richard W.M. Jones2012-03-081-0/+1
| | | | | | 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".
* daemon: glob: Initialize glob buffer (quiet Coverity warning).Richard W.M. Jones2012-03-081-1/+1
| | | | | | | | | 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.
* comment: Note time-of-check to time-of-use race found by Coverity.Richard W.M. Jones2012-03-081-0/+6
|
* daemon: inotify: Check event->len in inotify struct is reasonable.Richard W.M. Jones2012-03-081-0/+7
| | | | | | | | | | | | | | 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.
* daemon: debug: Close fd along error path (found by Coverity).Richard W.M. Jones2012-03-081-0/+1
| | | | | | | | 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.
* fish: Properly free up strings, lists along all error paths (found by Coverity).Richard W.M. Jones2012-03-081-84/+106
| | | | | | | | | | | | | | | | | | | | 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.
* daemon: proto: Close fd along error paths (found by Coverity).Richard W.M. Jones2012-03-081-0/+3
| | | | | | | | | 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.
* daemon: upload: Close fd along error path (found by Coverity).Richard W.M. Jones2012-03-081-0/+1
| | | | | | | | 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.
* daemon: 9p: Close fd along error paths (found by Coverity).Richard W.M. Jones2012-03-081-0/+2
| | | | | | | | | 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.
* proto: Close file along error and cancel paths (found by Coverity).Richard W.M. Jones2012-03-081-1/+5
| | | | | | | | | 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.
* Check return values of guestfs_inspect_get_{type,distro} (found by Coverity).Richard W.M. Jones2012-03-081-0/+4
| | | | | | | | | 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".
* Check return values from calloc (found by Coverity).Richard W.M. Jones2012-03-081-25/+29
| | | | | | | | | | | 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".
* Dead code: Remove comma-check in first if-clause (found by Coverity).Richard W.M. Jones2012-03-081-3/+4
| | | | | | | | 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);".
* Dead code: 'lvs' cannot be true here (found by Coverity).Richard W.M. Jones2012-03-081-1/+1
| | | | | | | | | | | | | 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(...".
* Ignore return values from some functions in guestfs_close (Coverity warning).Richard W.M. Jones2012-03-081-2/+3
| | | | | | | | | | | | | | | | 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)".
* tests/md: Number the errors so we can easily see which test fails.Richard W.M. Jones2012-03-081-3/+3
|
* Update translations from Transifex.Richard W.M. Jones2012-03-0816-12435/+9177
|