Minor cleanups.

This commit is contained in:
Werner Koch 2008-11-11 08:22:06 +00:00
parent 75c0534820
commit aec79fc731
36 changed files with 91 additions and 55 deletions

3
NEWS
View File

@ -35,6 +35,9 @@ Noteworthy changes in version 2.0.10 (unreleased)
* [w32] The sysconf directory has been moved from a subdirectory of
the installation directory to %CSIDL_COMMON_APPDATA%/GNU/etc/gnupg.
* [w32] The gnupg2.nls directory is not anymore used. The standard
locale directory is now used.
* The gpg-preset-passphrase mechanism works again.
* Admin PINs are cached again (bug in 2.0.9).

13
TODO
View File

@ -59,20 +59,14 @@
* scd
** Application context vs. reader slot
We have 2 concurrent method of tracking whether a reader is in use:
Using the session_list in command.c and the lock_table in app.c. IT
Using the session_list in command.c and the lock_table in app.c. It
would be better to do this just at one place. First we need to see
how we can support cards with multiple applications.
** Detecting a removed card works only after the ticker detected it.
We should check the card status in open-card to make this smoother.
Needs to be integrated with the status file update, though. It is
not a real problem because application will get a card removed
status and should then send a reset to try solving the problem.
** Resolve fixme in do_sign of app-dinsig.
** Add a regression test to check the extkeyusage.
* Windows port (W32)
** No card status notifications.
** Regex support is disabled
We need to adjust the test to find the regex we have anyway in
gpg4win. Is that regex compatible to the OpenPGP requirement?
@ -91,6 +85,7 @@
** issue a NO_SECKEY xxxx if a -u key was not found.
* Extend selinux support to other modules
See also http://etbe.coker.com.au/2008/06/06/se-linux-support-gpg/
* UTF-8 specific TODOs
None.
@ -101,9 +96,7 @@
some more work.
* Bugs
** After disabling scdaemon and sending a HUP
scdaemon stays as a zombie and gpg-agent does not perform any more
commands.
* Howtos
** Migrate OpenPGP keys to another system

View File

@ -1,3 +1,13 @@
2008-11-11 Werner Koch <wk@g10code.com>
* call-scd.c (membuf_data_cb): Change return type to
assuan_error_t to avoid warnings with newer libassuan versions.
2008-11-04 Werner Koch <wk@g10code.com>
* command.c (cmd_killagent): Stop the agent immediately.
(start_command_handler): Take care of GPG_ERR_EOF.
2008-10-29 Werner Koch <wk@g10code.com>
* gpg-agent.c (main): Move USE_STANDARD_SOCKET to the outer scope.

View File

