[Chrootssh-users] chrootssh code broken?
Brought to you by:
punkball
From: Greg M. <gr...@ca...> - 2004-06-09 00:08:26
|
I have installed openssh-3.8.1p1-chroot, and I have followed the procedures= described in "Setting up chrooted sftp in linux."= (http://chrootssh.sourceforge.net/docs/chrootedsftp.html) Everything worked okay through the last step of "Build the chroot." "To test, su to root and type "chroot /path/to/chroot /bin/sh". If this= works, excellent!" # chroot /home/sftp/ /bin/sh bash# ls bin dev home lib usr bash# pwd / bash# I think this means that I have correctly configured the chroot, right? However, when I try to connect as the chrooted user with ssh or sftp, the= connection fails. # ssh localhost -l sftp sftp@localhost's password: Connection to localhost closed by remote host. Connection to localhost closed. # # sftp sftp@localhost Connecting to localhost... sftp@localhost's password: Connection closed # I can't find any error messages in the logs. Only this in= /var/log/messages: Jun 8 16:54:42 linux1363 sshd[30819]: Accepted password for sftp from= 127.0.0.1 port 38488 ssh2 Jun 8 16:55:19 linux1363 sshd[30829]: Accepted password for sftp from= 127.0.0.1 port 38489 ssh2 Looking back through the mailing list archives, I found a couple of= messages - one by Patrick Marshall on 2004/04/29 and one by Lee Fellows on= 2004/03/10 - both saying that the patched code in session.c is broken:= "It appears that the patch for implementing chroot behaviour was coming= too soon in the do_setusercontext function of session.c...." But it is hard for me to believe that if the code was really this badly= broken, it would have remained unfixed for three months - including the= latest version uploaded on 6/1. And since my own C skills barely go= beyond "hello, world" I am afraid to implement their suggested fixes= without knowing what I am doing. What is the status of this? Is the code truly broken? If not, could I= have a clue about what I might be doing wrong, or any tips on= troubleshooting this further? Thank you, Greg McCann |