Another PASSWD --preset fix.
authorBen Kibbey <bjk@luxsci.net>
Sun, 17 Apr 2011 20:48:44 +0000 (16:48 -0400)
committerWerner Koch <wk@gnupg.org>
Mon, 18 Apr 2011 08:20:36 +0000 (10:20 +0200)
Check for an error before presetting the passphrase.

agent/ChangeLog
agent/command.c

index cd781e2..e8570f7 100644 (file)
@@ -1,3 +1,7 @@
+2011-04-17  Ben Kibbey <bjk@luxsci.net>
+
+       * command.c (cmd_passwd): Check for an error before presetting.
+
 2011-04-12  Ben Kibbey <bjk@luxsci.net>
 
        * command.c (cmd_passwd): Fixed --preset when not previously cached.
index d2ed23a..9f45afb 100644 (file)
@@ -1530,7 +1530,7 @@ cmd_passwd (assuan_context_t ctx, char *line)
                 }
             }
         }
-      if (opt_preset)
+      if (!err && opt_preset)
       {
          char hexgrip[40+1];
          bin2hex(grip, 20, hexgrip);