@ -710,7 +710,7 @@ agent_card_serialno (ctrl_t ctrl, char **r_serialno)
static int
static assuan_error_t
membuf_data_cb (void *opaque, const void *buffer, size_t length)
{
membuf_t *data = opaque;

View File

@ -1362,8 +1362,11 @@ static int
cmd_killagent (assuan_context_t ctx, char *line)
{
ctrl_t ctrl = assuan_get_pointer (ctx);
(void)line;
ctrl->server_local->stopme = 1;
return 0;
return gpg_error (GPG_ERR_EOF);
}
/* RELOADAGENT
@ -1373,6 +1376,9 @@ cmd_killagent (assuan_context_t ctx, char *line)
static int
cmd_reloadagent (assuan_context_t ctx, char *line)
{
(void)ctx;
(void)line;
agent_sighup_action ();
return 0;
}
@ -1666,7 +1672,7 @@ start_command_handler (ctrl_t ctrl, gnupg_fd_t listen_fd, gnupg_fd_t fd)
for (;;)
{
rc = assuan_accept (ctx);
if (rc == -1)
if (gpg_err_code (rc) == GPG_ERR_EOF || rc == -1)
{
break;
}

View File

@ -42,9 +42,9 @@
static inline char *
change_slashes (char *name)
{
#ifdef HAVE_DRIVE_LETTERS
char *p;
#ifdef HAVE_DRIVE_LETTERS
if (strchr (name, '\\'))
{
for (p=name; *p; p++)

View File

@ -6,7 +6,7 @@ msgid ""
msgstr ""
"Project-Id-Version: gnupg 1.2.2\n"
"Report-Msgid-Bugs-To: translations@gnupg.org\n"
"POT-Creation-Date: 2008-10-28 15:18+0100\n"
"POT-Creation-Date: 2008-10-29 09:04+0100\n"
"PO-Revision-Date: 2003-10-30 16:35+0200\n"
"Last-Translator: Ales Nyakhaychyk <nab@mail.by>\n"
"Language-Team: Belarusian <i18n@mova.org>\n"

View File

@ -27,7 +27,7 @@ msgid ""
msgstr ""
"Project-Id-Version: gnupg 1.4.0\n"
"Report-Msgid-Bugs-To: translations@gnupg.org\n"
"POT-Creation-Date: 2008-10-28 15:18+0100\n"
"POT-Creation-Date: 2008-10-29 09:04+0100\n"
"PO-Revision-Date: 2005-02-04 02:04+0100\n"
"Last-Translator: Jordi Mallach <jordi@gnu.org>\n"
"Language-Team: Catalan <ca@dodds.net>\n"

View File

@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: gnupg-1.3.92\n"
"Report-Msgid-Bugs-To: translations@gnupg.org\n"
"POT-Creation-Date: 2008-10-28 15:18+0100\n"
"POT-Creation-Date: 2008-10-29 09:04+0100\n"
"PO-Revision-Date: 2004-11-26 09:12+0200\n"
"Last-Translator: Roman Pavlik <rp@tns.cz>\n"
"Language-Team: Czech <translations.cs@gnupg.cz>\n"

View File

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: gnupg 1.0.0h\n"
"Report-Msgid-Bugs-To: translations@gnupg.org\n"
"POT-Creation-Date: 2008-10-28 15:18+0100\n"
"POT-Creation-Date: 2008-10-29 09:04+0100\n"
"PO-Revision-Date: 2003-12-03 16:11+0100\n"
"Last-Translator: Birger Langkjer <birger.langkjer@image.dk>\n"
"Language-Team: Danish <dansk@klid.dk>\n"

View File

@ -9,8 +9,8 @@ msgid ""
msgstr ""
"Project-Id-Version: gnupg-2.0.6\n"
"Report-Msgid-Bugs-To: translations@gnupg.org\n"
"POT-Creation-Date: 2008-10-28 15:18+0100\n"
"PO-Revision-Date: 2008-06-27 14:10+0200\n"
"POT-Creation-Date: 2008-10-29 09:04+0100\n"
"PO-Revision-Date: 2008-11-04 18:44+0100\n"
"Last-Translator: Walter Koch <koch@u32.de>\n"
"Language-Team: German <de@li.org>\n"
"MIME-Version: 1.0\n"
@ -233,12 +233,8 @@ msgid ""
msgid_plural ""
"Warning: You have entered an insecure passphrase.%%0AA passphrase should be "
"at least %u characters long."
msgstr[0] ""
"WARNUNG: Sie haben eine offensichtlich unsichere%%0APassphrase eingegeben. "
"Eine Passphrase sollte%%0A mindestens %u Zeichen lang sein."
msgstr[1] ""
"WARNUNG: Sie haben eine offensichtlich unsichere%%0APassphrase eingegeben. "
"Eine Passphrase sollte%%0A mindestens %u Zeichen lang sein."
msgstr[0] "WARNUNG: Sie haben eine offensichtlich unsichere%%0APassphrase eingegeben. Eine Passphrase sollte%%0A mindestens %u Zeichen lang sein."
msgstr[1] "WARNUNG: Sie haben eine offensichtlich unsichere%%0APassphrase eingegeben. Eine Passphrase sollte%%0A mindestens %u Zeichen lang sein."
#: agent/genkey.c:214
#, c-format

View File

@ -6,7 +6,7 @@ msgid ""
msgstr ""
"Project-Id-Version: gnupg-1.1.92\n"
"Report-Msgid-Bugs-To: translations@gnupg.org\n"
"POT-Creation-Date: 2008-10-28 15:18+0100\n"
"POT-Creation-Date: 2008-10-29 09:04+0100\n"
"PO-Revision-Date: 2003-06-27 12:00+0200\n"
"Last-Translator: Dokianakis Theofanis <madf@hellug.gr>\n"
"Language-Team: Greek <nls@tux.hellug.gr>\n"

View File

@ -6,7 +6,7 @@ msgid ""
msgstr ""
"Project-Id-Version: gnupg 1.0.6d\n"
"Report-Msgid-Bugs-To: translations@gnupg.org\n"
"POT-Creation-Date: 2008-10-28 15:18+0100\n"
"POT-Creation-Date: 2008-10-29 09:04+0100\n"
"PO-Revision-Date: 2002-04-14 14:33+0100\n"
"Last-Translator: Edmund GRIMLEY EVANS <edmundo@rano.org>\n"
"Language-Team: Esperanto <translation-team-eo@lists.sourceforge.net>\n"

View File

@ -10,7 +10,7 @@ msgid ""
msgstr ""
"Project-Id-Version: gnupg 2.0.9\n"
"Report-Msgid-Bugs-To: translations@gnupg.org\n"
"POT-Creation-Date: 2008-10-28 15:18+0100\n"
"POT-Creation-Date: 2008-10-29 09:04+0100\n"
"PO-Revision-Date: 2008-05-27 22:38+0100\n"
"Last-Translator: Jaime Suárez <jaime@mundocripto.com>\n"
"Language-Team: Spanish <es@li.org>\n"

View File

@ -6,7 +6,7 @@ msgid ""
msgstr ""
"Project-Id-Version: gnupg 1.2.2\n"
"Report-Msgid-Bugs-To: translations@gnupg.org\n"
"POT-Creation-Date: 2008-10-28 15:18+0100\n"
"POT-Creation-Date: 2008-10-29 09:04+0100\n"
"PO-Revision-Date: 2004-06-17 11:04+0300\n"
"Last-Translator: Toomas Soome <Toomas.Soome@microlink.ee>\n"
"Language-Team: Estonian <et@li.org>\n"

View File

@ -22,7 +22,7 @@ msgid ""
msgstr ""
"Project-Id-Version: gnupg 1.2.2\n"
"Report-Msgid-Bugs-To: translations@gnupg.org\n"
"POT-Creation-Date: 2008-10-28 15:18+0100\n"
"POT-Creation-Date: 2008-10-29 09:04+0100\n"
"PO-Revision-Date: 2004-06-16 22:40+0300\n"
"Last-Translator: Tommi Vainikainen <Tommi.Vainikainen@iki.fi>\n"
"Language-Team: Finnish <translation-team-fi@lists.sourceforge.net>\n"

View File

@ -11,7 +11,7 @@ msgid ""
msgstr ""
"Project-Id-Version: gnupg 1.4.2rc2\n"
"Report-Msgid-Bugs-To: translations@gnupg.org\n"
"POT-Creation-Date: 2008-10-28 15:18+0100\n"
"POT-Creation-Date: 2008-10-29 09:04+0100\n"
"PO-Revision-Date: 2008-09-30 19:38+0200\n"
"Last-Translator: Gaël Quéri <gael@lautre.net>\n"
"Language-Team: French <traduc@traduc.org>\n"

View File

@ -6,7 +6,7 @@ msgid ""
msgstr ""
"Project-Id-Version: gnupg 1.2.4\n"
"Report-Msgid-Bugs-To: translations@gnupg.org\n"
"POT-Creation-Date: 2008-10-28 15:18+0100\n"
"POT-Creation-Date: 2008-10-29 09:04+0100\n"
"PO-Revision-Date: 2003-12-04 11:39+0100\n"
"Last-Translator: Jacobo Tarrio <jtarrio@trasno.net>\n"
"Language-Team: Galician <gpul-traduccion@ceu.fi.udc.es>\n"

View File

@ -6,7 +6,7 @@ msgid ""
msgstr ""
"Project-Id-Version: gnupg 1.2.5\n"
"Report-Msgid-Bugs-To: translations@gnupg.org\n"
"POT-Creation-Date: 2008-10-28 15:18+0100\n"
"POT-Creation-Date: 2008-10-29 09:04+0100\n"
"PO-Revision-Date: 2004-06-19 21:53+0200\n"
"Last-Translator: Nagy Ferenc László <nfl@nfllab.com>\n"
"Language-Team: Hungarian <translation-team-hu@lists.sourceforge.net>\n"

View File

@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: gnupg-id\n"
"Report-Msgid-Bugs-To: translations@gnupg.org\n"
"POT-Creation-Date: 2008-10-28 15:18+0100\n"
"POT-Creation-Date: 2008-10-29 09:04+0100\n"
"PO-Revision-Date: 2004-06-17 16:32+0700\n"
"Last-Translator: Tedi Heriyanto <tedi_h@gmx.net>\n"
"Language-Team: Indonesian <translation-team-id@lists.sourceforge.net>\n"

View File

@ -6,7 +6,7 @@ msgid ""
msgstr ""
"Project-Id-Version: gnupg 1.1.92\n"
"Report-Msgid-Bugs-To: translations@gnupg.org\n"
"POT-Creation-Date: 2008-10-28 15:18+0100\n"
"POT-Creation-Date: 2008-10-29 09:04+0100\n"
"PO-Revision-Date: 2008-05-26 12:02+0200\n"
"Last-Translator: Marco d'Itri <md@linux.it>\n"
"Language-Team: Italian <tp@lists.linux.it>\n"

View File

@ -9,7 +9,7 @@ msgid ""
msgstr ""
"Project-Id-Version: gnupg 1.3.92\n"
"Report-Msgid-Bugs-To: translations@gnupg.org\n"
"POT-Creation-Date: 2008-10-28 15:18+0100\n"
"POT-Creation-Date: 2008-10-29 09:04+0100\n"
"PO-Revision-Date: 2004-11-23 11:14+0900\n"
"Last-Translator: IIDA Yosiaki <iida@gnu.org>\n"
"Language-Team: Japanese <translation-team-ja@lists.sourceforge.net>\n"

View File

@ -10,7 +10,7 @@ msgid ""
msgstr ""
"Project-Id-Version: gnupg 1.4.3\n"
"Report-Msgid-Bugs-To: translations@gnupg.org\n"
"POT-Creation-Date: 2008-10-28 15:18+0100\n"
"POT-Creation-Date: 2008-10-29 09:04+0100\n"
"PO-Revision-Date: 2006-06-13 20:31+0200\n"
"Last-Translator: Trond Endrestøl <Trond.Endrestol@fagskolen.gjovik.no>\n"
"Language-Team: Norwegian Bokmål <i18n-nb@lister.ping.uio.no>\n"

View File

@ -9,7 +9,7 @@ msgid ""
msgstr ""
"Project-Id-Version: gnupg-2.0.7\n"
"Report-Msgid-Bugs-To: translations@gnupg.org\n"
"POT-Creation-Date: 2008-10-28 15:18+0100\n"
"POT-Creation-Date: 2008-10-29 09:04+0100\n"
"PO-Revision-Date: 2007-11-26 19:01+0100\n"
"Last-Translator: Jakub Bogusz <qboosh@pld-linux.org>\n"
"Language-Team: Polish <translation-team-pl@lists.sourceforge.net>\n"

View File

@ -9,7 +9,7 @@ msgid ""
msgstr ""
"Project-Id-Version: gnupg\n"
"Report-Msgid-Bugs-To: translations@gnupg.org\n"
"POT-Creation-Date: 2008-10-28 15:18+0100\n"
"POT-Creation-Date: 2008-10-29 09:04+0100\n"
"PO-Revision-Date: 2002-09-13 18:26+0100\n"
"Last-Translator: Pedro Morais <morais@kde.org>\n"
"Language-Team: pt <morais@kde.org>\n"

View File

@ -13,7 +13,7 @@ msgid ""
msgstr ""
"Project-Id-Version: gnupg 1.0\n"
"Report-Msgid-Bugs-To: translations@gnupg.org\n"
"POT-Creation-Date: 2008-10-28 15:18+0100\n"
"POT-Creation-Date: 2008-10-29 09:04+0100\n"
"PO-Revision-Date: 2007-08-16 11:35+0200\n"
"Last-Translator:\n"
"Language-Team: ?\n"

View File

@ -9,7 +9,7 @@ msgid ""
msgstr ""
"Project-Id-Version: gnupg 1.4.2rc1\n"
"Report-Msgid-Bugs-To: translations@gnupg.org\n"
"POT-Creation-Date: 2008-10-28 15:18+0100\n"
"POT-Creation-Date: 2008-10-29 09:04+0100\n"
"PO-Revision-Date: 2005-05-31 22:00-0500\n"
"Last-Translator: Laurentiu Buzdugan <lbuz@rolix.org>\n"
"Language-Team: Romanian <translation-team-ro@lists.sourceforge.net>\n"

View File

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: GnuPG 2.0.0\n"
"Report-Msgid-Bugs-To: translations@gnupg.org\n"
"POT-Creation-Date: 2008-10-28 15:18+0100\n"
"POT-Creation-Date: 2008-10-29 09:04+0100\n"
"PO-Revision-Date: 2006-11-07 19:31+0300\n"
"Last-Translator: Maxim Britov <maxim.britov@gmail.com>\n"
"Language-Team: Russian <gnupg-ru@gnupg.org>\n"

View File

@ -5,7 +5,7 @@ msgid ""
msgstr ""
"Project-Id-Version: gnupg 1.2.5\n"
"Report-Msgid-Bugs-To: translations@gnupg.org\n"
"POT-Creation-Date: 2008-10-28 15:18+0100\n"
"POT-Creation-Date: 2008-10-29 09:04+0100\n"
"PO-Revision-Date: 2004-07-20 15:52+0200\n"
"Last-Translator: Michal Majer <mmajer@econ.umb.sk>\n"
"Language-Team: Slovak <sk-i18n@lists.linux.sk>\n"

View File

@ -24,7 +24,7 @@ msgid ""
msgstr ""
"Project-Id-Version: gnupg trunk\n"
"Report-Msgid-Bugs-To: translations@gnupg.org\n"
"POT-Creation-Date: 2008-10-28 15:18+0100\n"
"POT-Creation-Date: 2008-10-29 09:04+0100\n"
"PO-Revision-Date: 2008-07-21 09:04+0200\n"
"Last-Translator: Daniel Nylander <po@danielnylander.se>\n"
"Language-Team: Swedish <tp-sv@listor.tp-sv.se>\n"

View File

@ -6,7 +6,7 @@ msgid ""
msgstr ""
"Project-Id-Version: gnupg 1.9.94\n"
"Report-Msgid-Bugs-To: translations@gnupg.org\n"
"POT-Creation-Date: 2008-10-28 15:18+0100\n"
"POT-Creation-Date: 2008-10-29 09:04+0100\n"
"PO-Revision-Date: 2006-11-04 03:45+0200\n"
"Last-Translator: Nilgün Belma Bugüner <nilgun@belgeler.gen.tr>\n"
"Language-Team: Turkish <gnu-tr-u12a@lists.sourceforge.net>\n"

View File

@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: gnupg 1.4.4\n"
"Report-Msgid-Bugs-To: translations@gnupg.org\n"
"POT-Creation-Date: 2008-10-28 15:18+0100\n"
"POT-Creation-Date: 2008-10-29 09:04+0100\n"
"PO-Revision-Date: 2006-07-02 10:58+0800\n"
"Last-Translator: Meng Jie <zuxyhere@eastday.com>\n"
"Language-Team: Chinese (simplified) <i18n-translation@lists.linux.net.cn>\n"

View File

@ -9,7 +9,7 @@ msgid ""
msgstr ""
"Project-Id-Version: gnupg 2.0.9\n"
"Report-Msgid-Bugs-To: translations@gnupg.org\n"
"POT-Creation-Date: 2008-10-28 15:18+0100\n"
"POT-Creation-Date: 2008-10-29 09:04+0100\n"
"PO-Revision-Date: 2008-03-26 22:35+0800\n"
"Last-Translator: Jedi Lin <Jedi@Jedi.org>\n"
"Language-Team: Chinese (traditional) <zh-l10n@linux.org.tw>\n"

View File

@ -1,5 +1,10 @@
2008-11-03 Werner Koch <wk@g10code.com>
* command.c (server_local_s): Add field DISCONNECT_ALLOWED.
(cmd_disconnect): Implement command.
(open_card): Reset disconnect flag.
(update_reader_status_file): Disconnect if allowed.
* app-common.h (app_ctx_s): Remove INITIALIZED. Make REF_COUNT
unsigned.
* app.c (select_application): Remove INITIALIZED.

View File

@ -111,6 +111,9 @@ struct server_local_s
/* True if the card has been removed and a reset is required to
continue operation. */
int card_removed;
/* A disconnect command has been sent. */
int disconnect_allowed;
};
@ -408,7 +411,10 @@ open_card (ctrl_t ctrl, const char *apptype)
{
/* Fixme: We should move the apdu_connect call to
select_application. */
int sw = apdu_connect (slot);
int sw;
ctrl->server_local->disconnect_allowed = 0;
sw = apdu_connect (slot);
if (sw && sw != SW_HOST_ALREADY_CONNECTED)
{
if (sw == SW_HOST_NO_CARD)
@ -1655,15 +1661,18 @@ cmd_restart (assuan_context_t ctx, char *line)
/* DISCONNECT
TBD
*/
Disconnect the card if it is not any longer used by other
connections and the backend supports a disconnect operation.
*/
static int
cmd_disconnect (assuan_context_t ctx, char *line)
{
(void)ctx;
ctrl_t ctrl = assuan_get_pointer (ctx);
(void)line;
return gpg_error (GPG_ERR_NOT_IMPLEMENTED);
ctrl->server_local->disconnect_allowed = 1;
return 0;
}
@ -1975,6 +1984,7 @@ update_reader_status_file (int set_card_removed_flag)
for (idx=0; idx < DIM(slot_table); idx++)
{
struct slot_status_s *ss = slot_table + idx;
struct server_local_s *sl;
if (!ss->valid || ss->slot == -1)
continue; /* Not valid or reader not yet open. */
@ -1987,7 +1997,6 @@ update_reader_status_file (int set_card_removed_flag)
char *fname;
char templ[50];
FILE *fp;
struct server_local_s *sl;
log_info ("updating status of slot %d to 0x%04X\n",
ss->slot, status);
@ -2084,6 +2093,18 @@ update_reader_status_file (int set_card_removed_flag)
}
}
/* Check whether a disconnect is pending. */
for (sl=session_list; sl; sl = sl->next_session)
if (!sl->disconnect_allowed)
break;
if (session_list && !sl)
{
/* At least one connection and all allow a disconnect. */
log_debug ("disconnecting card in slot %d\n", ss->slot);
apdu_disconnect (ss->slot);
}
}
}

View File

@ -17,6 +17,8 @@ main(int argc, char **argv)
{
int c;
(void)argv;
if( argc > 1 ) {
fprintf(stderr, "no arguments, please\n");
return 1;