[PATCH] Use $DIRMNGR_INFO to find dirmngr.
Werner Koch
wk at gnupg.org
Wed Apr 17 11:53:45 CEST 2013
On Wed, 17 Apr 2013 01:44, gnupg-devel at spodhuis.org said:
> Since dirmngr can take --socket-name to point the socket location
> to somewhere acceptable for the user, the path from $DIRMNGR_INFO
> is the safest way to find how to communicate.
Dirmngr was designed as a system service, thus the hardwired socket
name. The whole thing will be changed anyway to be started on demand,
much like gpg-agent. Thus this patch does not make sense. Some
comments anyway:
The ChangeLog Entries are mssing; see doc/HACKING.
> + if (existing != NULL) {
Please do me a favour and avoid comparsions to NULL.
if (existsing)
{
}
is much easier to read and less error prone. Yes, I know there are
different schools, but in GnuPG this should be used if you remember it.
Please also use GNU indentation style; for master most of the code has
been converted to that style and thus new code should generally be
written in this style. Well, for a small change of existing old-style
indented code, you would keep the old style.
> + found = xstrdup(found);
> + p = strchr(found, ':');
> + if (p == NULL) {
> + free(found);
Please always use xfree instead of free.
Shalom-Salam,
Werner
--
Die Gedanken sind frei. Ausnahmen regelt ein Bundesgesetz.
More information about the Gnupg-devel
mailing list