| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
| |
(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)
|
|
|
|
| |
(cherry picked from commit 6ca8a2db6d6f1028a35ece616af44538074483fc)
|
|
|
|
|
|
| |
(RHBZ#788641)
(cherry picked from commit 24d7889eba3eb6ee2f37ed9d384aa8734ebad7b7)
|
|
|
|
| |
(cherry picked from commit 016ae77e6c2331560a3716ea1ebae82f122b4909)
|
| |
|
|
|
|
|
|
| |
See this util-linux commit:
https://github.com/karelzak/util-linux/commit/b82590ad46acf9fe8d332b53875e24c3c31e2482
(cherry picked from commit f504cb02e1e8ef394287ddbaaad2fb1ec04bc33f)
|
|
|
|
| |
(cherry picked from commit 518edc506fbdd66dcdd5a558cd086cfa296585a2)
|
|
|
|
|
| |
Update suppressions file to match.
(cherry picked from commit 0559f038ada850f627529ece97f5a4e8721a7ecd)
|
|
|
|
| |
(cherry picked from commit 825b5e65c094396154594fcb31db59fe51867a33)
|
|
|
|
|
|
|
|
| |
See comments in the code for details.
This is an alternate fix to
commit a9c8123c72db47bcab8dd738e8d5256a9ae87f11.
(cherry picked from commit 21a9efcad5379cbfcc2404142472ec5efda4aaa0)
|
|
|
|
|
| |
This reverts commit a9c8123c72db47bcab8dd738e8d5256a9ae87f11.
(cherry picked from commit a98170e0e255021481cd428ee12d0858a59a875b)
|
|
|
|
|
|
|
|
| |
Check /sbin, /usr/sbin, /bin and /usr/bin to ensure that neither the
directory nor the parent (eg. /usr) is a symlink, and use this
directory for the virtual directory used to store guestfsd in the
appliance.
(cherry picked from commit 3c9ef0e9780443d28a078c49bab80cb13e5608ae)
|
|
|
|
|
|
|
| |
This file shouldn't be included in the tarball as it contains
hard-coded paths from the maintainer's machine which cannot be
relevant to the target machine.
(cherry picked from commit 590d8c3c3732c603cfb1d2180190a02df528e5ed)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Callers are supposed to use the availability API to check for
functions that may not be available in particular builds of
libguestfs. If they don't do this, currently they tend to get obscure
error messages, eg:
libguestfs: error: zerofree: /dev/vda1: zerofree: No such file or directory
This commit changes the error message to explain what callers ought to
be doing instead:
libguestfs: error: zerofree: feature 'zerofree' is not available in this
build of libguestfs. Read 'AVAILABILITY' in the guestfs(3) man page for
how to check for the availability of features.
This patch makes the stubs check for availability. The stub code
changes to:
static void
zerofree_stub (XDR *xdr_in)
{
[...]
/* The caller should have checked before calling this. */
if (! optgroup_zerofree_available ()) {
reply_with_error ("feature '%s' is not available in this\n"
"build of libguestfs. Read 'AVAILABILITY' in the guestfs(3) man page for\n"
"how to check for the availability of features.",
"zerofree");
goto done;
}
[...]
(cherry picked from commit 330fbea5b2d6bd7db84f7ea7afe87cf1bcd438e0)
|
|
|
|
|
|
|
| |
do a code cleanup by removing the tailing spaces
Signed-off-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>
(cherry picked from commit 90d6386c13edcb479113889bbd3cedf83c2e6277)
|
| |
|
|
|
|
|
|
|
|
| |
Change hard code 3 to O_ACCMODE.
it'll be more sensible.
Signed-off-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>
(cherry picked from commit d60d5c091f46dda8399ce2af1b6e5920bd5fb819)
|
|
|
|
|
|
|
|
| |
just do a cleanup.
remove the tailing spaces.
Signed-off-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>
(cherry picked from commit 0042898880167f93c5e64d76008ab07bd0aa9485)
|
|
|
|
| |
(cherry picked from commit e3f15780c8197a66bfb620b802ba18d0ba0dd2ce)
|
|
|
|
| |
(cherry picked from commit 6e703c1316548e42b5133ba508fe0e7d090ac3d0)
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Set LD_LIBRARY_PATH so we link against the just-built library, not
the installed library.
Use OCAMLCFLAGS instead of OCAMLOPTFLAGS where appropriate.
Remove unnecessary -cclib option for bytecode linking (gcc is not used
in this case).
This fixes commit eb68a314133c88260cdf4547d7d338446488e698.
(cherry picked from commit 03684e7a616eab56a81665c8c8859426e50ae429)
|
|
|
|
| |
(cherry picked from commit d33c70fd6417c71b8965a088355dcc9e2ade51f7)
|
|
|
|
| |
(cherry picked from commit 8fd5a377b8521d53f56b66136d686a31c7e302b6)
|
|
|
|
|
|
| |
Compile each test twice, as bytecode and native code, and
test both.
(cherry picked from commit eb68a314133c88260cdf4547d7d338446488e698)
|
|
|
|
| |
(cherry picked from commit 799852e64691068f3256c27d18870bdb2537c2be)
|
|
|
|
|
|
|
|
|
| |
This contains a workaround for stdalign bug:
http://lists.gnu.org/archive/html/bug-gnulib/2012-01/msg00340.html
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52023
(Thanks Paul Eggert).
(cherry picked from commit 7972b1da8121e3f9c98865f00fc6115d9aff2754)
|
|
|
|
|
|
| |
See this udev commit:
https://git.kernel.org/?p=linux/hotplug/udev.git;a=commitdiff;h=220893b3cbdbf8932f95c44811b169a8f0d33939
(cherry picked from commit 8f564ae7a2fb0f170308bd103a6be0a981583b1c)
|
|
|
|
|
| |
This updates commit dd25638fc14ea63cf8e8eb0940173f1c6952447f.
(cherry picked from commit 93e443ccad74305c41c925f64063ef451db8fa08)
|
|
|
|
|
| |
This updates commit 3d0c9f3fc63395083fef798ee31058a0bea8432e.
(cherry picked from commit de00aa84afcdb72ac096d17a290d6f46fc217e4f)
|
|
|
|
| |
(cherry picked from commit 3d0c9f3fc63395083fef798ee31058a0bea8432e)
|
|
|
|
|
|
|
|
|
|
|
|
| |
binary.
The error messages would be prefixed by the path to the
alternate binary, eg:
../fish/guestfish: invalid escape sequence in string (starting at offset 0)
Fix this by normalizing the messages further.
(cherry picked from commit 09227c9d664ca21b47b65c2fcd8fa2ddc485b554)
|
|
|
|
| |
(cherry picked from commit 9f8e9dcc703759ff1f7413ebf75b90ca20e3acb4)
|
|
|
|
| |
(cherry picked from commit b1ace6738177481276dce05bf1d2597bb67f2a80)
|
|
|
|
| |
(cherry picked from commit dd25638fc14ea63cf8e8eb0940173f1c6952447f)
|
|
|
|
|
|
| |
This change binds guestfs_close(). It consequently results in RConstOptString
being able to throw an error.
(cherry picked from commit 8bad4d1c4765fd997511a505cdb2a860148ae16d)
|
|
|
|
|
|
|
|
|
|
|
|
| |
RConstOptString cannot return an error in the C api. This makes it a special
case for the GObject api, as all other return types have a corresponding GError
**err argument to return an error. This change removes this special case, and
includes the possibility of an error return in the API. An error is indicated by
setting *err to a non-NULL value.
This change is in preparation for adding a close api. An attempt to call any
api, even RConstOptString, on a closed handle must return an error.
(cherry picked from commit 6568dd85f4aef705e7cf5c4301bc3b8f7119efd2)
|
| |
|
|
|
|
|
|
|
|
|
|
| |
This commit tidies up the code by splitting out the path
element-searching code into a separate function.
Valgrind found that 'closedir' frees the 'struct dirent *', which
wasn't immediately obvious. So now we do the 'closedir' after all
operations which touch 'd->d_name'.
(cherry picked from commit a05ddcd2a719f97ba036e9d6ca4e6491ed8b1fd0)
|