Package: gnupg-agent
Version: 2.0.18-2
Severity: important

(This bug should perhaps be filed against both gnupg and gnupg2, but
debbug doesn't really have a clean way to do this, so...)

I expect you're aware that when gpg or gpg2 is invoked under Emacs, the
DISPLAY environment variable is unset, and gpg-agent needs to prompt for
a passphrase, the pinentry program makes a mess on the terminal.

It might not be fair to blame this on pinentry or gpg-agent, though
gpg-agent could perhaps discard any "ttyname" values accompanied by a
"ttytype" of "dumb", if the following excerpt from an strace of
gpg-connect-agent run using Emacs' `shell-command' is any indication:

,----
| socket(PF_FILE, SOCK_STREAM, 0)         = 4
| connect(4, {sa_family=AF_FILE, path="/home/naesten/.gnupg/S.gpg-agent"}, 34) 
= 0
| read(4, "OK Pleased to meet you, process "..., 1002) = 38
| write(4, "RESET", 5)                    = 5
| write(4, "\n", 1)                       = 1
| read(4, "OK\n", 1002)                   = 3
| write(4, "OPTION ttyname=/dev/pts/38", 26) = 26
| write(4, "\n", 1)                       = 1
| read(4, "OK\n", 1002)                   = 3
| write(4, "OPTION ttytype=dumb", 19)     = 19
| write(4, "\n", 1)                       = 1
| read(4, "OK\n", 1002)                   = 3
| write(4, "OPTION lc-ctype=en_US.UTF-8", 27) = 27
| write(4, "\n", 1)                       = 1
| read(4, "OK\n", 1002)                   = 3
| write(4, "OPTION lc-messages=en_US.UTF-8", 30) = 30
| write(4, "\n", 1)                       = 1
| read(4, "OK\n", 1002)                   = 3
`----

Alternatively, gnupg/gnupg2/et al could refrain from sending the tty at
all in such cases. I believe most of these programs use a library to
communicate with gpg-agent; perhaps the logic could be added there?

-- System Information:
Debian Release: squeeze/sid
  APT prefers testing
  APT policy: (990, 'testing'), (500, 'unstable'), (1, 'experimental')
Architecture: i386 (i686)

Kernel: Linux 2.6.30-1-686 (SMP w/1 CPU core)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages gnupg-agent depends on:
ii  libassuan0                    2.0.2-1    IPC library for the GnuPG componen
ii  libc6                         2.13-10    Embedded GNU C Library: Shared lib
ii  libgcrypt11                   1.4.6-5    LGPL Crypto library - runtime libr
ii  libgpg-error0                 1.10-0.3   library for common error values an
ii  libpth20                      2.0.7-13   The GNU Portable Threads
ii  libreadline6                  6.0-4      GNU readline and history libraries
ii  pinentry-gtk2 [pinentry]      0.8.1-1    GTK+-2-based PIN or pass-phrase en

Versions of packages gnupg-agent recommends:
ii  gnupg                         1.4.11-3   GNU privacy guard - a free PGP rep
ii  gnupg2                        2.0.18-2   GNU privacy guard - a free PGP rep

gnupg-agent suggests no packages.

-- no debconf information

-- 
Hi! I'm a .signature virus! Copy me into your ~/.signature to help me spread!



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to