mirror of
git://git.gnupg.org/gnupg.git
synced 2024-12-22 10:19:57 +01:00
Honor TMPDIR.
This commit is contained in:
parent
0f721abddf
commit
dc5150db78
7
NEWS
7
NEWS
@ -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)
|
||||
-----------------------------------------------------
|
||||
|
||||
|
@ -1,3 +1,7 @@
|
||||
2010-10-27 Werner Koch <wk@g10code.com>
|
||||
|
||||
* gpg-agent.c (create_socket_name): Use TMPDIR. Change callers.
|
||||
|
||||
2010-10-26 Werner Koch <wk@g10code.com>
|
||||
|
||||
* cache.c (agent_put_cache): Allow deletion even if TTL is passwd
|
||||
|
@ -1026,10 +1026,10 @@ main (int argc, char **argv )
|
||||
|
||||
/* 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 @@ create_socket_name (char *standard_name, char *template)
|
||||
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 ();
|
||||
|
@ -24,8 +24,8 @@ min_automake_version="1.10"
|
||||
# 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)]))
|
||||
|
@ -1,3 +1,7 @@
|
||||
2010-10-27 Werner Koch <wk@g10code.com>
|
||||
|
||||
* scdaemon.c (create_socket_name): Use TMPDIR. Change callers.
|
||||
|
||||
2010-10-18 Werner Koch <wk@g10code.com>
|
||||
|
||||
* app-openpgp.c (parse_algorithm_attribute): Remove extra const in
|
||||
|
@ -731,7 +731,7 @@ main (int argc, char **argv )
|
||||
{
|
||||
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 @@ main (int argc, char **argv )
|
||||
/* 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 @@ create_socket_name (int use_standard_socket,
|
||||
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 ();
|
||||
|
@ -1,3 +1,7 @@
|
||||
2010-10-27 Werner Koch <wk@g10code.com>
|
||||
|
||||
* symcryptrun.c (confucius_mktmpdir): Use TMPDIR.
|
||||
|
||||
2010-10-14 Werner Koch <wk@g10code.com>
|
||||
|
||||
* gpg-connect-agent.c: Add option --agent-program.
|
||||
|
@ -303,9 +303,15 @@ remove_file (char *name, int shred)
|
||||
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"),
|
||||
|
Loading…
x
Reference in New Issue
Block a user