From 41ee105aabaf1e9a7efc437b87d9536d3dc14a75 Mon Sep 17 00:00:00 2001 From: Richard Jones Date: Fri, 23 Apr 2010 14:14:26 +0100 Subject: New API: checksums-out for checksumming many files. Useful API for verifying the integrity of virtual machines. --- src/MAX_PROC_NR | 2 +- src/generator.ml | 20 +++++++++++++++++++- 2 files changed, 20 insertions(+), 2 deletions(-) (limited to 'src') 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 program). The checksum is returned as a printable string. -To get the checksum for a device, use C."); +To get the checksum for a device, use C. + +To get the checksums for many files, use C."); ("tar_in", (RErr, [FileIn "tarfile"; Pathname "directory"]), 69, [], [InitBasicFS, Always, TestOutput ( @@ -4546,6 +4548,22 @@ to C."); This command downloads the contents of C, writing it out to local file C 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 and then emits a list of those checksums to +the local output file C. + +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 -- cgit