[svn] GnuPG - r4606 - in trunk: agent tools

svn author wk cvs at cvs.gnupg.org
Wed Oct 24 10:06:25 CEST 2007


Author: wk
Date: 2007-10-24 10:06:16 +0200 (Wed, 24 Oct 2007)
New Revision: 4606

Modified:
   trunk/agent/ChangeLog
   trunk/agent/genkey.c
   trunk/tools/ChangeLog
   trunk/tools/gpg-connect-agent.c
Log:
Changed wording of passphrase checking messages.
Fixed a segv in gpg-connect-agent.


Modified: trunk/agent/ChangeLog
===================================================================
--- trunk/agent/ChangeLog	2007-10-23 18:13:27 UTC (rev 4605)
+++ trunk/agent/ChangeLog	2007-10-24 08:06:16 UTC (rev 4606)
@@ -1,3 +1,8 @@
+2007-10-24  Werner Koch  <wk at g10code.com>
+
+	* genkey.c (check_passphrase_constraints): Changed the wording of
+	the warning messages.
+
 2007-10-19  Werner Koch  <wk at g10code.com>
 
 	* protect-tool.c (get_passphrase): Use new utf8 switch fucntions.

Modified: trunk/agent/genkey.c
===================================================================
--- trunk/agent/genkey.c	2007-10-23 18:13:27 UTC (rev 4605)
+++ trunk/agent/genkey.c	2007-10-24 08:06:16 UTC (rev 4606)
@@ -188,12 +188,11 @@
         return gpg_error (GPG_ERR_INV_PASSPHRASE);
 
       desc = xtryasprintf 
-        ( ngettext ("Warning:  You have entered a passphrase that%%0A"
-                    "is obviously not secure.  A passphrase should%%0A"
-                    "be at least %u character long.", 
-                    "Warning:  You have entered a passphrase that%%0A"
-                    "is obviously not secure.  A passphrase should%%0A"
-                    "be at least %u characters long.", minlen), minlen );
+        ( ngettext ("Warning: You have entered an insecure passphrase.%%0A"
+                    "A passphrase should be at least %u character long.", 
+                    "Warning: You have entered an insecure passphrase.%%0A"
+                    "A passphrase should be at least %u characters long.", 
+                    minlen), minlen );
       if (!desc)
         return gpg_error_from_syserror ();
       err = take_this_one_anyway (ctrl, desc);
@@ -210,12 +209,12 @@
         return gpg_error (GPG_ERR_INV_PASSPHRASE);
 
       desc = xtryasprintf 
-        ( ngettext ("Warning:  You have entered a passphrase that%%0A"
-                    "is obviously not secure.  A passphrase should%%0A"
-                    "contain at least %u digit or special character.", 
-                    "Warning:  You have entered a passphrase that%%0A"
-                    "is obviously not secure.  A passphrase should%%0A"
-                    "contain at least %u digits or special characters.",
+        ( ngettext ("Warning: You have entered an insecure passphrase.%%0A"
+                    "A passphrase should contain at least %u digit or%%0A"
+                    "special character.", 
+                    "Warning: You have entered an insecure passphrase.%%0A"
+                    "A passphrase should contain at least %u digits or%%0A"
+                    "special characters.",
                     minnonalpha), minnonalpha );
       if (!desc)
         return gpg_error_from_syserror ();
@@ -233,9 +232,9 @@
       check_passphrase_pattern (ctrl, pw))
     {
       const char *desc =
-        /* */     _("Warning:  You have entered a passphrase that%0A"
-                    "is obviously not secure.  A passphrase may not%0A"
-                    "be a known term or match certain pattern.");
+        /* */     _("Warning: You have entered an insecure passphrase.%0A"
+                    "A passphrase may not be a known term or match%%0A"
+                    "certain pattern.");
 
       if (silent)
         return gpg_error (GPG_ERR_INV_PASSPHRASE);

Modified: trunk/tools/ChangeLog
===================================================================
--- trunk/tools/ChangeLog	2007-10-23 18:13:27 UTC (rev 4605)
+++ trunk/tools/ChangeLog	2007-10-24 08:06:16 UTC (rev 4606)
@@ -1,3 +1,8 @@
+2007-10-24  Werner Koch  <wk at g10code.com>
+
+	* gpg-connect-agent.c (substitute_line): Restore temporary nul
+	marker.
+
 2007-10-23  Werner Koch  <wk at g10code.com>
 
 	* gpgconf-comp.c (gc_process_gpgconf_conf): Add arg

Modified: trunk/tools/gpg-connect-agent.c
===================================================================
--- trunk/tools/gpg-connect-agent.c	2007-10-23 18:13:27 UTC (rev 4605)
+++ trunk/tools/gpg-connect-agent.c	2007-10-24 08:06:16 UTC (rev 4606)
@@ -578,9 +578,11 @@
         }
       if (p[1] == '{' && *pend == '}')
         {
-          *pend++ = 0;
+          int save = *pend;
+          *pend = 0;
           freeme = get_var_ext (p+2);
           value = freeme;
+          *pend++ = save;
         }
       else if (*pend)
         {
@@ -615,7 +617,7 @@
           n += valuelen;
           strcpy (dst + n, pend);
           line = dst + n;
-          free (result);
+          xfree (result);
           result = dst;
         }
       xfree (freeme);




More information about the Gnupg-commits mailing list