From 56b049686fccd110a368352ac704a9f0eeed67a8 Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Thu, 27 Jun 2002 07:29:29 +0000 Subject: * Makefile.am (pkglib_PROGRAMS): Put protect-tool there. * findkey.c (agent_write_private_key,agent_key_from_file) (agent_key_available): Use GNUPG_PRIVATE_KEYS_DIR constant. * gpg-agent.c (main): Use GNUPG_DEFAULT_HOMEDIR constant. * protect-tool.c (store_private_key): New. (import_p12_file): Store the new file if requested. (main): New options --force and --store. * gpg-agent.c (main): Set a global flag when runing detached. * query.c (start_pinentry): Pass the list of FD to keep in the child when not running detached. * call-scd.c (start_scd): Ditto. --- agent/gpg-agent.c | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) (limited to 'agent/gpg-agent.c') diff --git a/agent/gpg-agent.c b/agent/gpg-agent.c index 7742e1b85..4441cf557 100644 --- a/agent/gpg-agent.c +++ b/agent/gpg-agent.c @@ -295,13 +295,7 @@ main (int argc, char **argv ) opt.homedir = getenv("GNUPGHOME"); if (!opt.homedir || !*opt.homedir) - { -#ifdef HAVE_DRIVE_LETTERS - opt.homedir = "c:/gnupg-test"; -#else - opt.homedir = "~/.gnupg-test"; -#endif - } + opt.homedir = GNUPG_DEFAULT_HOMEDIR; opt.def_cache_ttl = 10*60; /* default to 10 minutes */ @@ -473,7 +467,6 @@ main (int argc, char **argv ) { /* regular server mode */ int fd; pid_t pid; - int i; int len; struct sockaddr_un serv_addr; char *p; @@ -599,7 +592,10 @@ main (int argc, char **argv ) /* detach from tty and put process into a new session */ if (!nodetach ) - { /* close stdin, stdout and stderr unless it is the log stream */ + { + int i; + + /* close stdin, stdout and stderr unless it is the log stream */ for (i=0; i <= 2; i++) { if ( log_get_fd () != i) @@ -611,6 +607,7 @@ main (int argc, char **argv ) cleanup (); exit (1); } + opt.running_detached = 1; } if (chdir("/")) -- cgit v1.2.3