| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
| |
This directory has not existed for a long time.
(cherry picked from commit fc198a3b9aeaa76ee7d6ffc27402d25a4379dbbd)
|
|
|
|
| |
(cherry picked from commit 65ebec4a7a70cd179e4c39d72f539e500931c267)
|
|
|
|
| |
(cherry picked from commit f62db21d8babc14d580f754b0bf4d0cbe3c5bc9d)
|
|
|
|
|
|
|
| |
This function allows you to pass an explicit errno back to the
library. reply_with_error is redefined as a macro that calls
reply_with_error_errno with errno == 0.
(cherry picked from commit 7526df547c5bea9a0cb4370ca022e413388dce2e)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously there was no programmatic way to tell if inspection APIs
were unavailable because they are not compiled in (because hivex isn't
around). This contrasts with daemon APIs where the availability is
covered by the guestfs_available API.
Change the inspection APIs so that when they are not available, the
last errno is set to ENOTSUP. (Note that ENOTSUP must be defined on
all POSIX platforms).
This allows programs to detect if they are using a version of
libguestfs that was compiled without support for inspection, without
having to parse error messages.
(cherry picked from commit c7dff02ccbb6bbe505c73df5d83bea8afdc188c3)
|
|
|
|
| |
(cherry picked from commit e1ffb1011566ec68246df33ca42774b44ad5006c)
|
| |
|
|
|
|
| |
(cherry picked from commit 14938b46a74467d0e4b1cd076ffd7fcbf06c26eb)
|
|
|
|
|
|
| |
This type of test was not used, and in fact the generated test
simply didn't work.
(cherry picked from commit 6bee63beb45678ff937593af59748dfceacdc608)
|
|
|
|
|
|
|
| |
We were not using an unsigned type in the XDR. This doesn't
affect data integrity or the protocol, but it makes it more
complicated for the daemon to set these fields.
(cherry picked from commit c8630300b8ab46c668da1c8d5c1cdb9d1e3a4552)
|
|
|
|
|
|
| |
split_lines already sets reply_with_*, so calling it again would lose
protocol synchronization.
(cherry picked from commit 710ec49bac8bce10bfc0b9ba4b34d877c22f7287)
|
|
|
|
| |
(cherry picked from commit 974dffc6769b732befe85bcd8f614b9600927631)
|
|
|
|
| |
(cherry picked from commit 5749de39c2b44644662fb176784731bce851b828)
|
|
|
|
| |
(cherry picked from commit 1c1ecb2c419382f1677501b22cb98a06c7abe9a9)
|
|
|
|
|
|
| |
Add a signal handler so this potentially large temporary file
is removed when the user hits ^C.
(cherry picked from commit 7283a5a2765c0670e9dceec70e626a49a30d269c)
|
|
|
|
|
|
| |
zero-device is more efficient in general, and avoids writing to blocks
which are already zero.
(cherry picked from commit 8c9f6a64be9840a955e481e932f13d005c0de0de)
|
|
|
|
| |
(cherry picked from commit 7934ea2395d2a417fbc20efc22573113f7ae9d7a)
|
|
|
|
|
|
|
| |
When a Windows guest doesn't have a HKLM\SYSTEM\MountedDevices node,
inspection fails. However inspection should not completely fail just
because we cannot get the drive letter mapping from a guest.
(cherry picked from commit 91cede3465cd2496a01a89d5c8815df7c326c2ec)
|
|
|
|
|
|
| |
other languages and guestfish.
(cherry picked from commit 2bc922dd8e12bcf05e0aeef8a8b60b6aab9ee915)
|
|
|
|
| |
(cherry picked from commit c23f3b8e527bde9a83dd7ae24273db6da87a7268)
|
|
|
|
| |
(cherry picked from commit 13e7a1b400b7e2a5e9335d25205b09e74c89d858)
|
|
|
|
|
| |
This lets us suppress errors in system libraries.
(cherry picked from commit 302309921a8cde83eb19a7c25b7ee43932b91a05)
|
|
|
|
|
| |
Useful for debugging.
(cherry picked from commit 5da61d30520315a7d5060137a6c109f2109a7631)
|
| |
|
|
|
|
|
|
|
|
|
| |
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.
(cherry picked from commit d66dd2260c724bdfe57a8595aac37c8e9173cee5)
|
|
|
|
|
|
|
|
|
|
|
| |
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-*'.
(cherry picked from commit 1f603bfd6d7cd17e88f737a496b7e5ee053750c2)
|
|
|
|
| |
(cherry picked from commit 2c8ead5aa0e6b821bf2d21a89e437e9a6c0ed1ca)
|
|
|
|
| |
(cherry picked from commit 099e3dd9f129e05bff5512855ea89530a7999004)
|
|
|
|
| |
(cherry picked from commit 6292e630da080eb5d3427af6190eb68fe4eb1415)
|
|
|
|
| |
(cherry picked from commit e9e0920c00c55894358559bcdbd89d55cbb66d2a)
|
|
|
|
| |
(cherry picked from commit 13c2db39abff3c0050eade5bcce997afdf04d721)
|
|
|
|
| |
(cherry picked from commit 46d1280100b025de2a448331306e794d688748bd)
|
|
|
|
| |
(cherry picked from commit cd3f2986eee8dbadc8253d4c3462f7e214f1236d)
|
|
|
|
| |
(cherry picked from commit b8cdf6c2b9d12df6acbe295fd75c8c59c8b7eec1)
|
|
|
|
| |
(cherry picked from commit 24413ac4d8c8d64b3339f9e61886db8f7fbfed4f)
|
|
|
|
| |
(cherry picked from commit 4c9218658e4d4b769acaa41d999b4bce437fbc37)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
(cherry picked from commit f1f045adf8d00549dd3efa3619e1162f9004b61e)
|
|
|
|
|
| |
This fixes commit 2912e4e1173226f461517a0008664e01b5d3066d.
(cherry picked from commit 99702fe443383707b9d9c1b84570baf3bebf9253)
|
|
|
|
| |
(cherry picked from commit 2912e4e1173226f461517a0008664e01b5d3066d)
|
| |
|
|
|
|
| |
(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)
|