Libcurl (was Re: [Announce] GnuPG 1.4.1 released)
David Shaw
dshaw at jabberwocky.com
Wed Mar 23 15:11:18 CET 2005
On Wed, Mar 23, 2005 at 10:06:03AM +0100, Carlo Luciano Bianco wrote:
> Il /22 mar 2005/, *David Shaw* ha scritto:
>
> > On Tue, Mar 22, 2005 at 11:38:47PM +0100, Carlo Luciano Bianco wrote:
> >
> >> By the way, what do you think about the path problem? I tried to add
> [...]
> > Can you try running with '--debug 1024' ? Do two runs, one with, and
> > one without --exec-path (on the command line).
>
> Sure. Without exec-path:
>
> --------------------------------------------------------------------------
> c:\>gpg --keyserver http://whatever --debug 1024 --recv-keys 99999999
> gpg: lettura delle opzioni da `H:/GnuPG\gpg.conf'
> gpg: DBG: set_exec_path method 0: PATH=c:\programmi\gnupg
> gpg: DBG: expanding string "gpgkeys_curl -o "%o" "%i""
> gpg: DBG: args expanded to "gpgkeys_curl -o "[]tempout.txt" "[]tempin.txt"",
> use 1, keep 0
> gpg: DBG: using temp file `[]tempin.txt'
> gpg: requesting key 99999999 from http server whatever
> gpg: DBG: system() command is gpgkeys_curl -o "[]tempout.txt" "[]tempin.txt"
> [...]
> secmem usage: 1408/1408 bytes in 2/2 blocks of pool 1408/32768
> --------------------------------------------------------------------------
>
> and with exec-path:
>
> --------------------------------------------------------------------------
> c:\>gpg --keyserver http://whatever --debug 1024 --exec-path "%PATH%"
> --recv-keys 99999999
> gpg: lettura delle opzioni da `H:/GnuPG\gpg.conf'
> gpg: DBG: set_exec_path method 0: PATH=Whole_PATH
> gpg: DBG: set_exec_path method 1: PATH=Whole_PATH
> gpg: DBG: expanding string "gpgkeys_curl -o "%o" "%i""
> gpg: DBG: args expanded to "gpgkeys_curl -o "[]tempout.txt" "[]tempin.txt"",
> use 1, keep 0
> gpg: DBG: using temp file `[]tempin.txt'
> gpg: requesting key 99999999 from http server whatever
> gpg: DBG: system() command is gpgkeys_curl -o "[]tempout.txt" "[]tempin.txt"
> [...]
> secmem usage: 1408/1408 bytes in 2/2 blocks of pool 1408/32768
> --------------------------------------------------------------------------
>
> I have summarized a bit the reports, to make them easier to read. When I
> wrote "[]" I mean the real full path of the files tempin and tempout in the
> temporary folder, and with "Whole_PATH" I mean the real value of my system
> %PATH% (which is more than 10 lines long, that's why I removed it).
>
> By the way, I have inspected, while running, gpg.exe with SysInternals'
> Process Explorer. It seems that gpg.exe itself does not see the real %PATH%.
> The environment associated with the running image of gpg.exe has a PATH
> limited to c:\programmi\gnupg.
Thanks for running that test. I can see what happened now. It's
amusing that this comes up so many years later, and it seems nobody
noticed.
When starting a keyserver subprocess, GPG sets the path to where the
subprocess binary exists (in your case c:\programmi\gnupg). In doing
so, it removes the earlier %PATH%. This is intentional, as I did not
want to search the whole PATH for a program named 'gpgkeys_xxx', and
run the risk of running the wrong one. However, removing the whole
PATH removes your DLL directory as well. I did not account for
someone putting the DLLs in a special directory, separate from the
system and the programs.
This is easy to fix, but I need to think for a moment on which fix is
best and keeps the current semantics of exec-path.
David
More information about the Gnupg-users
mailing list