diff --git a/agent/ChangeLog b/agent/ChangeLog index 21cd0c4ff..cd781e257 100644 --- a/agent/ChangeLog +++ b/agent/ChangeLog @@ -1,3 +1,7 @@ +2011-04-12 Ben Kibbey + + * command.c (cmd_passwd): Fixed --preset when not previously cached. + 2011-04-12 Werner Koch * agent.h (CACHE_TTL_NONCE, CACHE_TTL_OPT_PRESET): New. diff --git a/agent/command.c b/agent/command.c index e5243ed34..d2ed23a67 100644 --- a/agent/command.c +++ b/agent/command.c @@ -1528,15 +1528,15 @@ cmd_passwd (assuan_context_t ctx, char *line) ctrl->server_local->last_passwd_nonce = passwd_nonce; passwd_nonce = NULL; } - if (opt_preset) - { - char hexgrip[40+1]; - bin2hex(grip, 20, hexgrip); - err = agent_put_cache (hexgrip, CACHE_MODE_ANY, newpass, - CACHE_TTL_OPT_PRESET); - } } } + if (opt_preset) + { + char hexgrip[40+1]; + bin2hex(grip, 20, hexgrip); + err = agent_put_cache (hexgrip, CACHE_MODE_ANY, newpass, + CACHE_TTL_OPT_PRESET); + } xfree (newpass); } ctrl->in_passwd--;