summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarcus Brinkmann <mb@g10code.com>2009-11-05 13:06:45 +0100
committerMarcus Brinkmann <mb@g10code.com>2009-11-05 13:06:45 +0100
commit1d3c39fd7bf6d43538ad44143bd92f49ea835a43 (patch)
tree11a0ed07ed694fba18a790d1fc5bad86550ae96a
parentInitialize opt.session_env. (diff)
downloadgnupg2-1d3c39fd7bf6d43538ad44143bd92f49ea835a43.tar.xz
gnupg2-1d3c39fd7bf6d43538ad44143bd92f49ea835a43.zip
agent/
2009-11-05 Marcus Brinkmann <marcus@g10code.de> * call-pinentry.c (start_pinentry): Call assuan_pipe_connect, not assuan_pipe_connect_ext. * command.c (start_command_handler): Change assuan_init_socket_server_ext into assuan_init_socket_server. * call-scd.c (start_scd): Update use of assuan_socket_connect and assuan_pipe_connect. * gpg-agent.c (check_own_socket_thread, check_for_running_agent): Update use of assuan_socket_connect. common/ 2009-11-05 Marcus Brinkmann <marcus@g10code.de> * asshelp.c (start_new_gpg_agent): Update use of assuan_socket_connect and assuan_pipe_connect. scd/ 2009-11-05 Marcus Brinkmann <marcus@g10code.de> * command.c (scd_command_handler): Call assuan_init_socket_server, not assuan_init_socket_server_ext. sm/ 2009-11-05 Marcus Brinkmann <marcus@g10code.de> * call-dirmngr.c (start_dirmngr_ext): Update use of assuan_pipe_connect and assuan_socket_connect. tools/ 2009-11-05 Marcus Brinkmann <marcus@g10code.de> * gpg-connect-agent.c (start_agent): Update use of assuan_socket_connect and assuan_pipe_connect.
-rw-r--r--agent/ChangeLog11
-rw-r--r--agent/call-pinentry.c5
-rw-r--r--agent/call-scd.c6
-rw-r--r--agent/command.c4
-rw-r--r--agent/gpg-agent.c4
-rw-r--r--common/ChangeLog5
-rw-r--r--common/asshelp.c6
-rw-r--r--g13/ChangeLog2
-rw-r--r--g13/call-gpg.c3
-rw-r--r--scd/ChangeLog5
-rw-r--r--scd/command.c3
-rw-r--r--sm/ChangeLog5
-rw-r--r--sm/call-dirmngr.c4
-rw-r--r--tools/ChangeLog5
-rw-r--r--tools/gpg-connect-agent.c19
15 files changed, 61 insertions, 26 deletions
diff --git a/agent/ChangeLog b/agent/ChangeLog
index 96b792e72..cebe3db51 100644
--- a/agent/ChangeLog
+++ b/agent/ChangeLog
@@ -1,3 +1,14 @@
+2009-11-05 Marcus Brinkmann <marcus@g10code.de>
+
+ * call-pinentry.c (start_pinentry): Call assuan_pipe_connect, not
+ assuan_pipe_connect_ext.
+ * command.c (start_command_handler): Change
+ assuan_init_socket_server_ext into assuan_init_socket_server.
+ * call-scd.c (start_scd): Update use of assuan_socket_connect and
+ assuan_pipe_connect.
+ * gpg-agent.c (check_own_socket_thread, check_for_running_agent):
+ Update use of assuan_socket_connect.
+
2009-11-04 Werner Koch <wk@g10code.com>
* command.c (register_commands): Add help arg to
diff --git a/agent/call-pinentry.c b/agent/call-pinentry.c
index 172a88914..c5a6f7814 100644
--- a/agent/call-pinentry.c
+++ b/agent/call-pinentry.c
@@ -320,8 +320,9 @@ start_pinentry (ctrl_t ctrl)
that atfork is used to change the environment for pinentry. We
start the server in detached mode to suppress the console window
under Windows. */
- rc = assuan_pipe_connect_ext (ctx, opt.pinentry_program, argv,
- no_close_list, atfork_cb, ctrl, 128);
+ rc = assuan_pipe_connect (ctx, opt.pinentry_program, argv,
+ no_close_list, atfork_cb, ctrl,
+ ASSUAN_PIPE_CONNECT_DETACHED);
if (rc)
{
log_error ("can't connect to the PIN entry module: %s\n",
diff --git a/agent/call-scd.c b/agent/call-scd.c
index 521086848..83b99335d 100644
--- a/agent/call-scd.c
+++ b/agent/call-scd.c
@@ -278,7 +278,7 @@ start_scd (ctrl_t ctrl)
if (socket_name)
{
- rc = assuan_socket_connect (ctx, socket_name, 0);
+ rc = assuan_socket_connect (ctx, socket_name, 0, 0);
if (rc)
{
log_error ("can't connect to socket `%s': %s\n",
@@ -341,8 +341,8 @@ start_scd (ctrl_t ctrl)
/* Connect to the pinentry and perform initial handshaking. Use
detached flag (128) so that under W32 SCDAEMON does not show up a
new window. */
- rc = assuan_pipe_connect_ext (ctx, opt.scdaemon_program, argv,
- no_close_list, atfork_cb, NULL, 128);
+ rc = assuan_pipe_connect (ctx, opt.scdaemon_program, argv,
+ no_close_list, atfork_cb, NULL, 128);
if (rc)
{
log_error ("can't connect to the SCdaemon: %s\n",
diff --git a/agent/command.c b/agent/command.c
index 2e4bcbff1..1c0f57467 100644
--- a/agent/command.c
+++ b/agent/command.c
@@ -1924,13 +1924,13 @@ start_command_handler (ctrl_t ctrl, gnupg_fd_t listen_fd, gnupg_fd_t fd)
}
else if (listen_fd != GNUPG_INVALID_FD)
{
- rc = assuan_init_socket_server_ext (ctx, listen_fd, 0);
+ rc = assuan_init_socket_server (ctx, listen_fd, 0);
/* FIXME: Need to call assuan_sock_set_nonce for Windows. But
this branch is currently not used. */
}
else
{
- rc = assuan_init_socket_server_ext (ctx, fd, 2);
+ rc = assuan_init_socket_server (ctx, fd, ASSUAN_SOCKET_SERVER_ACCEPTED);
}
if (rc)
{
diff --git a/agent/gpg-agent.c b/agent/gpg-agent.c
index be7da2009..ba7223634 100644
--- a/agent/gpg-agent.c
+++ b/agent/gpg-agent.c
@@ -2082,7 +2082,7 @@ check_own_socket_thread (void *arg)
goto leave;
}
- rc = assuan_socket_connect (ctx, sockname, (pid_t)(-1));
+ rc = assuan_socket_connect (ctx, sockname, (pid_t)(-1), 0);
if (rc)
{
log_error ("can't connect my own socket: %s\n", gpg_strerror (rc));
@@ -2220,7 +2220,7 @@ check_for_running_agent (int silent, int mode)
rc = assuan_new (&ctx);
if (! rc)
- rc = assuan_socket_connect (ctx, infostr, pid);
+ rc = assuan_socket_connect (ctx, infostr, pid, 0);
xfree (infostr);
if (rc)
{
diff --git a/common/ChangeLog b/common/ChangeLog
index 9468bfe3a..a519f3850 100644
--- a/common/ChangeLog
+++ b/common/ChangeLog
@@ -1,3 +1,8 @@
+2009-11-05 Marcus Brinkmann <marcus@g10code.de>
+
+ * asshelp.c (start_new_gpg_agent): Update use of
+ assuan_socket_connect and assuan_pipe_connect.
+
2009-11-02 Marcus Brinkmann <marcus@g10code.de>
* get-passphrase.c (default_inq_cb, membuf_data_cb): Change return
diff --git a/common/asshelp.c b/common/asshelp.c
index 47b86ee1c..e5a3f8c1f 100644
--- a/common/asshelp.c
+++ b/common/asshelp.c
@@ -199,7 +199,7 @@ start_new_gpg_agent (assuan_context_t *r_ctx,
/* First check whether we can connect at the standard
socket. */
sockname = make_filename (homedir, "S.gpg-agent", NULL);
- rc = assuan_socket_connect (ctx, sockname, 0);
+ rc = assuan_socket_connect (ctx, sockname, 0, 0);
if (rc)
{
@@ -274,7 +274,7 @@ start_new_gpg_agent (assuan_context_t *r_ctx,
/* Connect to the agent and perform initial handshaking. */
rc = assuan_pipe_connect (ctx, agent_program, argv,
- no_close_list);
+ no_close_list, NULL, NULL, 0);
}
#endif /*!HAVE_W32_SYSTEM*/
}
@@ -307,7 +307,7 @@ start_new_gpg_agent (assuan_context_t *r_ctx,
goto restart;
}
- rc = assuan_socket_connect (ctx, infostr, pid);
+ rc = assuan_socket_connect (ctx, infostr, pid, 0);
xfree (infostr);
if (gpg_err_code (rc) == GPG_ERR_ASS_CONNECT_FAILED)
{
diff --git a/g13/ChangeLog b/g13/ChangeLog
index cc51472cc..b263b8403 100644
--- a/g13/ChangeLog
+++ b/g13/ChangeLog
@@ -1,4 +1,4 @@
-2009-11-04 Werner Koch <wk@g10code.com>
+009-11-04 Werner Koch <wk@g10code.com>
Under initial development - no need for a ChangeLog.
diff --git a/g13/call-gpg.c b/g13/call-gpg.c
index c6b0abe30..6603533ab 100644
--- a/g13/call-gpg.c
+++ b/g13/call-gpg.c
@@ -101,7 +101,8 @@ start_gpg (ctrl_t ctrl, int input_fd, int output_fd, assuan_context_t *r_ctx)
no_close_list[i] = -1;
/* Connect to GPG and perform initial handshaking. */
- err = assuan_pipe_connect (ctx, opt.gpg_program, argv, no_close_list);
+ err = assuan_pipe_connect (ctx, opt.gpg_program, argv, no_close_list,
+ NULL, NULL, 0);
if (err)
{
assuan_release (ctx);
diff --git a/scd/ChangeLog b/scd/ChangeLog
index 54cc5fb72..906485018 100644
--- a/scd/ChangeLog
+++ b/scd/ChangeLog
@@ -1,3 +1,8 @@
+2009-11-05 Marcus Brinkmann <marcus@g10code.de>
+
+ * command.c (scd_command_handler): Call assuan_init_socket_server,
+ not assuan_init_socket_server_ext.
+
2009-11-04 Werner Koch <wk@g10code.com>
* command.c (register_commands): Add help arg to
diff --git a/scd/command.c b/scd/command.c
index a313b8f2b..110ec7232 100644
--- a/scd/command.c
+++ b/scd/command.c
@@ -1921,7 +1921,8 @@ scd_command_handler (ctrl_t ctrl, int fd)
}
else
{
- rc = assuan_init_socket_server_ext (ctx, INT2FD(fd), 2);
+ rc = assuan_init_socket_server (ctx, INT2FD(fd),
+ ASSUAN_SOCKET_SERVER_ACCEPTED);
}
if (rc)
{
diff --git a/sm/ChangeLog b/sm/ChangeLog
index ad8f9dc1c..63d90df3c 100644
--- a/sm/ChangeLog
+++ b/sm/ChangeLog
@@ -1,3 +1,8 @@
+2009-11-05 Marcus Brinkmann <marcus@g10code.de>
+
+ * call-dirmngr.c (start_dirmngr_ext): Update use of
+ assuan_pipe_connect and assuan_socket_connect.
+
2009-11-04 Werner Koch <wk@g10code.com>
* server.c (register_commands): Add help arg to
diff --git a/sm/call-dirmngr.c b/sm/call-dirmngr.c
index 17d557838..b6f37bae2 100644
--- a/sm/call-dirmngr.c
+++ b/sm/call-dirmngr.c
@@ -264,7 +264,7 @@ start_dirmngr_ext (ctrl_t ctrl, assuan_context_t *ctx_r)
/* connect to the agent and perform initial handshaking */
rc = assuan_pipe_connect (ctx, opt.dirmngr_program, argv,
- no_close_list);
+ no_close_list, NULL, NULL, 0);
}
else
{
@@ -297,7 +297,7 @@ start_dirmngr_ext (ctrl_t ctrl, assuan_context_t *ctx_r)
else
pid = -1;
- rc = assuan_socket_connect (ctx, infostr, pid);
+ rc = assuan_socket_connect (ctx, infostr, pid, 0);
#ifdef HAVE_W32_SYSTEM
if (rc)
log_debug ("connecting dirmngr at `%s' failed\n", infostr);
diff --git a/tools/ChangeLog b/tools/ChangeLog
index 7a1407692..5ce91bd6c 100644
--- a/tools/ChangeLog
+++ b/tools/ChangeLog
@@ -1,3 +1,8 @@
+2009-11-05 Marcus Brinkmann <marcus@g10code.de>
+
+ * gpg-connect-agent.c (start_agent): Update use of
+ assuan_socket_connect and assuan_pipe_connect.
+
2009-11-04 Werner Koch <wk@g10code.com>
* gpg-connect-agent.c (read_and_print_response): Add arg WITHHASH.
diff --git a/tools/gpg-connect-agent.c b/tools/gpg-connect-agent.c
index a2fb1d136..895056fe7 100644
--- a/tools/gpg-connect-agent.c
+++ b/tools/gpg-connect-agent.c
@@ -1160,7 +1160,7 @@ main (int argc, char **argv)
opt.homedir = default_homedir ();
- opt.connect_flags = 1; /* Use extended connect mode. */
+ opt.connect_flags = 1;
/* Parse the command line. */
pargs.argc = &argc;
@@ -1233,9 +1233,9 @@ main (int argc, char **argv)
exit (1);
}
- rc = assuan_pipe_connect_ext (ctx, *argv, (const char **)argv,
- no_close, NULL, NULL,
- opt.connect_flags);
+ rc = assuan_pipe_connect
+ (ctx, *argv, (const char **)argv, no_close, NULL, NULL,
+ (opt.connect_flags & 1) ? ASSUAN_PIPE_CONNECT_FDPASSING : 0);
if (rc)
{
log_error ("assuan_pipe_connect_ext failed: %s\n",
@@ -1256,8 +1256,9 @@ main (int argc, char **argv)
exit (1);
}
- rc = assuan_socket_connect_ext (ctx, opt.raw_socket, 0,
- opt.connect_flags);
+ rc = assuan_socket_connect
+ (ctx, opt.raw_socket, 0,
+ (opt.connect_flags & 1) ? ASSUAN_SOCKET_CONNECT_FDPASSING : 0);
if (rc)
{
log_error ("can't connect to socket `%s': %s\n",
@@ -2114,7 +2115,7 @@ start_agent (void)
/* Check whether we can connect at the standard socket. */
sockname = make_filename (opt.homedir, "S.gpg-agent", NULL);
- rc = assuan_socket_connect (ctx, sockname, 0);
+ rc = assuan_socket_connect (ctx, sockname, 0, 0);
#ifdef HAVE_W32_SYSTEM
/* If we failed to connect under Windows, we fire up the agent. */
@@ -2148,7 +2149,7 @@ start_agent (void)
exit (1);
}
- rc = assuan_socket_connect (ctx, sockname, 0);
+ rc = assuan_socket_connect (ctx, sockname, 0, 0);
}
if (rc)
rc = save_rc;
@@ -2188,7 +2189,7 @@ start_agent (void)
exit (1);
}
- rc = assuan_socket_connect (ctx, infostr, pid);
+ rc = assuan_socket_connect (ctx, infostr, pid, 0);
xfree (infostr);
}