[PATCH] Make metafile be encrypted to all recipients, as well as the data blocks

Alex Vandiver alexmv at bestpractical.com
Tue Apr 27 04:20:42 UTC 2010


---

This patch fixes the other encryption invoation which my previous patch missed.

 lib/Brackup/Backup.pm |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/lib/Brackup/Backup.pm b/lib/Brackup/Backup.pm
index 35bf579..50e55aa 100644
--- a/lib/Brackup/Backup.pm
+++ b/lib/Brackup/Backup.pm
@@ -290,9 +290,14 @@ sub backup {
         # store the metafile, encrypted, on the target
         if ($gpg_rcpt) {
             my $encfile = $backup_file . ".enc";
+            my @recipients = map {("--recipient", $_)} split ' ', $gpg_rcpt;
             system($self->{root}->gpg_path, $self->{root}->gpg_args,
+                   @recipients,
                    "--trust-model=always",
-                   "--recipient", $gpg_rcpt, "--encrypt", "--output=$encfile", "--yes", $backup_file)
+                   "--encrypt",
+                   "--output=$encfile",
+                   "--yes",
+                   $backup_file)
                 and die "Failed to run gpg while encryping metafile: $!\n";
             open ($store_fh, $encfile) or die "Failed to open encrypted metafile '$encfile': $!\n";
             $store_filename = $encfile;
-- 
1.7.0.5



More information about the brackup mailing list