This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libc/14516] New: ttyname incorrectly fails if procfs is not available


http://sourceware.org/bugzilla/show_bug.cgi?id=14516

             Bug #: 14516
           Summary: ttyname incorrectly fails if procfs is not available
           Product: glibc
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: libc
        AssignedTo: unassigned@sourceware.org
        ReportedBy: siddhesh@redhat.com
                CC: drepper.fsp@gmail.com
    Classification: Unclassified


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.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]