mirror of
git://git.gnupg.org/gnupg.git
synced 2024-06-23 01:22:45 +02:00
Fixed PASSWD --preset.
The previous patch required that the keygrip be cached before adding the new passphrase to the cache. No more.
This commit is contained in:
parent
f8c5395fbd
commit
b3c71eb26b
|
@ -1,3 +1,7 @@
|
||||||
|
2011-04-12 Ben Kibbey <bjk@luxsci.net>
|
||||||
|
|
||||||
|
* command.c (cmd_passwd): Fixed --preset when not previously cached.
|
||||||
|
|
||||||
2011-04-12 Werner Koch <wk@g10code.com>
|
2011-04-12 Werner Koch <wk@g10code.com>
|
||||||
|
|
||||||
* agent.h (CACHE_TTL_NONCE, CACHE_TTL_OPT_PRESET): New.
|
* agent.h (CACHE_TTL_NONCE, CACHE_TTL_OPT_PRESET): New.
|
||||||
|
|
|
@ -1528,6 +1528,8 @@ cmd_passwd (assuan_context_t ctx, char *line)
|
||||||
ctrl->server_local->last_passwd_nonce = passwd_nonce;
|
ctrl->server_local->last_passwd_nonce = passwd_nonce;
|
||||||
passwd_nonce = NULL;
|
passwd_nonce = NULL;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
if (opt_preset)
|
if (opt_preset)
|
||||||
{
|
{
|
||||||
char hexgrip[40+1];
|
char hexgrip[40+1];
|
||||||
|
@ -1535,8 +1537,6 @@ cmd_passwd (assuan_context_t ctx, char *line)
|
||||||
err = agent_put_cache (hexgrip, CACHE_MODE_ANY, newpass,
|
err = agent_put_cache (hexgrip, CACHE_MODE_ANY, newpass,
|
||||||
CACHE_TTL_OPT_PRESET);
|
CACHE_TTL_OPT_PRESET);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
xfree (newpass);
|
xfree (newpass);
|
||||||
}
|
}
|
||||||
ctrl->in_passwd--;
|
ctrl->in_passwd--;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user