summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>2010-06-24 12:51:30 +0200
committerWerner Koch <wk@gnupg.org>2010-06-24 12:51:30 +0200
commitc8bafe218c9ecf2bddef8d67753778afa8d9d30c (patch)
treed33f9589db631d060447e09ac64ee2f70d9d9e41
parentRemove cruft. (diff)
downloadgnupg2-c8bafe218c9ecf2bddef8d67753778afa8d9d30c.tar.xz
gnupg2-c8bafe218c9ecf2bddef8d67753778afa8d9d30c.zip
Fix a regression from 2010-06-09.
-rw-r--r--agent/ChangeLog5
-rw-r--r--agent/genkey.c2
-rw-r--r--common/ChangeLog8
-rw-r--r--common/asshelp.c6
-rw-r--r--g13/be-encfs.c2
-rw-r--r--g13/runner.c4
-rw-r--r--tools/ChangeLog6
-rw-r--r--tools/gpgconf-comp.c8
8 files changed, 29 insertions, 12 deletions
diff --git a/agent/ChangeLog b/agent/ChangeLog
index e0b8b8d10..c4aa1c299 100644
--- a/agent/ChangeLog
+++ b/agent/ChangeLog
@@ -1,3 +1,8 @@
+2010-06-24 Werner Koch <wk@g10code.com>
+
+ * genkey.c (check_passphrase_pattern): Use HANG option for
+ gnupg_wait_progress. Fixes regression from 2010-06-09.
+
2010-06-21 Werner Koch <wk@g10code.com>
* protect-tool.c (export_p12_file, import_p12_cert_cb)
diff --git a/agent/genkey.c b/agent/genkey.c
index 7c6b44b96..b064c98ed 100644
--- a/agent/genkey.c
+++ b/agent/genkey.c
@@ -129,7 +129,7 @@ check_passphrase_pattern (ctrl_t ctrl, const char *pw)
if (gnupg_spawn_process_fd (pgmname, argv, fileno (infp), -1, -1, &pid))
result = 1; /* Execute error - assume password should no be used. */
- else if (gnupg_wait_process (pgmname, pid, 0, NULL))
+ else if (gnupg_wait_process (pgmname, pid, 1, NULL))
result = 1; /* Helper returned an error - probably a match. */
else
result = 0; /* Success; i.e. no match. */
diff --git a/common/ChangeLog b/common/ChangeLog
index 1f5637845..dd8c0a3a2 100644
--- a/common/ChangeLog
+++ b/common/ChangeLog
@@ -1,3 +1,9 @@
+2010-06-24 Werner Koch <wk@g10code.com>
+
+ * asshelp.c (lock_agent_spawning) [W32]: Use CreateMutexW.
+ (start_new_gpg_agent): Use HANG option for gnupg_wait_progress.
+ Fixes regression from 2010-06-09.
+
2010-06-21 Werner Koch <wk@g10code.com>
* util.h (xfree_fnc): New.
@@ -41,7 +47,7 @@
* util.h (GNUPG_MODULE_NAME_DIRMNGR_LDAP): New.
* homedir.c (gnupg_cachedir): New.
(w32_try_mkdir): New.
- (dirmngr_socket_name): Chanmge standard socket name.
+ (dirmngr_socket_name): Change standard socket name.
(gnupg_module_name): Support GNUPG_MODULE_NAME_DIRMNGR_LDAP.
* logging.c (log_set_get_tid_callback): Replace by ...
diff --git a/common/asshelp.c b/common/asshelp.c
index bd7aa8de9..882c15479 100644
--- a/common/asshelp.c
+++ b/common/asshelp.c
@@ -226,7 +226,7 @@ lock_agent_spawning (lock_agent_t *lock, const char *homedir)
(void)homedir; /* Not required. */
- *lock = CreateMutex (NULL, FALSE, "GnuPG_spawn_agent_sentinel");
+ *lock = CreateMutexW (NULL, FALSE, L"GnuPG_spawn_agent_sentinel");
if (!*lock)
{
log_error ("failed to create the spawn_agent mutex: %s\n",
@@ -362,10 +362,10 @@ start_new_gpg_agent (assuan_context_t *r_ctx,
if (err)
log_debug ("starting `%s' for testing failed: %s\n",
agent_program, gpg_strerror (err));
- else if ((err = gnupg_wait_process (agent_program, pid, 0, &excode)))
+ else if ((err = gnupg_wait_process (agent_program, pid, 1, &excode)))
{
if (excode == -1)
- log_debug ("running `%s' for testing failed: %s\n",
+ log_debug ("running `%s' for testing failed (wait): %s\n",
agent_program, gpg_strerror (err));
}
gnupg_release_process (pid);
diff --git a/g13/be-encfs.c b/g13/be-encfs.c
index fb695e1be..dd8e53657 100644
--- a/g13/be-encfs.c
+++ b/g13/be-encfs.c
@@ -304,7 +304,7 @@ run_encfs_tool (ctrl_t ctrl, enum encfs_cmds cmd,
close (outbound[1]);
if (pid != (pid_t)(-1))
{
- gnupg_wait_process (pgmname, pid, 0, NULL);
+ gnupg_wait_process (pgmname, pid, 1, NULL);
gnupg_release_process (pid);
}
runner_release (runner);
diff --git a/g13/runner.c b/g13/runner.c
index 3ffe523ca..720cd9e58 100644
--- a/g13/runner.c
+++ b/g13/runner.c
@@ -165,7 +165,7 @@ runner_release (runner_t runner)
arbitrary NAME of the runner object. However it does not
matter because that information is only used for
diagnostics.) */
- gnupg_wait_process (runner->name, runner->pid, 0, NULL);
+ gnupg_wait_process (runner->name, runner->pid, 1, NULL);
gnupg_release_process (runner->pid);
}
@@ -371,7 +371,7 @@ runner_thread (void *arg)
int exitcode;
log_debug ("runner thread waiting ...\n");
- err = gnupg_wait_process (runner->name, runner->pid, 0, &exitcode);
+ err = gnupg_wait_process (runner->name, runner->pid, 1, &exitcode);
gnupg_release_process (runner->pid);
runner->pid = (pid_t)(-1);
if (err)
diff --git a/tools/ChangeLog b/tools/ChangeLog
index c1206d591..d3238b28c 100644
--- a/tools/ChangeLog
+++ b/tools/ChangeLog
@@ -1,3 +1,9 @@
+2010-06-24 Werner Koch <wk@g10code.com>
+
+ * gpgconf-comp.c (gpg_agent_runtime_change)
+ (scdaemon_runtime_change, retrieve_options_from_program): Use HANG
+ option for gnupg_wait_progress. Fixes regression from 2010-06-09.
+
2010-06-07 Werner Koch <wk@g10code.com>
* gpgtar.c, gpgtar.h, gpgtar-list.c, gpgtar-create.c
diff --git a/tools/gpgconf-comp.c b/tools/gpgconf-comp.c
index 505ca465a..f37a929aa 100644
--- a/tools/gpgconf-comp.c
+++ b/tools/gpgconf-comp.c
@@ -1051,7 +1051,7 @@ gpg_agent_runtime_change (void)
err = gnupg_spawn_process_fd (pgmname, argv, -1, -1, -1, &pid);
if (!err)
- err = gnupg_wait_process (pgmname, pid, 0, NULL);
+ err = gnupg_wait_process (pgmname, pid, 1, NULL);
if (err)
gc_error (0, 0, "error running `%s%s': %s",
pgmname, " reloadagent", gpg_strerror (err));
@@ -1083,7 +1083,7 @@ scdaemon_runtime_change (void)
err = gnupg_spawn_process_fd (pgmname, argv, -1, -1, -1, &pid);
if (!err)
- err = gnupg_wait_process (pgmname, pid, 0, NULL);
+ err = gnupg_wait_process (pgmname, pid, 1, NULL);
if (err)
gc_error (0, 0, "error running `%s%s': %s",
pgmname, " scd killscd", gpg_strerror (err));
@@ -1503,7 +1503,7 @@ gc_component_check_options (int component, FILE *out, const char *conf_file)
close (filedes[1]);
errlines = collect_error_output (filedes[0],
gc_component[component].name);
- if (gnupg_wait_process (pgmname, pid, 0, &exitcode))
+ if (gnupg_wait_process (pgmname, pid, 1, &exitcode))
{
if (exitcode == -1)
result |= 1; /* Program could not be run or it
@@ -1922,7 +1922,7 @@ retrieve_options_from_program (gc_component_t component, gc_backend_t backend)
if (fclose (config) && ferror (config))
gc_error (1, errno, "error closing %s", pgmname);
- err = gnupg_wait_process (pgmname, pid, 0, &exitcode);
+ err = gnupg_wait_process (pgmname, pid, 1, &exitcode);
if (err)
gc_error (1, 0, "running %s failed (exitcode=%d): %s",
pgmname, exitcode, gpg_strerror (err));