* 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.
This commit is contained in:
Werner Koch 2004-05-11 09:15:56 +00:00
parent edda971a15
commit d3184ce584
7 changed files with 38 additions and 16 deletions

3
NEWS
View File

@ -1,6 +1,9 @@
Noteworthy changes in version 1.9.9
------------------------------------------------
* [gpg-agent] The new option --allow-mark-trusted is now required to
allow gpg-agent to add a key to the trustlist.txt after user
confirmation.
Noteworthy changes in version 1.9.8 (2004-04-29)

5
TODO
View File

@ -70,11 +70,6 @@ might want to have an agent context for each service request
* scd/sc-investigate
** Enhance with card compatibility check
* scd/app-openpgp
Must check that the fingerprint used is not the one of the
authentication key. Old GnuPG versions seem to encode the wrong
keyID.
* tests
** Makefile.am
We use printf(1) to setup the library path, this is not portable.

View File

@ -34,7 +34,7 @@ NEED_GPG_ERROR_VERSION=0.7
NEED_LIBGCRYPT_API=1
NEED_LIBGCRYPT_VERSION=1.1.94
NEED_LIBASSUAN_VERSION=0.6.5
NEED_LIBASSUAN_VERSION=0.6.6
NEED_KSBA_VERSION=0.9.4

View File

@ -1,3 +1,10 @@
2004-05-11 Werner Koch <wk@gnupg.org>
* 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.
2004-04-30 Werner Koch <wk@gnupg.org>
* import.c (check_and_store): Do not update the stats for hidden

View File

@ -701,7 +701,6 @@ main ( int argc, char **argv)
CERTLIST recplist = NULL;
CERTLIST signerlist = NULL;
int do_not_setup_keys = 0;
char *config_filename = NULL;
/* trap_unaligned ();*/
set_strusage (my_strusage);
@ -1136,14 +1135,16 @@ main ( int argc, char **argv)
fclose (configfp);
configfp = NULL;
/* Keep a copy of the config filename. */
config_filename = configname;
opt.config_filename = configname;
configname = NULL;
goto next_pass;
}
xfree (configname);
configname = NULL;
if (!opt.config_filename)
opt.config_filename = make_filename (opt.homedir, "gpgsm.conf", NULL);
if (log_get_errorcount(0))
gpgsm_exit(2);
@ -1297,11 +1298,8 @@ main ( int argc, char **argv)
a default, which is described by the value of the ARGDEF field. */
#define GC_OPT_FLAG_NO_ARG_DESC (1UL << 6)
if (!config_filename)
config_filename = make_filename (opt.homedir, "gpgsm.conf", NULL);
printf ("gpgconf-gpgsm.conf:%lu:\"%s\n",
GC_OPT_FLAG_DEFAULT, config_filename);
GC_OPT_FLAG_DEFAULT, opt.config_filename);
printf ("verbose:%lu:\n"
"quiet:%lu:\n"

View File

@ -45,7 +45,8 @@ struct {
int answer_no; /* assume no on most questions */
int dry_run; /* don't change any persistent data */
const char *homedir; /* configuration directory name */
const char *homedir; /* Configuration directory name */
const char *config_filename; /* Name of the used config file. */
const char *agent_program;
char *display;
char *ttyname;

View File

@ -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);