summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>2016-10-27 09:27:03 +0200
committerWerner Koch <wk@gnupg.org>2016-10-27 09:27:37 +0200
commitcf20b23c146c9e499263654644035796475de097 (patch)
tree28ce8130bc91c4b8001ea77eb178d536eac2fc94
parentcommon: Remove debug output from gnupg_get_socket_name. (diff)
downloadgnupg2-cf20b23c146c9e499263654644035796475de097.tar.xz
gnupg2-cf20b23c146c9e499263654644035796475de097.zip
dirmngr: Do not implement --supervised in Windows.
* dirmngr/dirmngr.c (opts) [W32]: Remove --supervised. (main) [W32]: Ditto. Signed-off-by: Werner Koch <wk@gnupg.org>
-rw-r--r--dirmngr/dirmngr.c10
-rw-r--r--doc/dirmngr.texi2
2 files changed, 8 insertions, 4 deletions
diff --git a/dirmngr/dirmngr.c b/dirmngr/dirmngr.c
index 29036812d..07cbed99a 100644
--- a/dirmngr/dirmngr.c
+++ b/dirmngr/dirmngr.c
@@ -150,7 +150,9 @@ static ARGPARSE_OPTS opts[] = {
ARGPARSE_c (aServer, "server", N_("run in server mode (foreground)") ),
ARGPARSE_c (aDaemon, "daemon", N_("run in daemon mode (background)") ),
- ARGPARSE_c (aSupervised, "supervised", N_("run under supervision (e.g. systemd)")),
+#ifndef HAVE_W32_SYSTEM
+ ARGPARSE_c (aSupervised, "supervised", N_("run in supervised mode")),
+#endif
ARGPARSE_c (aListCRLs, "list-crls", N_("list the contents of the CRL cache")),
ARGPARSE_c (aLoadCRL, "load-crl", N_("|FILE|load CRL from FILE into cache")),
ARGPARSE_c (aFetchCRL, "fetch-crl", N_("|URL|fetch a CRL from URL")),
@@ -996,6 +998,7 @@ main (int argc, char **argv)
start_command_handler (ASSUAN_INVALID_FD);
shutdown_reaper ();
}
+#ifndef HAVE_W32_SYSTEM
else if (cmd == aSupervised)
{
/* In supervised mode, we expect file descriptor 3 to be an
@@ -1004,9 +1007,9 @@ main (int argc, char **argv)
We will also not detach from the controlling process or close
stderr; the supervisor should handle all of that. */
struct stat statbuf;
- if (fstat (3, &statbuf) == -1 && errno ==EBADF)
+ if (fstat (3, &statbuf) == -1 && errno == EBADF)
{
- log_error ("file descriptor 3 must be already open in --supervised mode\n");
+ log_error ("file descriptor 3 must be validin --supervised mode\n");
dirmngr_exit (1);
}
socket_name = gnupg_get_socket_name (3);
@@ -1033,6 +1036,7 @@ main (int argc, char **argv)
assuan_sock_close (3);
shutdown_reaper ();
}
+#endif /*HAVE_W32_SYSTEM*/
else if (cmd == aDaemon)
{
assuan_fd_t fd;
diff --git a/doc/dirmngr.texi b/doc/dirmngr.texi
index 69d7e5e8f..6620a87a3 100644
--- a/doc/dirmngr.texi
+++ b/doc/dirmngr.texi
@@ -90,7 +90,7 @@ internal certificate validation code. This mode is deprecated.
Run in the foreground, sending logs to stderr, and listening on file
descriptor 3, which must already be bound to a listening socket. This
is useful when running under systemd or other similar process
-supervision schemes.
+supervision schemes. This option is not supported on Windows.
@item --list-crls
@opindex list-crls