summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRichard Jones <rjones@redhat.com>2010-04-23 14:14:26 +0100
committerRichard Jones <rjones@redhat.com>2010-04-23 14:15:13 +0100
commit41ee105aabaf1e9a7efc437b87d9536d3dc14a75 (patch)
tree93a9c62bc14419092b1d7aee16b28dae04e72a59 /src
parent89a707aac5aa75d70cbb3049e8d328cfe6a40dea (diff)
downloadlibguestfs-41ee105aabaf1e9a7efc437b87d9536d3dc14a75.tar.gz
libguestfs-41ee105aabaf1e9a7efc437b87d9536d3dc14a75.tar.xz
libguestfs-41ee105aabaf1e9a7efc437b87d9536d3dc14a75.zip
New API: checksums-out for checksumming many files.
Useful API for verifying the integrity of virtual machines.
Diffstat (limited to 'src')
-rw-r--r--src/MAX_PROC_NR2
-rwxr-xr-xsrc/generator.ml20
2 files changed, 20 insertions, 2 deletions
diff --git a/src/MAX_PROC_NR b/src/MAX_PROC_NR
index 77f83230..7f05eede 100644
--- a/src/MAX_PROC_NR
+++ b/src/MAX_PROC_NR
@@ -1 +1 @@
-243
+244
diff --git a/src/generator.ml b/src/generator.ml
index c51df382..14cf462a 100755
--- a/src/generator.ml
+++ b/src/generator.ml
@@ -2028,7 +2028,9 @@ Compute the SHA512 hash (using the C<sha512sum> program).
The checksum is returned as a printable string.
-To get the checksum for a device, use C<guestfs_checksum_device>.");
+To get the checksum for a device, use C<guestfs_checksum_device>.
+
+To get the checksums for many files, use C<guestfs_checksums_out>.");
("tar_in", (RErr, [FileIn "tarfile"; Pathname "directory"]), 69, [],
[InitBasicFS, Always, TestOutput (
@@ -4546,6 +4548,22 @@ to C<filename>.");
This command downloads the contents of C<filename>, writing
it out to local file C<base64file> encoded as base64.");
+ ("checksums_out", (RErr, [String "csumtype"; Pathname "directory"; FileOut "sumsfile"]), 244, [],
+ [],
+ "compute MD5, SHAx or CRC checksum of files in a directory",
+ "\
+This command computes the checksums of all regular files in
+C<directory> and then emits a list of those checksums to
+the local output file C<sumsfile>.
+
+This can be used for verifying the integrity of a virtual
+machine. However to be properly secure you should pay
+attention to the output of the checksum command (it uses
+the ones from GNU coreutils). In particular when the
+filename is not printable, coreutils uses a special
+backslash syntax. For more information, see the GNU
+coreutils info file.");
+
]
let all_functions = non_daemon_functions @ daemon_functions