r4985 - in /packages/libmail-gnupg-perl/trunk: GnuPG.pm debian/changelog

ntyni-guest at users.alioth.debian.org ntyni-guest at users.alioth.debian.org
Tue Apr 10 19:20:30 UTC 2007


Author: ntyni-guest
Date: Tue Apr 10 19:20:29 2007
New Revision: 4985

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=4985
Log:
fix #412041

Modified:
    packages/libmail-gnupg-perl/trunk/GnuPG.pm
    packages/libmail-gnupg-perl/trunk/debian/changelog

Modified: packages/libmail-gnupg-perl/trunk/GnuPG.pm
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libmail-gnupg-perl/trunk/GnuPG.pm?rev=4985&op=diff
==============================================================================
--- packages/libmail-gnupg-perl/trunk/GnuPG.pm (original)
+++ packages/libmail-gnupg-perl/trunk/GnuPG.pm Tue Apr 10 19:20:29 2007
@@ -63,6 +63,16 @@
   return $self;
 }
 
+sub _maybe_print {
+  # print to a child gpg process, but don't care if it has died already
+  # everyone using this will read the error string out afterwards anyway
+  # see http://bugs.debian.org/412041
+
+  my $fh = shift;
+  local $SIG{PIPE} = 'IGNORE';
+  print $fh @_;
+}
+
 sub _set_options {
   my ($self,$gnupg) = @_;
   $gnupg->options->meta_interactive( 0 );
@@ -162,11 +172,11 @@
 
   # This passes in the passphrase
   die "NO PASSPHRASE" unless defined $passphrase_fh;
-  print $passphrase_fh $self->{passphrase};
+  _maybe_print $passphrase_fh,$self->{passphrase};
   close $passphrase_fh;
 
   # this passes in the plaintext
-  print $input $ciphertext;
+  _maybe_print $input,$ciphertext;
 
   # this closes the communication channel,
   # indicating we are done
@@ -553,7 +563,7 @@
 				   );
   my $pid = $gnupg->detach_sign( handles => $handles );
   die "NO PASSPHRASE" unless defined $passphrase_fh;
-  print $passphrase_fh $self->{passphrase};
+  _maybe_print $passphrase_fh,$self->{passphrase};
   close $passphrase_fh;
 
 
@@ -571,7 +581,7 @@
   $plaintext =~ s/\x0D+/\x0D/g;
 
   # should we store this back into the body?
-  print $input $plaintext;
+  _maybe_print $input,$plaintext;
 
   # DEBUG:
 #  print "SIGNING THIS STRING ----->\n";
@@ -659,7 +669,7 @@
   $plaintext =~ s/\x0A/\x0D\x0A/g;
   $plaintext =~ s/\x0D+/\x0D/g;
 
-  print $input $plaintext;
+  _maybe_print $input,$plaintext;
   close $input;
   
   my @ciphertext = <$output>;
@@ -762,7 +772,7 @@
 	}
   };
 
-  print $input $plaintext;
+  _maybe_print $input,$plaintext;
   close $input;
   
   my @ciphertext = <$output>;
@@ -863,7 +873,7 @@
   };
 
   die "NO PASSPHRASE" unless defined $passphrase_fh;
-  print $passphrase_fh $self->{passphrase};
+  _maybe_print $passphrase_fh,$self->{passphrase};
   close $passphrase_fh;
 
  # this passes in the plaintext
@@ -878,7 +888,7 @@
   # $plaintext =~ s/\n/\x0D\x0A/sg;
   # should we store this back into the body?
 
-  print $input $plaintext;
+  _maybe_print $input,$plaintext;
 
   # DEBUG:
   #print "ENCRYPTING THIS STRING ----->\n";

Modified: packages/libmail-gnupg-perl/trunk/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libmail-gnupg-perl/trunk/debian/changelog?rev=4985&op=diff
==============================================================================
--- packages/libmail-gnupg-perl/trunk/debian/changelog (original)
+++ packages/libmail-gnupg-perl/trunk/debian/changelog Tue Apr 10 19:20:29 2007
@@ -1,9 +1,10 @@
 libmail-gnupg-perl (0.08-3) unstable; urgency=low
 
-  * Document how MIME-encoded signatures should be verified. 
+  * Document how MIME-encoded signatures should be verified.
     (Closes: #415088)
+  * Fix a race condition when passing bad recipients. (Closes: #412041)
 
- -- Niko Tyni <ntyni at iki.fi>  Tue, 10 Apr 2007 22:16:43 +0300
+ -- Niko Tyni <ntyni at iki.fi>  Tue, 10 Apr 2007 22:19:52 +0300
 
 libmail-gnupg-perl (0.08-2) unstable; urgency=low
 




More information about the Pkg-perl-cvs-commits mailing list