GPG homedir path length limit

Daniel Kahn Gillmor dkg at
Wed Feb 15 18:21:20 CET 2017

On Wed 2017-02-15 12:12:23 -0500, Daniel Kahn Gillmor wrote:
> Why does this need to be created manually?  Why not try to create it if
> possible the first time there's a chance to use it, no matter what?
> What does GnuPG gain from having a known failure mode that requires a
> manual fix?

So one possible issue with my proposal is that by requiring explicit use
of --create-socketdir you remind the user that they're also responsible
for figuring out when to --remove-socketdir.

However, that shouldn't be necessary either.  If gpg-agent or dirmngr
terminates knowing that they should remove their own sockets, they can
do that and then just rmdir(2) on the ephemeral directory path.

If rmdir returns ENOTEMPTY, that's fine -- presumably some other daemon
is also using that path.  if it returns successfully, then the directory
is cleaned up, as it should be.

In --supervised mode, the deamons should not be responsible for removing
any sockets, so they would also not be responsible for cleaning up the
parent directory either.

does this make sense?  Are there any downsides that i'm missing?


More information about the Gnupg-users mailing list