Always pass correct name to argv[0]. Ignore GPG_AGENT_INFO for gpg2.
authorWerner Koch <wk@gnupg.org>
Fri, 21 Feb 2014 10:22:45 +0000 (11:22 +0100)
committerWerner Koch <wk@gnupg.org>
Fri, 21 Feb 2014 10:22:45 +0000 (11:22 +0100)
commit651d9e1c6bc1cab248024c3850ef64698247588f
tree1ef03ae1f09046eae7ae5c31daa48b7394c157b1
parentf916ab753b7d17210cd455666870038949f72851
Always pass correct name to argv[0].  Ignore GPG_AGENT_INFO for gpg2.

* src/dirinfo.c (WANT_GPG_ONE_MODE): New.
(struct dirinfo): Add field "gpg_one_mode".
(get_gpgconf_item): Set that field and return it if requested.
(_gpgme_in_gpg_one_mode): New.
* src/engine-gpg.c (build_argv): Check GPG_AGENT_INFO only in gpg-1
mode.

* src/dirinfo.c (_gpgme_get_basename): New.
* src/engine-g13.c (g13_new): Take argv[0] from the pgmname.
* src/engine-gpgsm.c (gpgsm_new): Ditto.
* src/engine-gpg.c (build_argv): Ditto. Add arg PGMNAME.
(start): Pass PGMNAME to buildargv.
src/dirinfo.c
src/engine-g13.c
src/engine-gpg.c
src/engine-gpgsm.c
src/util.h