[PATCH] Add hostname to default env file

Werner Koch wk at gnupg.org
Mon Sep 10 19:03:24 CEST 2007


On Mon, 10 Sep 2007 17:51, jari.aalto at cante.net said:

>> This breaks existing installations.  What about using 
>
> Not many; and certianly not seriously.

You know all installations of gpg-agent?  I doubt that.

> 1) The change si limited. It affects only installation that use 
>    --write-env-file with no options.
> 2) Restat takes care of this.

No, it does not.  The scripts making use of ~/.gpg-agent-info need to be
modified as well.  You may do this for a stock Debian installation but
there are many more users of that code, so this is not an option.

> Announcing changes in release notes can be used to notify upgrading
> users.

Breaking an API is a bad idea; it should only be done if it is really
really required.  This is definitely not the case here.

>>   gpg-agent --write-env-file ${HOME}/.gpg-agent-info-$(hostname) ...
>>
>> in the startup script?  
>
> This was exactly the reason why bug was raised and Eric kindly submitted
> a proposed. The current existing implementation was limited to a single
> host only and the design did not foreseen other environments.

Please read the above example again - it has the identical effect as the
supplied patch.

> No directoried outside of $HOME can't be used for interoperability. The
> /tmp is machine specific directory and wonät work on network mounted
> disks.

Maybe the manual is not clear enough.  The environment variable, and
thus the .gpg-agent-info trick, is only used to convey information about
the local machine, i.e. the Unix domain socket used to connect to the
agent.  You can't use a socket name on an NFS mounted partition.

The long term plan is to get rid of this environment variable
(GPG_AGENT_INFO) and replace it with a well known name for the socket.
This name needs to be at a location which is specific to the local
system.  /tmp/gnupg-foo seems to be a good place and my question was
merely what disadvantages such an approach might have.  Note that many
programs use such socket file below /tmp, identified by application- and
username.


Salam-Shalom,

   Werner

-- 
Die Gedanken sind frei.  Auschnahme regelt ein Bundeschgesetz.




More information about the Gnupg-devel mailing list