Bug 1574

Summary: trailing white space on Forced Command within ChrootDirectory causes failure
Product: Portable OpenSSH Reporter: bburnell
Component: sshdAssignee: Assigned to nobody <unassigned-bugs>
Status: CLOSED WORKSFORME    
Severity: normal CC: djm
Priority: P2    
Version: 5.1p1   
Hardware: All   
OS: Linux   

Description bburnell 2009-03-19 07:52:03 AEDT
When configuring a Match group or Match user for ChrootDirectory, trailing white space on Forced Command results in "Connection closed".

Match group download
        ChrootDirectory /common/chroot
        ForceCommand internal-sftp 
                                  ^ extra space here

trace ...
debug1: subsystem: exec() internal-sftp
debug1: Forced command (config) 'internal-sftp '

output ...
bburnell@bcodev # sftp sftpadmin@bldr-ccm44
Connecting to bldr-ccm44...
sftpadmin@bldr-ccm44's password: 
Connection closed

Match group download
        ChrootDirectory /common/chroot
        ForceCommand internal-sftp
                                 ^ no extra space here

debug1: subsystem: exec() internal-sftp
debug1: Forced command (config) 'internal-sftp'

bburnell@bcodev # sftp sftpadmin@bldr-ccm44
Connecting to bldr-ccm44...
sftpadmin@bldr-ccm44's password: 
sftp> Connection to bldr-ccm44 closed by remote host.
Comment 1 Damien Miller 2009-03-19 14:04:33 AEDT
I think that this is fixed in 5.2p1 - could you test this version?
Comment 2 Damien Miller 2009-12-07 11:10:35 AEDT
Closing due to inactivity.

This is probably fixed. If not then please reopen.
Comment 3 Damien Miller 2010-04-16 15:50:06 AEST
Mass move of bugs RESOLVED->CLOSED following the release of openssh-5.5p1