#803699 [libpam-poldi] libpam-poldi is unable to find GPG_AGENT_INFO in ENV

Package:
libpam-poldi
Source:
poldi
Description:
PAM module allowing authentication using a OpenPGP smartcard
Submitter:
Sebastian Cabrera
Date:
2015-11-01 20:57:05 UTC
Severity:
normal
#803699#5
Date:
2015-11-01 20:40:00 UTC
From:
To:
--- Please enter the report below this line. ---

libpam-poldi is unable to find the GPG_AGENT_INFO information within the env string when using the following code block:

  /*** Connect to Scdaemon. ***/

  err = scd_connect (&scd_ctx,
		     NULL, getenv ("GPG_AGENT_INFO"),
		     ctx->scdaemon_program, 0, ctx->loghandle);
  if (err)
    goto out;

within src/pam/pam_poldi.c in the poldi package. "null" is passed to scd_connect function and therefore no already running scdaemon instance is being found and used. It than tries to run it's own instance of the scdaemon which is having issues using the cardreader as it is already in use.

I'm not sure if that makes sence, but probably it could be fixed by trying to get the information from the gpg-agent-info-* file created within the .gnupg (gpg-agent by default creates this file via the --write-env-file option), if it is there.

Currently poldi is broken when using sudo or trying to login outside the X-Session as the getenv calls returns "null" all of the time, when there is a already running scdaemon instance.


Debian Release: 8.2
  500 stable          www.deb-multimedia.org
  500 stable          security.debian.org
  500 stable          ftp2.de.debian.org
  500 stable          dl.google.com
  500 jessie-backports mozilla.debian.net
  100 jessie-backports ftp.debian.org
--- Package information. ---
Package's Depends field is empty.

Package's Recommends field is empty.

Package's Suggests field is empty.