]> git.pld-linux.org Git - packages/gnupg2.git/commitdiff
- adds max-cache-ttl option (instead of 1h hardwired limit) - see:
authortwittner <twittner@pld-linux.org>
Sun, 12 Sep 2004 05:08:03 +0000 (05:08 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
  http://marc.theaimsgroup.com/?l=gnupg-devel&m=109300087831144&w=2
- patch is not taken directly - contain maintainer modifications.

Changed files:
    gnupg-agent-max_cache_ttl.patch -> 1.1

gnupg-agent-max_cache_ttl.patch [new file with mode: 0644]

diff --git a/gnupg-agent-max_cache_ttl.patch b/gnupg-agent-max_cache_ttl.patch
new file mode 100644 (file)
index 0000000..a6c22e7
--- /dev/null
@@ -0,0 +1,88 @@
+===================================================================
+RCS file: /cvs/gnupg/gnupg/agent/cache.c,v
+retrieving revision 1.10
+retrieving revision 1.10.2.1
+diff -u -r1.10 -r1.10.2.1
+--- gnupg/agent/cache.c        2003/01/09 12:59:25     1.10
++++ gnupg/agent/cache.c        2004/08/20 13:43:14     1.10.2.1
+@@ -103,10 +103,11 @@
+      that the user has to enter it from time to time.  We do this every hour */
+   for (r=thecache; r; r = r->next)
+     {
+-      if (!r->lockcount && r->pw && r->created + 60*60 < current)
++      if (!r->lockcount && r->pw && r->created + opt.max_cache_ttl < current)
+         {
+           if (DBG_CACHE)
+-            log_debug ("  expired `%s' (1h after creation)\n", r->key);
++            log_debug ("  expired `%s' (%lus after creation)\n",
++                       r->key, opt.max_cache_ttl);
+           release_data (r->pw);
+           r->pw = NULL;
+           r->accessed = current;
+===================================================================
+RCS file: /cvs/gnupg/gnupg/agent/agent.h,v
+retrieving revision 1.32.2.6
+retrieving revision 1.32.2.7
+diff -u -r1.32.2.6 -r1.32.2.7
+--- gnupg/agent/agent.h        2004/05/11 19:11:53     1.32.2.6
++++ gnupg/agent/agent.h        2004/08/20 13:43:14     1.32.2.7
+@@ -54,6 +54,7 @@
+   const char *scdaemon_program; 
+   int no_grab;      /* don't let the pinentry grab the keyboard */
+   unsigned long def_cache_ttl;
++  unsigned long max_cache_ttl;
+   int running_detached; /* we are running detached from the tty. */
+===================================================================
+RCS file: /cvs/gnupg/gnupg/agent/gpg-agent.c,v
+retrieving revision 1.31.2.16
+retrieving revision 1.31.2.17
+diff -u -r1.31.2.16 -r1.31.2.17
+--- gnupg/agent/gpg-agent.c    2004/07/22 09:37:35     1.31.2.16
++++ gnupg/agent/gpg-agent.c    2004/08/20 13:43:14     1.31.2.17
+@@ -77,8 +77,9 @@
+   oLCctype,
+   oLCmessages,
+   oScdaemonProgram,
+-  oDefCacheTTL,
+   oDisablePth,
++  oDefCacheTTL,
++  oMaxCacheTTL,
+   oIgnoreCacheForSigning,
+   oAllowMarkTrusted,
+@@ -127,6 +128,7 @@
+   { oDefCacheTTL, "default-cache-ttl", 4,
+                                N_("|N|expire cached PINs after N seconds")},
++  { oMaxCacheTTL, "max-cache-ttl", 4, "@" },
+   { oIgnoreCacheForSigning, "ignore-cache-for-signing", 0,
+                                N_("do not use the PIN cache when signing")},
+   { oAllowMarkTrusted, "allow-mark-trusted", 0,
+@@ -135,7 +137,8 @@
+ };
+-#define DEFAULT_CACHE_TTL (10*60) /* 10 minutes */
++#define DEFAULT_CACHE_TTL (10*60)  /* 10 minutes */
++#define MAX_CACHE_TTL     (120*60) /* 2 hours */
+ static volatile int caught_fatal_sig = 0;
+@@ -342,6 +345,7 @@
+       opt.pinentry_program = NULL;
+       opt.scdaemon_program = NULL;
+       opt.def_cache_ttl = DEFAULT_CACHE_TTL;
++      opt.max_cache_ttl = MAX_CACHE_TTL;
+       opt.ignore_cache_for_signing = 0;
+       opt.allow_mark_trusted = 0;
+       return 1;
+@@ -372,6 +376,7 @@
+     case oScdaemonProgram: opt.scdaemon_program = pargs->r.ret_str; break;
+     case oDefCacheTTL: opt.def_cache_ttl = pargs->r.ret_ulong; break;
++    case oMaxCacheTTL: opt.max_cache_ttl = pargs->r.ret_ulong; break;
+       
+     case oIgnoreCacheForSigning: opt.ignore_cache_for_signing = 1; break;
This page took 0.119753 seconds and 4 git commands to generate.