diff options
author | Werner Koch <wk@gnupg.org> | 2004-05-11 11:15:56 +0200 |
---|---|---|
committer | Werner Koch <wk@gnupg.org> | 2004-05-11 11:15:56 +0200 |
commit | d3184ce584f540d765da72988269e2d2a9f29e0f (patch) | |
tree | 3ee06d61d78c33d652a1b6b3f6ce4dc17d5cd369 /sm/server.c | |
parent | (log_set_file): Oops, don't close if LOGSTREAM is NULL. (diff) | |
download | gnupg2-d3184ce584f540d765da72988269e2d2a9f29e0f.tar.xz gnupg2-d3184ce584f540d765da72988269e2d2a9f29e0f.zip |
* gpgsm.h (opt): Add member CONFIG_FILENAME.
* gpgsm.c (main): Use it here instead of the local var.
* server.c (gpgsm_server): Print some additional information with
the hello in verbose mode.
Diffstat (limited to 'sm/server.c')
-rw-r--r-- | sm/server.c | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/sm/server.c b/sm/server.c index e73efe418..293857139 100644 --- a/sm/server.c +++ b/sm/server.c @@ -1,5 +1,5 @@ /* server.c - Server mode and main entry point - * Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc. + * Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc. * * This file is part of GnuPG. * @@ -786,6 +786,8 @@ gpgsm_server (certlist_t default_recplist) int filedes[2]; ASSUAN_CONTEXT ctx; struct server_control_s ctrl; + static const char hello[] = ("GNU Privacy Guard's S/M server " + VERSION " ready"); memset (&ctrl, 0, sizeof ctrl); gpgsm_init_default_ctrl (&ctrl); @@ -809,7 +811,23 @@ gpgsm_server (certlist_t default_recplist) assuan_strerror(rc)); gpgsm_exit (2); } - assuan_set_hello_line (ctx, "GNU Privacy Guard's S/M server ready"); + if (opt.verbose) + { + char *tmp = NULL; + if (asprintf (&tmp, + "Home: %s\n" + "Config: %s\n" + "%s", + opt.homedir, + opt.config_filename, + hello) > 0) + { + assuan_set_hello_line (ctx, tmp); + free (tmp); + } + } + else + assuan_set_hello_line (ctx, hello); assuan_register_reset_notify (ctx, reset_notify); assuan_register_input_notify (ctx, input_notify); |