aboutsummaryrefslogtreecommitdiffstats
path: root/agent/gpg-agent.c
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2002-06-27 07:29:29 +0000
committerWerner Koch <[email protected]>2002-06-27 07:29:29 +0000
commit56b049686fccd110a368352ac704a9f0eeed67a8 (patch)
treed01226c73876fa4fe966653e982b65d4ede84046 /agent/gpg-agent.c
parent* import.c (gpgsm_import): Print an STATUS_IMPORTED. (diff)
downloadgnupg-56b049686fccd110a368352ac704a9f0eeed67a8.tar.gz
gnupg-56b049686fccd110a368352ac704a9f0eeed67a8.zip
* 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.
Diffstat (limited to '')
-rw-r--r--agent/gpg-agent.c15
1 files changed, 6 insertions, 9 deletions
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("/"))