Problem when decrypting multiple files

David Shaw dshaw at jabberwocky.com
Tue Apr 17 05:19:42 CEST 2007


On Fri, Apr 06, 2007 at 09:57:50AM -0700, mmorg76114 wrote:
> 
> Hey everyone,
> 
> I have a bit of a strange error here, hoping someone has run into this
> before. I have two different machines with GPG on them, and recently (about
> a month ago) they started behaving differently. I used to have a script
> which would run 
> 
> ..... --decrypt-files /home/whatever/*.gpg

and...

On Sun, Apr 08, 2007 at 05:29:08PM -0700, fourthirtysix wrote:
> 
> I'm getting errors when i try to decrypt multiple files at the same time with
> --decrypt-files. When I do files individually, they seem to decrypt fine.

This is fixed for 1.4.8.  I've attached a patch for now.

David
-------------- next part --------------
Index: mainproc.c
===================================================================
--- mainproc.c	(revision 4484)
+++ mainproc.c	(working copy)
@@ -88,6 +88,12 @@
 static void proc_tree( CTX c, KBNODE node );
 static int literals_seen;
 
+void
+reset_literals_seen(void)
+{
+  literals_seen=0;
+}
+
 static void
 release_list( CTX c )
 {
Index: packet.h
===================================================================
--- packet.h	(revision 4484)
+++ packet.h	(working copy)
@@ -423,6 +423,7 @@
 };
 
 /*-- mainproc.c --*/
+void reset_literals_seen(void);
 int proc_packets( void *ctx, IOBUF a );
 int proc_signature_packets( void *ctx, IOBUF a,
 			    STRLIST signedfiles, const char *sigfile );
Index: verify.c
===================================================================
--- verify.c	(revision 4484)
+++ verify.c	(working copy)
@@ -169,6 +169,7 @@
     rc = proc_signature_packets( NULL, fp, NULL, name );
     iobuf_close(fp);
     write_status( STATUS_FILE_DONE );
+    reset_literals_seen();
     return rc;
 }
 
Index: decrypt.c
===================================================================
--- decrypt.c	(revision 4484)
+++ decrypt.c	(working copy)
@@ -185,6 +185,7 @@
       write_status( STATUS_FILE_DONE );
       iobuf_ioctl( NULL, 2, 0, NULL); /* Invalidate entire cache. */
       xfree(output);
+      reset_literals_seen();
     }
 
   set_next_passphrase(NULL);  


More information about the Gnupg-users mailing list