gpg-agent not launched correctly in Xsesson scripts

Bug #743268 reported by Polar
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
gnupg2 (Ubuntu)
Confirmed
Medium
Unassigned

Bug Description

Binary package hint: gnupg-agent

The 90gpg-agent script incorrectly assumes that by calling gpg-agent without arguments it will not create another gpg-agent. I find this assumption to be false. Thereby, it creates an orphan gpg-agent or not one at all. The correct way to check for it would be to use gpg-connect-agent. I have a patch for this.

ProblemType: Bug
DistroRelease: Ubuntu 10.10
Package: gnupg-agent 2.0.14-1.1ubuntu2
ProcVersionSignature: Ubuntu 2.6.35-28.49-generic 2.6.35.11
Uname: Linux 2.6.35-28-generic x86_64
NonfreeKernelModules: nvidia
Architecture: amd64
Date: Sat Mar 26 14:55:26 2011
InstallationMedia: Kubuntu 10.10 "Maverick Meerkat" - Release amd64 (20101007)
ProcEnviron:
 PATH=(custom, user)
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: gnupg2

Revision history for this message
Polar (polar-syr) wrote :
tags: added: patch
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in gnupg2 (Ubuntu):
status: New → Confirmed
Revision history for this message
Roy Liu (royliu) wrote :

I don't think the patch above works, for the reason that invoking gpg-agent without arguments achieves the same effect as invoking gpg-connect-agent with an empty stdin. Notice that the return code for former is 0 if the gpg-agent could be detected and 2 if not. The issue is that since the gpg-agent-info file is in a non-standard location, it has to be sourced to get the GPG_AGENT_INFO variable, which the startup script does. Unfortunately, GPG_AGENT_INFO isn't visible to the {gpg-agent, gpg-agent-connect} test process since it's not exported. That means the test process would give a nonzero return and cause an orphaned gpg-agent process to be spawned. A simple fix would be to export the GPG_AGENT_INFO variable, which is what I proposed in my bug report: https://bugs.launchpad.net/bugs/804641.

Rolf Leggewie (r0lf)
Changed in gnupg2 (Ubuntu):
importance: Undecided → Medium
Revision history for this message
Rolf Leggewie (r0lf) wrote :

FWIW, the assumption that calling gpg-agent without arguments will not create another gpg-agent instance does seem to hold true for lucid for me. Maybe this changed in 10.10?

$ pidof gpg-agent
1821
$ gpg-agent
gpg-agent: gpg-agent running and available
$ pidof gpg-agent
1821

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.