Description of problem: SSH chroot using pam_chroot.so does not work when there is no mounted /proc inside the chroot. The ssh server throws the following error in /var/log/secure: Aug 24 13:26:06 rawhide sshd[11735]: fatal: openpty returns device for which ttyname fails. while the client shows the following error and disconnects: Connection to localhost closed by remote host. Connection to localhost closed. This failure occurs because sshd calls ttyname() and fails due to /proc not being present inside the chroot. How reproducible: Always. Steps to Reproduce: 1. Set up a chroot: - Create the root folder structure (bin, lib, etc, var, dev, dev/pts) with essential binaries - Mount /dev/pts over /chroot/dev/pts 2. Set the password for user view 3. Add the following to /etc/pam.d/sshd: session required pam_chroot.so onerr=fail debug 4. ssh -1 view localhost Actual results: Connection to localhost closed by remote host. Connection to localhost closed. Expected results: User logs in.
Step 2. should read "Set the password for a newly created user 'view'"
Fixed in master.
Fixed in: https://www.sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=050af9c4e
*** Bug 3353 has been marked as a duplicate of this bug. ***