summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>2009-01-20 20:24:24 +0100
committerWerner Koch <wk@gnupg.org>2009-01-20 20:24:24 +0100
commit7b33b9324abc05ccd221af475e1b08012abe354f (patch)
tree840c2f3ed39113b06e6f00d7cf1d692b1a55d387
parentAdd a few translations to the audit-log. (diff)
downloadgnupg2-7b33b9324abc05ccd221af475e1b08012abe354f.tar.xz
gnupg2-7b33b9324abc05ccd221af475e1b08012abe354f.zip
Print more directories with gpgconf --list-dirs.
-rw-r--r--doc/tools.texi11
-rw-r--r--jnlib/stringhelp.c4
-rw-r--r--po/de.po4
-rw-r--r--tools/ChangeLog4
-rw-r--r--tools/gpgconf.c41
5 files changed, 55 insertions, 9 deletions
diff --git a/doc/tools.texi b/doc/tools.texi
index e89a998dc..506529065 100644
--- a/doc/tools.texi
+++ b/doc/tools.texi
@@ -239,10 +239,13 @@ configuration file (usually @file{/etc/gnupg/gpgconf.conf}).
@item --list-dirs
Lists the directories used by @command{gpgconf}. One directory is
-listed per line, and each line consists of a colon-separated list
-where the first field names the directory type (for example
-@code{sysconfdir}) and the second field contains the percent-escaped
-directory.
+listed per line, and each line consists of a colon-separated list where
+the first field names the directory type (for example @code{sysconfdir})
+and the second field contains the percent-escaped directory. Although
+they are not directories, the socket file names used by
+@command{gpg-agent} and @command{dirmngr} are printed as well. Note
+that the socket file names and the @code{homedir} lines are the default
+names and they may be overridden by command line switches.
@item --list-config [@var{filename}]
List the global configuration file in a colon separated format. If
diff --git a/jnlib/stringhelp.c b/jnlib/stringhelp.c
index 7f09c517c..3760c1db3 100644
--- a/jnlib/stringhelp.c
+++ b/jnlib/stringhelp.c
@@ -314,8 +314,8 @@ make_dirname(const char *filepath)
/* Implementation of make_filename and make_filename_try. We need to
- use macros here toa void the use of the soemtimes problematic
- va_copy fucntion which is not available on all systems. */
+ use macros here to avoid the use of the sometimes problematic
+ va_copy function which is not available on all systems. */
#define MAKE_FILENAME_PART1 \
va_list arg_ptr; \
size_t n; \
diff --git a/po/de.po b/po/de.po
index e634f15c2..d3242a284 100644
--- a/po/de.po
+++ b/po/de.po
@@ -10,7 +10,7 @@ msgstr ""
"Project-Id-Version: gnupg-2.0.10\n"
"Report-Msgid-Bugs-To: translations@gnupg.org\n"
"POT-Creation-Date: 2009-01-19 16:21+0100\n"
-"PO-Revision-Date: 2009-01-19 16:22+0100\n"
+"PO-Revision-Date: 2009-01-19 16:43+0100\n"
"Last-Translator: Walter Koch <koch@u32.de>\n"
"Language-Team: German <de@li.org>\n"
"MIME-Version: 1.0\n"
@@ -893,7 +893,7 @@ msgstr "Verbindung zum gpg-agent nicht möglich - Ersatzmethode wird versucht\n"
#. verbatim. It will not be printed.
#: common/audit.c:474
msgid "|audit-log-result|Good"
-msgstr "Korrekt"
+msgstr "|audit-log-result|Korrekt"
#: common/audit.c:477
msgid "|audit-log-result|Bad"
diff --git a/tools/ChangeLog b/tools/ChangeLog
index c533085d5..8c3474168 100644
--- a/tools/ChangeLog
+++ b/tools/ChangeLog
@@ -1,3 +1,7 @@
+2009-01-20 Werner Koch <wk@g10code.com>
+
+ * gpgconf.c (main): Print more directories.
+
2008-12-09 Werner Koch <wk@g10code.com>
* gpg-check-pattern.c (main): Call i18n_init before
diff --git a/tools/gpgconf.c b/tools/gpgconf.c
index 57ea08b3d..fdd77c461 100644
--- a/tools/gpgconf.c
+++ b/tools/gpgconf.c
@@ -258,12 +258,51 @@ main (int argc, char **argv)
break;
case aListDirs:
- /* Show the system configuration directory for gpgconf. */
+ /* Show the system configuration directories for gpgconf. */
get_outfp (&outfp);
fprintf (outfp, "sysconfdir:%s\n",
gc_percent_escape (gnupg_sysconfdir ()));
fprintf (outfp, "bindir:%s\n",
gc_percent_escape (gnupg_bindir ()));
+ fprintf (outfp, "libexecdir:%s\n",
+ gc_percent_escape (gnupg_libexecdir ()));
+ fprintf (outfp, "libdir:%s\n",
+ gc_percent_escape (gnupg_libdir ()));
+ fprintf (outfp, "datadir:%s\n",
+ gc_percent_escape (gnupg_datadir ()));
+ fprintf (outfp, "localedir:%s\n",
+ gc_percent_escape (gnupg_localedir ()));
+ fprintf (outfp, "dirmngr-socket:%s\n",
+ gc_percent_escape (dirmngr_socket_name ()));
+ {
+ char *infostr = getenv ("GPG_AGENT_INFO");
+
+ if (!infostr || !*infostr)
+ infostr = make_filename (default_homedir (), "S.gpg-agent", NULL);
+ else
+ {
+ char *tmp;
+
+ infostr = xstrdup (infostr);
+ tmp = strchr (infostr, PATHSEP_C);
+ if (!tmp || tmp == infostr)
+ {
+ xfree (infostr);
+ infostr = NULL;
+ }
+ else
+ *tmp = 0;
+ }
+ fprintf (outfp, "agent-socket:%s\n",
+ infostr? gc_percent_escape (infostr) : "");
+ xfree (infostr);
+ }
+ {
+ /* We need to use make_filename to expand a possible "~/". */
+ char *tmp = make_filename (default_homedir (), NULL);
+ fprintf (outfp, "homedir:%s\n", gc_percent_escape (tmp));
+ xfree (tmp);
+ }
break;
}