aboutsummaryrefslogtreecommitdiffstats
path: root/sm
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2002-06-27 07:29:57 +0000
committerWerner Koch <[email protected]>2002-06-27 07:29:57 +0000
commitad4d81f528229e0ecda3246aee3fcf88f0e9c3c3 (patch)
treec603a97a95f00fd87c32fbbb82242d0c99d62f6d /sm
parent* Makefile.am (pkglib_PROGRAMS): Put protect-tool there. (diff)
downloadgnupg-ad4d81f528229e0ecda3246aee3fcf88f0e9c3c3.tar.gz
gnupg-ad4d81f528229e0ecda3246aee3fcf88f0e9c3c3.zip
* gpgsm.c (main): Use GNUPG_DEFAULT_HOMEDIR constant.
* call-agent.c (start_agent): Create and pass the list of FD to keep in the child to assuan. * call-dirmngr.c (start_dirmngr): Ditto. * scdaemon.c (main): Use GNUPG_DEFAULT_HOMEDIR constant. * assuan-pipe-connect.c (assuan_pipe_connect): No special handling for the log_fd and stderr. Connect stderr to /dev/null if it should not be retained.
Diffstat (limited to 'sm')
-rw-r--r--sm/ChangeLog8
-rw-r--r--sm/call-agent.c11
-rw-r--r--sm/call-dirmngr.c11
-rw-r--r--sm/gpgsm.c4
4 files changed, 29 insertions, 5 deletions
diff --git a/sm/ChangeLog b/sm/ChangeLog
index a5112a190..bcc61360d 100644
--- a/sm/ChangeLog
+++ b/sm/ChangeLog
@@ -1,3 +1,11 @@
+2002-06-27 Werner Koch <[email protected]>
+
+ * gpgsm.c (main): Use GNUPG_DEFAULT_HOMEDIR constant.
+
+ * call-agent.c (start_agent): Create and pass the list of FD to
+ keep in the child to assuan.
+ * call-dirmngr.c (start_dirmngr): Ditto.
+
2002-06-26 Werner Koch <[email protected]>
* import.c (gpgsm_import): Print an STATUS_IMPORTED.
diff --git a/sm/call-agent.c b/sm/call-agent.c
index f4b6087e2..b3c78579c 100644
--- a/sm/call-agent.c
+++ b/sm/call-agent.c
@@ -151,6 +151,8 @@ start_agent (void)
{
const char *pgmname;
const char *argv[3];
+ int no_close_list[3];
+ int i;
if (opt.verbose)
log_info (_("no running gpg-agent - starting one\n"));
@@ -172,8 +174,15 @@ start_agent (void)
argv[1] = "--server";
argv[2] = NULL;
+ i=0;
+ if (log_get_fd () != -1)
+ no_close_list[i++] = log_get_fd ();
+ no_close_list[i++] = fileno (stderr);
+ no_close_list[i] = -1;
+
/* connect to the agent and perform initial handshaking */
- rc = assuan_pipe_connect (&ctx, opt.agent_program, (char**)argv, 0);
+ rc = assuan_pipe_connect (&ctx, opt.agent_program, (char**)argv,
+ no_close_list);
}
else
{
diff --git a/sm/call-dirmngr.c b/sm/call-dirmngr.c
index 1cdf3e243..017191dbe 100644
--- a/sm/call-dirmngr.c
+++ b/sm/call-dirmngr.c
@@ -143,6 +143,8 @@ start_dirmngr (void)
{
const char *pgmname;
const char *argv[3];
+ int no_close_list[3];
+ int i;
if (opt.verbose)
log_info (_("no running dirmngr - starting one\n"));
@@ -164,8 +166,15 @@ start_dirmngr (void)
argv[1] = "--server";
argv[2] = NULL;
+ i=0;
+ if (log_get_fd () != -1)
+ no_close_list[i++] = log_get_fd ();
+ no_close_list[i++] = fileno (stderr);
+ no_close_list[i] = -1;
+
/* connect to the agent and perform initial handshaking */
- rc = assuan_pipe_connect (&ctx, opt.dirmngr_program, (char**)argv, 0);
+ rc = assuan_pipe_connect (&ctx, opt.dirmngr_program, (char**)argv,
+ no_close_list);
}
else
{
diff --git a/sm/gpgsm.c b/sm/gpgsm.c
index e650e941c..9d91cd9db 100644
--- a/sm/gpgsm.c
+++ b/sm/gpgsm.c
@@ -636,9 +636,7 @@ main ( int argc, char **argv)
opt.homedir = getenv ("GNUPGHOME");
#endif
if (!opt.homedir || !*opt.homedir )
- {
- opt.homedir = "~/.gnupg-test" /*fixme: GNUPG_HOMEDIR*/;
- }
+ opt.homedir = GNUPG_DEFAULT_HOMEDIR;
/* first check whether we have a config file on the commandline */
orig_argc = argc;