[svn] GnuPG - r5364 - in trunk: agent common g13 tools

svn author wk cvs at cvs.gnupg.org
Thu Jun 24 12:51:31 CEST 2010


Author: wk
Date: 2010-06-24 12:51:30 +0200 (Thu, 24 Jun 2010)
New Revision: 5364

Modified:
   trunk/agent/ChangeLog
   trunk/agent/genkey.c
   trunk/common/ChangeLog
   trunk/common/asshelp.c
   trunk/g13/be-encfs.c
   trunk/g13/runner.c
   trunk/tools/ChangeLog
   trunk/tools/gpgconf-comp.c
Log:
Fix a regression from 2010-06-09.


Modified: trunk/agent/ChangeLog
===================================================================
--- trunk/agent/ChangeLog	2010-06-21 10:04:36 UTC (rev 5363)
+++ trunk/agent/ChangeLog	2010-06-24 10:51:30 UTC (rev 5364)
@@ -1,3 +1,8 @@
+2010-06-24  Werner Koch  <wk at 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 at g10code.com>
 
 	* protect-tool.c (export_p12_file, import_p12_cert_cb)

Modified: trunk/common/ChangeLog
===================================================================
--- trunk/common/ChangeLog	2010-06-21 10:04:36 UTC (rev 5363)
+++ trunk/common/ChangeLog	2010-06-24 10:51:30 UTC (rev 5364)
@@ -1,3 +1,9 @@
+2010-06-24  Werner Koch  <wk at 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 at 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 ...

Modified: trunk/tools/ChangeLog
===================================================================
--- trunk/tools/ChangeLog	2010-06-21 10:04:36 UTC (rev 5363)
+++ trunk/tools/ChangeLog	2010-06-24 10:51:30 UTC (rev 5364)
@@ -1,3 +1,9 @@
+2010-06-24  Werner Koch  <wk at 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 at g10code.com>
 
 	* gpgtar.c, gpgtar.h, gpgtar-list.c, gpgtar-create.c

Modified: trunk/agent/genkey.c
===================================================================
--- trunk/agent/genkey.c	2010-06-21 10:04:36 UTC (rev 5363)
+++ trunk/agent/genkey.c	2010-06-24 10:51:30 UTC (rev 5364)
@@ -129,7 +129,7 @@
 
   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.  */

Modified: trunk/common/asshelp.c
===================================================================
--- trunk/common/asshelp.c	2010-06-21 10:04:36 UTC (rev 5363)
+++ trunk/common/asshelp.c	2010-06-24 10:51:30 UTC (rev 5364)
@@ -226,7 +226,7 @@
 
   (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 @@
           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);

Modified: trunk/g13/be-encfs.c
===================================================================
--- trunk/g13/be-encfs.c	2010-06-21 10:04:36 UTC (rev 5363)
+++ trunk/g13/be-encfs.c	2010-06-24 10:51:30 UTC (rev 5364)
@@ -304,7 +304,7 @@
     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);

Modified: trunk/g13/runner.c
===================================================================
--- trunk/g13/runner.c	2010-06-21 10:04:36 UTC (rev 5363)
+++ trunk/g13/runner.c	2010-06-24 10:51:30 UTC (rev 5364)
@@ -165,7 +165,7 @@
           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 @@
       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)

Modified: trunk/tools/gpgconf-comp.c
===================================================================
--- trunk/tools/gpgconf-comp.c	2010-06-21 10:04:36 UTC (rev 5363)
+++ trunk/tools/gpgconf-comp.c	2010-06-24 10:51:30 UTC (rev 5364)
@@ -1051,7 +1051,7 @@
   
   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 @@
   
   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 @@
       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 @@
   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));





More information about the Gnupg-commits mailing list