[PATCH] gpg: Avoid using XDG_RUNTIME_DIR as socketdir.

Daniel Kahn Gillmor dkg at fifthhorseman.net
Tue Jan 3 19:01:15 CET 2017


On Tue 2017-01-03 09:52:37 -0500, Damien Goutte-Gattat wrote:
> * common/homedir.c (_gnupg_socketdir_internal): Check that the
> directory under [/var]/run/user is not set as XDG_RUNTIME_DIR.
> * tools/gpgconf.c (main): Report avoidance of XDG_RUNTIME_DIR.
> --
>
> We do not want to put the sockets in XDG_RUNTIME_DIR because
> the XDG Base Directory specification says the directory is to
> be removed when the user logs out. Unfortunately, on some
> GNU/Linux distributions XDG_RUNTIME_DIR happens to be set to
> /run/user/$UID; we should then avoid using that directory if
> we do not want our sockets to be forcibly removed.

I disagree with this proposal -- we actually *do* want to use the
directory that gets removed when the user logs out.  combined with
detection of socket removal, this provides reasonably simple, automatic
daemon cleanup at logout without any additional configuration or system
integration work.

         --dkg
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 832 bytes
Desc: not available
URL: </pipermail/attachments/20170103/dd557d86/attachment.sig>


More information about the Gnupg-devel mailing list