mirror of
git://git.gnupg.org/gnupg.git
synced 2024-12-31 11:41:32 +01:00
* cache.c (housekeeping): Fixed linking in the remove case.
This commit is contained in:
parent
a3839b57b6
commit
0c4c0f2ecc
@ -1,5 +1,12 @@
|
||||
2002-02-06 Werner Koch <wk@gnupg.org>
|
||||
|
||||
* cache.c (housekeeping): Fixed linking in the remove case.
|
||||
|
||||
2002-02-01 Werner Koch <wk@gnupg.org>
|
||||
|
||||
* gpg-agent.c: New option --default-cache-ttl.
|
||||
* cache.c (agent_put_cache): Use it.
|
||||
|
||||
* cache.c: Add a few debug outputs.
|
||||
|
||||
* protect.c (agent_private_key_type): New.
|
||||
|
@ -37,6 +37,7 @@ struct {
|
||||
const char *homedir; /* configuration directory name */
|
||||
const char *pinentry_program;
|
||||
int no_grab; /* don't let the pinentry grab the keyboard */
|
||||
unsigned long def_cache_ttl;
|
||||
|
||||
} opt;
|
||||
|
||||
|
@ -125,7 +125,7 @@ housekeeping (void)
|
||||
if (!rprev)
|
||||
thecache = r2;
|
||||
else
|
||||
rprev = r2;
|
||||
rprev->next = r2;
|
||||
r = r2;
|
||||
}
|
||||
else
|
||||
@ -152,7 +152,9 @@ agent_put_cache (const char *key, const char *data, int ttl)
|
||||
housekeeping ();
|
||||
|
||||
if (ttl < 1)
|
||||
ttl = 60*5; /* default is 5 minutes */
|
||||
ttl = opt.def_cache_ttl;
|
||||
if (!ttl)
|
||||
return 0;
|
||||
|
||||
for (r=thecache; r; r = r->next)
|
||||
{
|
||||
|
@ -69,6 +69,7 @@ enum cmd_and_opt_values
|
||||
oBatch,
|
||||
|
||||
oPinentryProgram,
|
||||
oDefCacheTTL,
|
||||
|
||||
aTest };
|
||||
|
||||
@ -91,8 +92,9 @@ static ARGPARSE_OPTS opts[] = {
|
||||
{ oNoGrab, "no-grab" ,0, N_("do not grab keyboard and mouse")},
|
||||
{ oLogFile, "log-file" ,2, N_("use a log file for the server")},
|
||||
|
||||
{ oPinentryProgram, "pinentry-program", 2 , "Path of PIN Entry program" },
|
||||
|
||||
{ oPinentryProgram, "pinentry-program", 2 , "path of PIN Entry program" },
|
||||
{ oDefCacheTTL, "default-cache-ttl", 4,
|
||||
"|N|expire cached PINs after N seconds"},
|
||||
|
||||
{0}
|
||||
};
|
||||
@ -268,6 +270,8 @@ main (int argc, char **argv )
|
||||
opt.homedir = "~/.gnupg-test";
|
||||
#endif
|
||||
}
|
||||
opt.def_cache_ttl = 10*60; /* default to 10 minutes */
|
||||
|
||||
|
||||
/* check whether we have a config file on the commandline */
|
||||
orig_argc = argc;
|
||||
@ -368,6 +372,7 @@ main (int argc, char **argv )
|
||||
case oServer: pipe_server = 1; break;
|
||||
|
||||
case oPinentryProgram: opt.pinentry_program = pargs.r.ret_str; break;
|
||||
case oDefCacheTTL: opt.def_cache_ttl = pargs.r.ret_ulong; break;
|
||||
|
||||
default : pargs.err = configfp? 1:2; break;
|
||||
}
|
||||
@ -457,7 +462,7 @@ main (int argc, char **argv )
|
||||
}
|
||||
if (strlen (socket_name)+1 >= sizeof serv_addr.sun_path )
|
||||
{
|
||||
log_error ("name of socket to long\n");
|
||||
log_error ("name of socket too long\n");
|
||||
exit (1);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user