Bug 1809

Summary: ssh-agent doesnt respect $TMPDIR
Product: Portable OpenSSH Reporter: Mike Frysinger <vapier>
Component: ssh-agentAssignee: Assigned to nobody <unassigned-bugs>
Status: CLOSED FIXED    
Severity: normal CC: djm
Priority: P2    
Version: 5.6p1   
Hardware: All   
OS: All   
Bug Depends on:    
Bug Blocks: 1803    
Attachments:
Description Flags
openssh-ssh-agent-tmpdir.patch
none
/home/djm/ssh-tmpdir.diff none

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