i have a setup where user directory is chroot directory (ChrootDirectory %h). after user logs in it's presented with error "Could not chdir to home directory /home/vhosts/user: No such file or directory" which doesn't make sense with this setup and leaks information about paths above chroot. i expect that user should be left in chroot's root (from chdir() and chroot() sequence in safely_chroot()) or chdir to $HOME setup by pam_env.
Created attachment 1524 [details] suppress chdir failure warning when ChrootDirectory set Patch for OpenBSD
Created attachment 1525 [details] suppress chdir failure warning when ChrootDirectory set (portable) portable OpenSSH patch
Please try one of the attached patches. They simply suppress the warning when ChrootDirectory is set and the login does not require a home directory.
Comment on attachment 1524 [details] suppress chdir failure warning when ChrootDirectory set You misspelled "homdir", but otherwise ok
This has now been applied and will be in the next release (5.1) and tomorrow's snapshots (http://www.mindrot.org/openssh_snap/). Thanks.
Mass update RESOLVED->CLOSED after release of openssh-5.1