summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
...
* inspect: Detect 32 bit applications running on WOW64 emulator (RHBZ#692545).Richard W.M. Jones2011-03-311-42/+56
| | | | | | | These applications are located along a different Registry path. See http://support.microsoft.com/kb/896459 for all the details. Thanks Jinxin Zheng for finding the bug and the solution.
* Rename $tmpdir/sock to $tmpdir/guestfsd.sock.Richard W.M. Jones2011-03-252-6/+6
| | | | | | | | No functional change; this simply makes the purpose of the socket clearer. Notes: Labels: cleanup
* inspector: Add detection of Slackware.Richard W.M. Jones2011-03-252-0/+13
| | | | Notes: Labels: feature
* New API: guestfs_inspect_get_product_variantRichard W.M. Jones2011-03-232-0/+26
| | | | | | | | | | This returns a product variant for inspected operating systems. In practice this is a useful way to distinguish between consumer and enterprise/server versions of Windows that otherwise have the same version number. Notes: Labels: feature
* inspect: Don't fail for Windows guests with multiple disks (RHBZ#674130).Richard W.M. Jones2011-03-222-2/+15
| | | | | Notes: Labels: bugfix, RHBZ#674130 Depends: 5776c145d411e5ae00072ecf422055f3d0bd29e2
* inspect: Simplify Windows root heuristic code.Richard W.M. Jones2011-03-221-12/+38
| | | | | | | | | Add special is_file_nocase and is_dir_nocase functions and remove the duplicate checks for files and directories with different cases. Notes: Labels: codemotion
* guestfs(3): 'kernel' -> 'supermin appliance'.Richard W.M. Jones2011-03-191-4/+4
|
* guestfs(3): Indent line to keep code together.Richard W.M. Jones2011-03-191-1/+1
|
* proto: Fix both-ends-cancel case.Richard W.M. Jones2011-03-182-3/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* proto: Don't drop outgoing message when daemon cancels (RHBZ#576879).Richard Jones2011-03-181-2/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a (potential) fix for the long standing protocol bug which causes loss of synchronization when a FileIn action fails very early on the daemon side. The canonical example would be the 'upload' action failing immediately if no filesystem is mounted. What's supposed to happen is this: (1) library sends request message (2) daemon processes request first chunk of data and sees that it will fail, sends cancellation (3) discards chunks of data (4) library sees daemon cancellation and stops sending chunks It was going wrong in step (1), in guestfs___send_to_daemon. In some (timing related) circumstances, send_to_daemon could receive the cancellation before sending the first chunk, at which point it would exit, *discarding the first chunk*. This causes the daemon to fail in step (3) since it reads the next request as if it was a chunk, thus losing synchronization. (The protocol specifies that you always have to send at least one chunk if there is a FileIn or FileOut parameter). The patch changes guestfs___send_to_daemon so that if it detects cancellation, it sends the remaining data in its output buffer instead of discarding it. (This also fixes another edge case to do with sending partial data although I don't think we ever saw that in practice).
* proto: Improve debug messages.Richard W.M. Jones2011-03-181-9/+58
|
* New event API (RHBZ#664558).Richard W.M. Jones2011-03-159-210/+734
| | | | | | | | | | | | | This API allows more than one callback to be registered for each event, makes it possible to call the API from other languages, and allows [nearly all] log, debug and trace messages to be rerouted from stderr. An older version of this API was discussed on the mailing list here: https://www.redhat.com/archives/libguestfs/2010-December/msg00081.html https://www.redhat.com/archives/libguestfs/2011-January/msg00012.html This also updates guestfish to use the new API for its progress bars.
* New APIs: guestfs_first_private, guestfs_next_private to walk overRichard W.M. Jones2011-03-153-4/+139
| | | | | | | | the private data area. This commit adds new APIs for walking over the keys and pointers in the private data area associated with each handle (note this is only applicable to the C API).
* check the pid is > 0 before calling waitpid()Angus Salkeld2011-03-151-1/+1
| | | | Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
* check the pid is > 0 before calling waitpid()Angus Salkeld2011-03-141-1/+1
| | | | Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
* RHEL5: Make use of 'futimens' function optional.Richard W.M. Jones2011-03-111-0/+4
|
* Detect Red Hat Desktop as 'rhel' distro (RHBZ#682979).Richard W.M. Jones2011-03-081-3/+3
| | | | | | | | | | | | | /etc/redhat-release on Red Hat Desktop contains the following string: Red Hat Desktop release 4 (Nahant Update 8) Previously we matched against the string "Red Hat Enterprise Linux" but since this does not contain that string, this distro wasn't being detected correctly. Note this also changes the obsolete Perl code, for the benefit of virt-v2v.
* Fix inspection code when PCRE or hivex is missing.Richard W.M. Jones2011-03-031-0/+24
|
* Add documentation for attach method.Richard W.M. Jones2011-02-032-1/+59
|
* Add guestfs_add_domain 'live' flag.Richard W.M. Jones2011-02-031-25/+167
| | | | | | | | | | This optional flag controls whether this API call will try to connect to a running virtual machine 'guestfsd' process. If the flag is given and the virtual machine is running, then the libvirt XML is parsed looking for a suitable <channel> element, and 'guestfs_set_attach_method' is called with the corresponding virtio-serial socket path.
* lib: Implement attach-method unix:<path>Richard W.M. Jones2011-02-032-9/+95
| | | | | | | | | | | | | | | | | | | | | | | | | Allow connections to a Unix domain socket which is connected (via virtio-serial) to a guestfsd running free in an existing guest. In order to use this you have to add the following element to the libvirt XML: <channel type='unix'> <source mode='bind' path='/tmp/socket'/> <target type='virtio' name='org.libguestfs.channel.0'/> </channel> (or perform the equivalent on the qemu command line). Then in guestfish, you can do: guestfish \ attach-method unix:/tmp/socket : \ run : \ ll / (or any other commands as desired).
* New APIs: set-attach-method, get-attach-method.Richard W.M. Jones2011-02-032-0/+51
| | | | | | | | | | These allow you to get and set the attach method. The format is one of: * appliance * unix:<path> It's stored broken out into an enum and a string in the handle.
* lib: Move appliance launching to separate function.Richard W.M. Jones2011-02-031-14/+24
| | | | This is just code motion.
* perl: Translate C examples into Perl and include a manual page.Richard W.M. Jones2011-01-301-1/+1
|
* lib: Fix use-after-free bug in XPath parsing code.Richard W.M. Jones2011-01-281-1/+1
|
* Add a new internal-autosync API to perform autosync.Richard W.M. Jones2011-01-282-5/+3
| | | | | | | | | Instead of explicitly calling umount-all; sync, we add a daemon function called internal-autosync which does the same. Apart from slightly simplifying the process of closing the handle, the main advantage is we can modify the daemon for the standalone case so that internal-autosync does not do the umount-all operation.
* Use /var/tmp for the cached appliance (for FHS compliance).Richard W.M. Jones2011-01-194-4/+24
| | | | | | | | | | | | | | | | The FHS advises large files not to be stored in the root filesystem[1], and that /var/tmp is persistent across reboots[2] (whereas /tmp is possibly not[3]). Therefore we should store the large cached supermin appliance in /var/tmp instead of /tmp. /tmp is still used for all other temporary files and directories. In either case you can override this by setting $TMPDIR. [1] http://www.pathname.com/fhs/pub/fhs-2.3.html#THEROOTFILESYSTEM [2] http://www.pathname.com/fhs/pub/fhs-2.3.html#VARTMPTEMPORARYFILESPRESERVEDBETWEE [3] http://www.pathname.com/fhs/pub/fhs-2.3.html#TMPTEMPORARYFILES
* Add ability to inspect install disks and live CDs.Richard W.M. Jones2011-01-153-39/+563
| | | | | For examples of the virt-inspector output, see the additional inspector/example-*.xml files in this commit.
* inspect: Add macros for file size limits.Richard W.M. Jones2011-01-151-9/+37
| | | | | | This also bumps the file size limit for "small text files" up to 2 MB, since we want to parse Windows CD txtsetup.sif files that are usually around 500K in size.
* New API: resize2fs-M to resize ext2/3/4 to minimum size.Nikita A Menkovich2011-01-141-1/+1
|
* Add logo used on the website.Richard W.M. Jones2011-01-111-0/+4
|
* New tools: virt-copy-in, virt-copy-out, virt-tar-in, virt-tar-out.Richard W.M. Jones2011-01-031-1/+7
| | | | | Relatively trivial wrappers around the equivalent guestfish commands. Change also includes new man pages.
* docs: Refresh programming language list in guestfs(3).Richard W.M. Jones2010-12-301-5/+5
|
* docs: Refresh programming language equivalence example in guestfs(3).Richard W.M. Jones2010-12-301-3/+3
|
* docs: Fix missing g handle in guestfs(3) man page.Richard W.M. Jones2010-12-301-2/+2
|
* docs: Refresh guestfs(3)/DOWNLOADING.Richard W.M. Jones2010-12-301-4/+3
|
* docs: Refresh guestfs(3)/MOUNTINGRichard W.M. Jones2010-12-301-9/+15
|
* docs: Update API support.Richard W.M. Jones2010-12-1911-6/+4201
|
* api-support: Fix detection of similar APIs.Richard W.M. Jones2010-12-191-1/+1
| | | | | Because we didn't match on word boundaries, the previous code would get confused by similar APIs, eg. getxattr vs getxattrs.
* docs: Obsolete HACKING file, move content into guestfs(3) man page.Richard W.M. Jones2010-12-192-1/+343
| | | | | | Add a new section called "EXTENDING LIBGUESTFS" to the guestfs manual page which contains all the information previously in "HACKING".
* docs: Add section on using /dev/fd/* with upload and download calls.Richard W.M. Jones2010-12-171-0/+21
|
* ntfs-3g: Document problems with symlinks and alternatives (RHBZ#663407).Richard W.M. Jones2010-12-161-0/+31
|
* New APIs: getxattr and lgetxattr to get single extended attributes.Richard W.M. Jones2010-12-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* appliance: Don't set utime on cachedir until we know it is safe.Richard W.M. Jones2010-12-111-1/+2
| | | | | This could be used to touch an arbitrary file (albeit one which must already exist), and this could have been a security problem.
* appliance: Touch cached appliance files so they don't get tmp cleaned.Richard W.M. Jones2010-12-111-0/+5
|
* Remove extra \n character from end of error messages.Richard W.M. Jones2010-12-111-3/+3
|
* appliance: Be careful about cleaning up old appliances.Richard W.M. Jones2010-12-111-165/+296
| | | | | | | | | | | This change resolves several issues with current appliance building: (1) Old appliances are cleaned up. (2) Race conditions between appliance building is handled better. (3) Several bugs fixed.
* Remove several unused local variables.Richard W.M. Jones2010-12-102-5/+0
| | | | (Revealed by compiling under Debian where this is a warning).
* build: Remove check for root.Richard W.M. Jones2010-12-091-11/+0
| | | | | | | With the new package building system, it is no longer dangerous to run 'configure', 'make' or 'make check' as root (although it is still not necessary and not advisable). In any case we don't need to check this.
* docs: Link to guestfs-examples(3) after simple example.Richard W.M. Jones2010-12-071-1/+2
|