[pkg-gnupg-maint] Bug#509554: pinentry-curses destroys terminal settings

Antonio Ospite ao2 at ao2.it
Tue Nov 15 15:36:03 UTC 2016


On Tue, 15 Nov 2016 16:55:30 +0900
Daniel Kahn Gillmor <dkg at fifthhorseman.net> wrote:

> Hi Antonio--
> 
> On Mon 2016-11-14 23:45:55 +0900, Antonio Ospite wrote:
> > I still experience this issue with the vim-gnupg[1] plugin after
> > I disable a workaround[2,3] its author added. JFYI I disable the
> > workaround because it has side effects[4].
> 
> I don't think #509554 was about the gpg plugin -- was it?  (i'm not a
> vim user).
>

Hi Daniel,

it's true, bug #509554 was not strictly about the vim-gnupg plugin, it
was about the interaction between pinentry-curses and vim (or mutt), and
I am facing the same problem. The vim-gnupg plugin was just another
example of how to show the issue.

A minimal test could be this:

  $ sudo update-alternatives --set pinentry /usr/bin/pinentry-curses
  $ (echo LINE1 ; echo LINE2) | gpg -e > encrypted.gpg
  $ echo RELOADAGENT | gpg-connect-agent
  $ vi -u NONE -c 'set nocompatible' -c ':r!gpg --decrypt encrypted.gpg'

the '-u NONE' part disables any external plugin, and 'set nocompatible'
is used in vim to enable the arrow keys, and make sure that the curses
dialog shows correctly.

> It sounds like you might be asking about a different issue -- maybe it
> should be a new bug report?
> 
[...]
> Arbitrary plugins for vim can produce arbitrary errors -- Does this
> problem happen with the gnupg.vim in the vim-scripts package in debian?
> 

Yes, this happens also with /usr/share/vim-scripts/plugin/gnupg.vim,
and as shown above it even happens with no plugins at all.

However your reply made me think that while (IMHO) the issue described
in the original bug report is still there, it may not be specific to
pinentry-curses, I tried calling another curses program from vim in the
same way, and I get the same behavior:

  $ (echo LINE1 ; echo LINE2) > /tmp/unencrypted.txt
  $ vi -u NONE -c 'set nocompatible' -c 'r!dialog --stdout --editbox /tmp/unencrypted.txt 0 0'

I'll ask some vim experts to see if they know about this problem, but
the original reporter experienced the issue with mutt as well, so it may
not be vim specific either.

Thanks,
   Antonio

-- 
Antonio Ospite
https://ao2.it
https://twitter.com/ao2it

A: Because it messes up the order in which people normally read text.
   See http://en.wikipedia.org/wiki/Posting_style
Q: Why is top-posting such a bad thing?



More information about the pkg-gnupg-maint mailing list