| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
Cherry picked from commit 615924abaa968398d6529529fa2f31ae23de825b and
rebased for old libguestfs branches that had separate
daemon/configure.ac.
|
|
|
|
|
|
|
| |
Although this doesn't matter for the ordinary (appliance) case, it
matters for the libguestfs live case. In that case it could cause the
guest to be exploited by a tmp/symlink attack.
(cherry picked from commit 6011b1f803ba7308c6a94b9bf6b7212cfccb9f42)
|
| |
|
|
|
|
|
|
|
|
|
| |
This also improves the documentation for this call, pointing out
several pitfalls in using it.
This unfortunately breaks existing callers that might use
guestfs_grub_install without checking for this new group.
(cherry picked from commit 99624d29226ece1abbbdd921183b360f5f80de91)
|
|
|
|
|
|
|
| |
On recent Debian, /etc/blkid.tab is now a symlink to /dev/.blkid.tab.
Rather than chasing the cache file around (it may move to /run in future)
use the -c /dev/null option to stop blkid from reading the cache.
(cherry picked from commit 1d0f398d8e3c74ce6a70cbbb8d9b8ae07c6d7ef6)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If the blkid command returns 2, that means the value was not found.
Note that this changes the output of the vfs-type API when the
filesystem has no type (eg when it is empty). Previously this would
return an error. Now it returns empty string "".
We did not document this either way. Making it return empty string is
consistent with vfs-label and vfs-uuid.
This change broke list-filesystems, since that code was assuming that
vfs-type could only return a filesystem type or an error.
(cherry picked from commit 168fd4ad5d1e5da93e11388095d41aaa8f804ceb)
|
|
|
|
|
| |
Allow other types of filesystems to be created.
(cherry picked from commit c6340f45007b0ab7e1c5391cf78afc10a816553f)
|
|
|
|
| |
(cherry picked from commit 511c82df46f5c6f4a7f984fdb81d4691038ed6da)
|
|
|
|
| |
(cherry picked from commit f5096dd546ac43c7288b3ab7aec1562f070f78f6)
|
|
|
|
|
|
|
|
|
|
|
| |
If the external command failed to run, we could free up the allocated
*stdoutput and *stderror pointers, but then return those freed
pointers to the caller. The caller usually tries to print and free
*stderror, so this is a serious error.
Instead, return *stdoutput as NULL, and *stderror pointing to a
generic error message.
(cherry picked from commit 29453a58d818df24c238d0a08a68886ebe4029dd)
|
|
|
|
| |
(cherry picked from commit 7a091a11d7aeddc170e4d1b833fd9d7d18c00841)
|
|
|
|
| |
(cherry picked from commit 346c5b0ebf58c81f657540eeb72abaa41bfc4e3f)
|
|
|
|
| |
(cherry picked from commit 7c020a14802255c966b2b402b983551b86a08bba)
|
|
|
|
| |
(cherry picked from commit 869c11b30c72c57e48dd63c4641087a06abe80d5)
|
|
|
|
| |
(Cherry picked from commit 3135b8c378f9f98ae66e37fd79d305764334980d).
|
|
|
|
|
| |
For some reason we were checking the parameter!
(cherry picked from commit 7fae594df719d1d81a043c4d0280b359f750facb)
|
|
|
|
| |
(cherry picked from commit 3a5bd5aba23583e64bfaabc906ca95b0f9d37578)
|
|
|
|
| |
(cherry picked from commit 76dfb74324fa0daa343d7edf89bd05e1fe7b4db0)
|
|
|
|
| |
(cherry picked from commit 3ed8d5122026f37dd96cc7e8503c4f3ecf0afbb7)
|
|
|
|
| |
(cherry picked from commit 48ebf50f3136ac27f4252662e351230ffa2b15e5)
|
|
|
|
| |
(cherry picked from commit 9160eec4fbf12643d8d5fa13465066822b2fed92)
|
|
|
|
| |
(cherry picked from commit 08bc8e40cea750bd35493ecab514e8e37c883a0a)
|
|
|
|
|
|
| |
rpcgen generates source which can't be safely compiled with strict-aliasing
enabled.
(cherry picked from commit 3a84e0784e1e3ab7b56850d0f8c9aa42f1ae3da1)
|
|
|
|
| |
(cherry picked from commit 6e5f64089631622167e60df25ee009ef83df5170)
|
|
|
|
| |
(cherry picked from commit 42938f6faf9e724130be28f8e67d3c291bb81cba)
|
|
|
|
| |
(cherry picked from commit a0e3b2183733c7440ad017c4ffe361935672339b)
|
|
|
|
| |
(cherry picked from commit 227bea6c7ef89b707fe2c01c4d0d0fb9081e8c04)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In the case where both ends cancel at the same time (eg. both ends
realize there are errors before or during the transfer), previously we
skipped sending back an error from the daemon, on the spurious basis
that the library would not need it (the library is cancelling because
of its own error).
However this is wrong: we should always send back an error message
from the daemon in order to preserve synchronization of the protocol.
A simple test case is:
$ guestfish -N fs -m /dev/sda1 upload nosuchfile /
libguestfs: error: open: nosuchfile: No such file or directory
libguestfs: error: unexpected procedure number (66/282)
(Notice two things: there are errors at both ends, and the
loss of synchronization).
After applying this commit, the loss of synchronization does not occur
and we just see the library error:
$ guestfish -N fs -m /dev/sda1 upload nosuchfile /
libguestfs: error: open: nosuchfile: No such file or directory
The choice of displaying the library or the daemon error is fairly
arbitrary in this case -- it would be valid to display either or even
to combine them into one error. Displaying the library error only
makes the code considerably simpler.
This commit also (re-)enables a test for this case.
Cherry picked and rebased from
commit f4d996fd26762053d68f46de5790aae893f03d38.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
As a previous, incorrect attempt to fix RHBZ#576879 we tried to
prevent the daemon from sending an error reply if the daemon had
cancelled the transfer. This is wrong: the daemon should send an
error reply in these cases.
A simple test case is this:
guestfish -N fs -m /dev/sda1 upload big-file /
(This fails because the target "/" is a directory, not a file.)
Prior to this commit, libguestfs would hang instead of printing an
error. With this commit, libguestfs prints an error.
What is happening is:
(1) Library is uploading
a file (2) In the middle of the long
upload, daemon detects an error.
Daemon cancels.
(3) Library detects cancel,
sends cancel chunk, then waits
for the error reply from the
daemon. (4) Daemon is supposed to send
an error reply message.
Because step (4) wasn't happening, uploads that failed like this would
hang in the library (waiting for the error message, while the daemon
was waiting for the next request).
This also adds a regression test.
This temporarily breaks the "both ends cancel" case (RHBZ#576879c5).
Therefore the test for that is disabled, and this is fixed in the next
patch in the series.
This partially reverts commit dc706a639eec16084c0618baf7bfde00c6565f63.
Cherry picked and rebased from
commit 33b638109ed66ea360b53b80b1f407b3a5f5ec39.
|
|
|
|
|
| |
This updates commit 7eb012f3710bb554d5fc2c4229036901b0b5ad90.
(cherry picked from commit 8d7d7c4ecfd202e04d18736718e9c5bb125ce4f0)
|
|
|
|
|
| |
Ensure the daemon always starts with current directory == root.
(cherry picked from commit 7eb012f3710bb554d5fc2c4229036901b0b5ad90)
|
|
|
|
| |
(cherry picked from commit e85fbee7bff9422a370d3f437594d262c043d89b)
|
|
|
|
|
|
|
| |
Add a new section called "EXTENDING LIBGUESTFS" to the
guestfs manual page which contains all the information
previously in "HACKING".
(cherry picked from commit d2400da92e5e2cc7fd5e33e61220a33214d5241c)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
These APIs are essentially required to work around a problem
with ntfs-3g. This filesystem (or FUSE?) does not list all
extended attributes of a file when you call listxattr(2). However
if you know the name of an extended attribute, you can retrieve
it directly using getxattr(2).
The current APIs (getxattrs etc) are simple to use, but they
don't work if we can't list out the extended attributes (ie.
by calling listxattr(2)).
Example using the new APIs on an ntfs-3g filesystem:
><fs> lgetxattr "/Documents and Settings" system.ntfs_attrib | hexdump -C
00000000 16 24 00 00 |.$..|
00000004
><fs> lgetxattr "/Documents and Settings" system.ntfs_reparse_data | hexdump -C
00000000 03 00 00 a0 34 00 00 00 00 00 18 00 1a 00 10 00 |....4...........|
00000010 5c 00 3f 00 3f 00 5c 00 43 00 3a 00 5c 00 55 00 |\.?.?.\.C.:.\.U.|
00000020 73 00 65 00 72 00 73 00 00 00 43 00 3a 00 5c 00 |s.e.r.s...C.:.\.|
00000030 55 00 73 00 65 00 72 00 73 00 00 00 |U.s.e.r.s...|
0000003c
><fs> getxattr "/Documents and Settings" system.ntfs_reparse_data | hexdump -C
libguestfs: error: getxattr: getxattr: No such file or directory
><fs> getxattr "/Documents and Settings" system.ntfs_attrib | hexdump -C
libguestfs: error: getxattr: getxattr: No such file or directory
><fs> lgetxattr "/Documents and Settings" system.ntfs_attrib | hexdump -C
00000000 16 24 00 00 |.$..|
00000004
><fs> getxattr "/Users" system.ntfs_attrib | hexdump -C
00000000 11 00 00 00 |....|
00000004
|
|
|
|
| |
This updates commit 0938509e0422363554023ab99381fd70a22a6e08.
|
|
|
|
| |
(Revealed by compiling under Debian where this is a warning).
|
|
|
|
|
|
|
|
| |
Even with the '-f' option, LVM on Ubuntu sometimes cannot remove
active LVs and VGs.
Change lvm-remove-all so it deactivates each LV and VG before
removing them.
|
|
|
|
|
|
|
| |
This reverts commit ad2abf89c364d5ec73fb12af63b053637d99d757.
Ubuntu still has errors even with the addition of udev_settle
after umount-all. Therefore this was just masking the problem.
|
|
|
|
|
| |
Really we should have a test for "is program on $PATH?" but this
fix will do for now.
|
|
|
|
|
|
| |
This helps avoid an error on Ubuntu, but it's not clear if this
is a real solution or just helps by adjusting the timing of some
race condition.
|
|
|
|
| |
These are seen on gcc 4.5.1 used in Ubuntu.
|
|
|
|
|
|
| |
This is an extensible version of 'mkfs' which supports optional
arguments. There is now no need for 'mkfs_b' since you should
use 'mkfs_opts' with the optional 'blocksize' argument instead.
|
|
|
|
|
|
|
|
| |
Previously we only supported optional arguments for library
functions (commit 14490c3e1aac61c6ac90f28828896683f64f0dc9).
This extends that work so that optional arguments can also be
passed through to the daemon.
|
| |
|
|
|
|
|
|
|
| |
If the daemon sends progress notification messages while we
are uploading FileIn parameters, these are received in
check_for_daemon_cancellation_or_eof. Modify this library
function so that it turns these messages into callbacks.
|
|
|
|
|
|
|
|
| |
Two unrelated changes to the protocol to support progress
messages during uploads, and optional arguments.
Note that this makes an incompatible change to the protocol,
and this is reflected in the protocol version field (3 -> 4).
|
| |
|
|
|
|
| |
Remove both possible cache locations.
|
| |
|
| |
|