Proposal with patch: Make socket directory host dependent

Rainer Perske rainer.perske at
Fri Nov 17 20:03:12 CET 2017



> >   static const char * const bases[] = {
> >      "/run", "/var/run", NULL};

> [...] and for a distro build (--prefix=/) this would be

>       "/var/run",
>       "/run",
>       "/var/run"

> so that we need to detect this case to get the order right again.

ok, I had not seen this common edge case. What about this? (line 544)

  static const char * const bases[] = {"/run/gnupg", "/var/run/gnupg", "/run", "/var/run", NULL};

btw we must not forget to enlarge char prefix[] accordingly: (line 547)

  char prefix[6 + 13 + 1 + 20 + 6 + 1];

> I assume you are not using a a distro supplied gnupg; in this case a
> dedicated configure option for the first socketdir to try would be
> easier because it does not break existing usages.

Absolutely correct. However, inventing a new configure option would 
make my change request much larger and I always try to make such 
changes or change requests as small as possible hoping to avoid 
breaking something by accident.

> A runtime option
> can't be used here, except if we would take the list of socketdirs to
> try from a global config files (e.g. /etc/gnupg/socketdirs.list).

I agree completely, but that would be even more work that IMHO is 
probably not justified.

Have a fine weekend!
Rainer Perske
Abteilung Systembetrieb und Leiter der Zertifizierungsstelle (WWUCA)
Zentrum für Informationsverarbeitung (Universitätsrechenzentrum)

Westfälische Wilhelms-Universität
Zentrum für Informationsverarbeitung
Rainer Perske
Röntgenstraße 7-13
48149 Münster

Tel.: +49 251 83-31582
Fax.: +49 251 83-31555
E-Mail: rainer.perske at
Büro: Raum 006, Röntgenstraße 11

Zertifizierungsstelle der Universität Münster (WWUCA):
Tel.: +49 251 83-31590
Fax.: +49 251 83-31555
E-Mail: ca at

Zentrum für Informationsverarbeitung (ZIV):
Tel.: +49 251 83-31600 (Mo-Fr 7:30-17:30 Uhr)
Fax.: +49 251 83-31555
E-Mail: ziv at
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 6807 bytes
Desc: S/MIME cryptographic signature
URL: <>

More information about the Gnupg-devel mailing list