On Wed, Feb 15, 2006 at 07:48:35PM +0100, Daniel R. wrote:
> Package: gnupg
> Version: 1.4.2-2
> Severity: important
> 
> 
> This bug comes after investigation of another bug 
> report for seahorse, see the following reference:
> http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=351347
> 
> Apparently, there is a bug in gnupg 1.4.2: it should 
> "not open /dev/tty if --no-tty is specified, since this 
> breaks programs like seahorse". However, it does.

Note that this bug was fixed in the GnuPG svn in 12/2005, and the fix
will be part of the upcoming 1.4.3.  In the meantime, here is a patch
for 1.4.2.

David
Index: util/ttyio.c
===================================================================
--- util/ttyio.c        (revision 3963)
+++ util/ttyio.c        (revision 3964)
@@ -179,8 +179,12 @@
 void
 tty_enable_completion(rl_completion_func_t *completer)
 {
+  if( no_terminal )
+    return;
+
   if( !initialized )
     init_ttyfp();
+
   rl_attempted_completion_function=completer;
   rl_inhibit_completion=0;
 }
@@ -188,8 +192,12 @@
 void
 tty_disable_completion(void)
 {
+  if( no_terminal )
+    return;
+
   if( !initialized )
     init_ttyfp();
+
   rl_inhibit_completion=1;
 }
 #endif /*HAVE_LIBREADLINE*/

Reply via email to