mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-02 22:46:30 +02:00
* preset-passphrase.c (preset_passphrase): Handle --passphrase.
* Makefile.am (gpg_preset_passphrase_LDADD): Reorder libs so that pwquery may use stuff from jnlib. Conditionally add -lwsock2 (gpg_protect_tool_LDADD): Ditto. * preset-passphrase.c (main): Use default_homedir(). (main) [W32]: Initialize sockets. * simple-pwquery.c (agent_open) [W32]: Implement for W32. (readline) [W32]: Use recv instead of read. (writen) [W32]: Use send instead of write. (my_stpcpy): Define a stpcpy replacement so that this file continues to be self-contained. (agent_send_all_options) [W32]: Don't call ttyname. * gnupg-badge-openpgp.eps, gnupg-badge-openpgp.jpg: New * gnupg.texi: Add a logo. * sysnotes.texi: New. * gpgsm.c (main): Use default_homedir(). (main) [W32]: Default to disabled CRL checks. * gpgconf-comp.c (get_config_pathname) [DOSISH]: Detect absolute pathnames with a drive letter.
This commit is contained in:
parent
7b9e5a343f
commit
01f3f25158
25 changed files with 8986 additions and 31 deletions
|
@ -39,7 +39,7 @@ struct cache_item_s {
|
|||
ITEM next;
|
||||
time_t created;
|
||||
time_t accessed;
|
||||
int ttl; /* max. lifetime given in seonds */
|
||||
int ttl; /* max. lifetime given in seonds, -1 one means infinite */
|
||||
int lockcount;
|
||||
struct secret_data_s *pw;
|
||||
char key[1];
|
||||
|
@ -88,7 +88,8 @@ housekeeping (void)
|
|||
/* first expire the actual data */
|
||||
for (r=thecache; r; r = r->next)
|
||||
{
|
||||
if (!r->lockcount && r->pw && r->accessed + r->ttl < current)
|
||||
if (!r->lockcount && r->pw
|
||||
&& r->ttl >= 0 && r->accessed + r->ttl < current)
|
||||
{
|
||||
if (DBG_CACHE)
|
||||
log_debug (" expired `%s' (%ds after last access)\n",
|
||||
|
@ -118,7 +119,7 @@ housekeeping (void)
|
|||
Expire old and unused entries after 30 minutes */
|
||||
for (rprev=NULL, r=thecache; r; )
|
||||
{
|
||||
if (!r->pw && r->accessed + 60*30 < current)
|
||||
if (!r->pw && r->ttl >= 0 && r->accessed + 60*30 < current)
|
||||
{
|
||||
if (r->lockcount)
|
||||
{
|
||||
|
@ -194,7 +195,7 @@ agent_put_cache (const char *key, const char *data, int ttl)
|
|||
log_debug ("agent_put_cache `%s'\n", key);
|
||||
housekeeping ();
|
||||
|
||||
if (ttl < 1)
|
||||
if (ttl == 1)
|
||||
ttl = opt.def_cache_ttl;
|
||||
if (!ttl)
|
||||
return 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue