Bug 1809 - ssh-agent doesnt respect $TMPDIR
Summary: ssh-agent doesnt respect $TMPDIR
Status: CLOSED FIXED
Alias: None
Product: Portable OpenSSH
Classification: Unclassified
Component: ssh-agent (show other bugs)
Version: 5.6p1
Hardware: All All
: P2 normal
Assignee: Assigned to nobody
URL:
Keywords:
Depends on:
Blocks: V_5_7
  Show dependency treegraph
 
Reported: 2010-08-26 11:59 AEST by Mike Frysinger
Modified: 2011-01-24 12:33 AEDT (History)
1 user (show)

See Also:


Attachments
openssh-ssh-agent-tmpdir.patch (540 bytes, patch)
2010-08-26 11:59 AEST, Mike Frysinger
no flags Details | Diff
/home/djm/ssh-tmpdir.diff (4.29 KB, patch)
2010-11-05 11:15 AEDT, Damien Miller
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mike Frysinger 2010-08-26 11:59:24 AEST
Created attachment 1913 [details]
openssh-ssh-agent-tmpdir.patch

the ssh-agent program hardcodes the /tmp/ path:
   if (agentsocket == NULL) {
       /* Create private directory for agent socket */
       strlcpy(socket_dir, "/tmp/ssh-XXXXXXXXXX", sizeof socket_dir);

this doesnt respect a user's TMPDIR preference and can obviously break if /tmp/ is screwed up (full/whatever), but TMPDIR is pointing to a usable location.

here is an untested patch, but looks straight forward to me :p
Comment 1 Damien Miller 2010-11-05 11:15:23 AEDT
Created attachment 1947 [details]
/home/djm/ssh-tmpdir.diff

use  everywhere
Comment 2 Damien Miller 2010-11-21 12:21:45 AEDT
this has been fixed in CVS and will be released in openssh 5.7. Thanks.
Comment 3 Damien Miller 2011-01-24 12:33:36 AEDT
Move resolved bugs to CLOSED after 5.7 release