[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openssh-bugs
Subject:    [Bug 3048] ssh reads from the wrong directory in user namespace
From:       bugzilla-daemon () bugzilla ! mindrot ! org
Date:       2019-07-31 22:48:13
Message-ID: bug-3048-705-gosE8xD2ZN () https ! bugzilla ! mindrot ! org/
[Download RAW message or body]

https://bugzilla.mindrot.org/show_bug.cgi?id=3048

Darren Tucker <dtucker@dtucker.net> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |dtucker@dtucker.net

--- Comment #1 from Darren Tucker <dtucker@dtucker.net> ---
It uses the directory returned by the system's getpwnam(3) for the real
userid of the ssh process.  Thus, if you are running it as root then it
always looks in root's home directory.

https://github.com/openssh/openssh-portable/blob/master/ssh.c#L545

It's behaved like this for a long time.  I suspect its original intent
was to prevent $HOME games in the case where the ssh binary was setuid,
which was supported (although very infrequently actually used that way)
up until recently.

-- 
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.
_______________________________________________
openssh-bugs mailing list
openssh-bugs@mindrot.org
https://lists.mindrot.org/mailman/listinfo/openssh-bugs
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic