[svn] GnuPG - r5470 - in trunk: . agent scd tools
svn author wk
cvs at cvs.gnupg.org
Wed Oct 27 09:37:54 CEST 2010
Author: wk
Date: 2010-10-27 09:37:52 +0200 (Wed, 27 Oct 2010)
New Revision: 5470
Modified:
trunk/NEWS
trunk/agent/ChangeLog
trunk/agent/gpg-agent.c
trunk/configure.ac
trunk/scd/ChangeLog
trunk/scd/scdaemon.c
trunk/tools/ChangeLog
trunk/tools/symcryptrun.c
Log:
Honor TMPDIR.
Modified: trunk/agent/ChangeLog
===================================================================
--- trunk/agent/ChangeLog 2010-10-26 12:55:36 UTC (rev 5469)
+++ trunk/agent/ChangeLog 2010-10-27 07:37:52 UTC (rev 5470)
@@ -1,3 +1,7 @@
+2010-10-27 Werner Koch <wk at g10code.com>
+
+ * gpg-agent.c (create_socket_name): Use TMPDIR. Change callers.
+
2010-10-26 Werner Koch <wk at g10code.com>
* cache.c (agent_put_cache): Allow deletion even if TTL is passwd
Modified: trunk/scd/ChangeLog
===================================================================
--- trunk/scd/ChangeLog 2010-10-26 12:55:36 UTC (rev 5469)
+++ trunk/scd/ChangeLog 2010-10-27 07:37:52 UTC (rev 5470)
@@ -1,3 +1,7 @@
+2010-10-27 Werner Koch <wk at g10code.com>
+
+ * scdaemon.c (create_socket_name): Use TMPDIR. Change callers.
+
2010-10-18 Werner Koch <wk at g10code.com>
* app-openpgp.c (parse_algorithm_attribute): Remove extra const in
Modified: trunk/tools/ChangeLog
===================================================================
--- trunk/tools/ChangeLog 2010-10-26 12:55:36 UTC (rev 5469)
+++ trunk/tools/ChangeLog 2010-10-27 07:37:52 UTC (rev 5470)
@@ -1,3 +1,7 @@
+2010-10-27 Werner Koch <wk at g10code.com>
+
+ * symcryptrun.c (confucius_mktmpdir): Use TMPDIR.
+
2010-10-14 Werner Koch <wk at g10code.com>
* gpg-connect-agent.c: Add option --agent-program.
Modified: trunk/NEWS
===================================================================
--- trunk/NEWS 2010-10-26 12:55:36 UTC (rev 5469)
+++ trunk/NEWS 2010-10-27 07:37:52 UTC (rev 5470)
@@ -1,3 +1,10 @@
+Noteworthy changes in version 2.1.0beta2 (unreleased)
+-----------------------------------------------------
+
+ * TMPDIR is now also honored when creating a socket using
+ --no-standard-socket and with symcryptrun's temp files.
+
+
Noteworthy changes in version 2.1.0beta1 (2010-10-26)
-----------------------------------------------------
Modified: trunk/agent/gpg-agent.c
===================================================================
--- trunk/agent/gpg-agent.c 2010-10-26 12:55:36 UTC (rev 5469)
+++ trunk/agent/gpg-agent.c 2010-10-27 07:37:52 UTC (rev 5470)
@@ -1026,10 +1026,10 @@
/* Create the sockets. */
socket_name = create_socket_name
- ("S.gpg-agent", "/tmp/gpg-XXXXXX/S.gpg-agent");
+ ("S.gpg-agent", "gpg-XXXXXX/S.gpg-agent");
if (opt.ssh_support)
socket_name_ssh = create_socket_name
- ("S.gpg-agent.ssh", "/tmp/gpg-XXXXXX/S.gpg-agent.ssh");
+ ("S.gpg-agent.ssh", "gpg-XXXXXX/S.gpg-agent.ssh");
fd = create_server_socket (socket_name, 0, &socket_nonce);
if (opt.ssh_support)
@@ -1446,7 +1446,15 @@
name = make_filename (opt.homedir, standard_name, NULL);
else
{
- name = xstrdup (template);
+ /* Prepend the tmp directory to the template. */
+ p = getenv ("TMPDIR");
+ if (!p || !*p)
+ p = "/tmp";
+ if (p[strlen (p) - 1] == '/')
+ name = xstrconcat (p, template, NULL);
+ else
+ name = xstrconcat (p, "/", template, NULL);
+
p = strrchr (name, '/');
if (!p)
BUG ();
Modified: trunk/configure.ac
===================================================================
--- trunk/configure.ac 2010-10-26 12:55:36 UTC (rev 5469)
+++ trunk/configure.ac 2010-10-27 07:37:52 UTC (rev 5470)
@@ -24,8 +24,8 @@
# Remember to change the version number immediately *after* a release.
# Set my_issvn to "yes" for non-released code. Remember to run an
# "svn up" and "autogen.sh" right before creating a distribution.
-m4_define([my_version], [2.1.0beta1])
-m4_define([my_issvn], [no])
+m4_define([my_version], [2.1.0])
+m4_define([my_issvn], [yes])
m4_define([svn_revision], m4_esyscmd([printf "%d" $(svn info 2>/dev/null \
| sed -n '/^Revision:/ s/[^0-9]//gp'|head -1)]))
Modified: trunk/scd/scdaemon.c
===================================================================
--- trunk/scd/scdaemon.c 2010-10-26 12:55:36 UTC (rev 5469)
+++ trunk/scd/scdaemon.c 2010-10-27 07:37:52 UTC (rev 5470)
@@ -731,7 +731,7 @@
{
socket_name = create_socket_name (standard_socket,
"S.scdaemon",
- "/tmp/gpg-XXXXXX/S.scdaemon");
+ "gpg-XXXXXX/S.scdaemon");
fd = FD2INT(create_server_socket (standard_socket,
socket_name, &socket_nonce));
@@ -780,7 +780,7 @@
/* Create the socket. */
socket_name = create_socket_name (standard_socket,
"S.scdaemon",
- "/tmp/gpg-XXXXXX/S.scdaemon");
+ "gpg-XXXXXX/S.scdaemon");
fd = FD2INT (create_server_socket (standard_socket,
socket_name, &socket_nonce));
@@ -1019,7 +1019,15 @@
name = make_filename (opt.homedir, standard_name, NULL);
else
{
- name = xstrdup (template);
+ /* Prepend the tmp directory to the template. */
+ p = getenv ("TMPDIR");
+ if (!p || !*p)
+ p = "/tmp";
+ if (p[strlen (p) - 1] == '/')
+ name = xstrconcat (p, template, NULL);
+ else
+ name = xstrconcat (p, "/", template, NULL);
+
p = strrchr (name, '/');
if (!p)
BUG ();
Modified: trunk/tools/symcryptrun.c
===================================================================
--- trunk/tools/symcryptrun.c 2010-10-26 12:55:36 UTC (rev 5469)
+++ trunk/tools/symcryptrun.c 2010-10-27 07:37:52 UTC (rev 5470)
@@ -303,9 +303,15 @@
static char *
confucius_mktmpdir (void)
{
- char *name;
+ char *name, *p;
- name = strdup ("/tmp/gpg-XXXXXX");
+ p = getenv ("TMPDIR");
+ if (!p || !*p)
+ p = "/tmp";
+ if (p[strlen (p) - 1] == '/')
+ name = xstrconcat (p, "gpg-XXXXXX", NULL);
+ else
+ name = xstrconcat (p, "/", "gpg-XXXXXX", NULL);
if (!name || !mkdtemp (name))
{
log_error (_("can't create temporary directory `%s': %s\n"),
More information about the Gnupg-commits
mailing list