bugzilla-daemon at bugzilla.mindrot.org
2009-Feb-26  12:21 UTC
[Bug 1564] New: non-accessible user's home directory not reported when ChrootDirectory=none
https://bugzilla.mindrot.org/show_bug.cgi?id=1564
           Summary: non-accessible user's home directory not reported when
                    ChrootDirectory=none
           Product: Portable OpenSSH
           Version: 5.2p1
          Platform: All
        OS/Version: Solaris
            Status: NEW
          Severity: normal
          Priority: P3
         Component: sshd
        AssignedTo: unassigned-bugs at mindrot.org
        ReportedBy: Jan.Pechanec at Sun.COM
Created an attachment (id=1608)
 --> (http://bugzilla.mindrot.org/attachment.cgi?id=1608)
suggested patch
ChrootDirectory=none is the same as not specifying ChrootDirectory at
all. In both cases, sshd should report when the user's directory can't
be cd into. It does that only when chroot_directory is NULL. There is a
missing check for "none" in session.c:
                /* Suppress missing homedir warning for chroot case */
#ifdef HAVE_LOGIN_CAP
                r = login_getcapbool(lc, "requirehome", 0);
#endif
                if (r || options.chroot_directory == NULL)
                        fprintf(stderr, "Could not chdir to home "
                            "directory %s: %s\n", pw->pw_dir,
                            strerror(errno));
all other checks with chroot_directory has that "none" part. The patch
to fix this is very simple and attached. Tested against 5.2p1.
-- 
Configure bugmail: https://bugzilla.mindrot.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching the assignee of the bug.
bugzilla-daemon at bugzilla.mindrot.org
2010-Jun-18  03:16 UTC
[Bug 1564] non-accessible user's home directory not reported when ChrootDirectory=none
https://bugzilla.mindrot.org/show_bug.cgi?id=1564
Damien Miller <djm at mindrot.org> changed:
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |djm at mindrot.org
             Blocks|                            |1708
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED
--- Comment #1 from Damien Miller <djm at mindrot.org>  ---
Fix applied - thanks. This will be in OpenSSH-5.6
-- 
Configure bugmail: https://bugzilla.mindrot.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching the assignee of the bug.
You are watching someone on the CC list of the bug.
bugzilla-daemon at bugzilla.mindrot.org
2011-Jan-24  01:33 UTC
[Bug 1564] non-accessible user's home directory not reported when ChrootDirectory=none
https://bugzilla.mindrot.org/show_bug.cgi?id=1564
Damien Miller <djm at mindrot.org> changed:
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |CLOSED
--- Comment #2 from Damien Miller <djm at mindrot.org> 2011-01-24 12:33:53
EST ---
Move resolved bugs to CLOSED after 5.7 release
-- 
Configure bugmail: https://bugzilla.mindrot.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching the assignee of the bug.
You are watching someone on the CC list of the bug.
Possibly Parallel Threads
- [PATCH] Add a chroot_users option to sshd
- Fixed patch for Digital Unix SIA
- [Bug 101] New: session.c modifications for correct UNICOS behavior
- [Bug 1574] New: trailing white space on Forced Command within ChrootDirectory causes failure
- [PATCH] Fix login.conf, expiration, BSD compatibility in OpenSSH