[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [pkg-gnupg-maint] Bug#840669: Bug#840669: Beware of leftover gpg-agent processes

On Fri 2016-10-14 15:18:40 -0400, Werner Koch wrote:
> On Fri, 14 Oct 2016 19:17, ijackson@chiark.greenend.org.uk said:
>> authorisations, if the user types in a passphrase) have a lifetime
>> limited by that of the gpg process which started the agent.
> In a new temp directory do:
>  GNUPGHOME=$(pwd) gpg-agent --daemon gpg .....
> Or whatever you want to run under gpg-agent's control.  This has been
> there for ages.

fwiw, this doesn't work (and actually returns an error) if there is
already a gpg-agent running in that $GNUPGHOME:

0 dkg@alice:/tmp/cdtemp.ofhjoX$ export GNUPGHOME=$(pwd)
0 dkg@alice:/tmp/cdtemp.ofhjoX$ gpg-connect-agent /bye
gpg-connect-agent: no running gpg-agent - starting '/usr/bin/gpg-agent'
gpg-connect-agent: waiting for the agent to come up ... (5s)
gpg-connect-agent: connection to agent established.
2 dkg@alice:/tmp/cdtemp.ofhjoX$ ls
private-keys-v1.d  S.gpg-agent	      S.gpg-agent.rstrd  trustdb.gpg
pubring.kbx	   S.gpg-agent.brwsr  S.gpg-agent.ssh
0 dkg@alice:/tmp/cdtemp.ofhjoX$ gpg-agent --daemon ls
gpg-agent: a gpg-agent is already running - not starting a new one
2 dkg@alice:/tmp/cdtemp.ofhjoX$ 


Attachment: signature.asc
Description: PGP signature

Reply to: