gpg-agent[15091]: DBG: expired `XXXXXXXXXXXX' (1h after creation)
$ grep default-cache-ttl .gnupg/gpg-agent.conf
default-cache-ttl 259200
Ma pamiętać passphrase 3 dni a zapomina po godzinie. Strasznie mnie to
irytowało. Na własny użytek/rozrywki zrobiłem sobie patcha. Podsyłam - może
kumuś się przyda - kłaść tego do pakietu nie zamierzam, nie starałem się
nawet analizować jakie może mieć on ew. negatywne skutki, czy np. nie narusza
logiki programu, etc. - liczyło się dla mnie jedynie uzyskanie pożądanego
efektu (dłuższe pamiętanie passphrase niż 1h) i zabawa w C.
--
Tomasz Wittner
diff -Nur b/agent/cache.c n/agent/cache.c
--- b/agent/cache.c 2003-01-09 13:59:25.000000000 +0100
+++ n/agent/cache.c 2004-09-11 07:01:15.000000000 +0200
@@ -39,7 +39,7 @@
ITEM next;
time_t created;
time_t accessed;
- int ttl; /* max. lifetime given in seonds */
+ int ttl; /* max. lifetime given in seonds */
int lockcount;
struct secret_data_s *pw;
char key[1];
@@ -88,6 +88,8 @@
/* first expire the actual data */
for (r=thecache; r; r = r->next)
{
+ if (DBG_CACHE)
+ log_debug ("housekeeping(): created: %d\t accessed: %d\t ttl: %d\n", r->created, r->accessed, r->ttl);
if (!r->lockcount && r->pw && r->accessed + r->ttl < current)
{
if (DBG_CACHE)
@@ -100,13 +102,17 @@
}
/* second, make sure that we also remove them based on the created stamp so
- that the user has to enter it from time to time. We do this every hour */
+ that the user has to enter it from time to time. We do this every hour
+ but twittner does it after time defined by you in default-cache-ttl */
+
for (r=thecache; r; r = r->next)
{
- if (!r->lockcount && r->pw && r->created + 60*60 < current)
+ if (DBG_CACHE && r->created >= 0 && r->ttl >= 0 && r->created + r->ttl < 0)
+ log_debug(" `int' type scope overflow: your passphrase is always expired. Lower default-cache-ttl value and rerun gpg-agent.\n");
+ if (!r->lockcount && r->pw && r->created + r->ttl < current)
{
if (DBG_CACHE)
- log_debug (" expired `%s' (1h after creation)\n", r->key);
+ log_debug (" expired `%s' (%dsec. after creation)\n", r->key, r->ttl);
release_data (r->pw);
r->pw = NULL;
r->accessed = current;
_______________________________________________
pld-devel-pl mailing list
[EMAIL PROTECTED]
http://lists.pld-linux.org/mailman/listinfo/pld-devel-pl