Re:Teleport 2.2 Released: ARM Support, Security Audit Report...
by tetrep on Tuesday June 13, 2017 @08:41PM
(#14549944)
Can't you drop privileges immediately after getting the privileged socket? Why do you need to hold on to them?
[ Parent
| on HN ]
Re:Teleport 2.2 Released: ARM Support, Security Audit Report...
by old-gregg on Tuesday June 13, 2017 @10:37PM
(#14550334)
What do you mean "hold on to them"? Teleport needs root privileges to create sessions like `ssh root@host`, like any SSH server would. But DROPS privileges to start the session, i.e. when they no longer needed.
I am assuming you and hackcasual aren't familiar with Golang, since you aren't seeing familiar fork()/setuid()? I'll try to explain:
"dropping privileges" term comes from the old tradition of forking a child process from a privileged parent. Teleport, instead of calling fork() directly as you'd probably expect C code to work, uses Golang's syscall.StartProcess(), which does the entire fork-and-drop privileges logic, and the new privileges (user-specific ones) are passed as shown in the line of code above.
User SSH sessions are sandboxed in unprivileged processes just like you'd expect.
Re:Teleport 2.2 Released: ARM Support, Security Audit Report...
by devdoomari on Wednesday June 14, 2017 @10:07AM
(#14552786)
I think the parent comment is about running worker-threads in 'nobody' user account.
a lot of proper-distro-packaged apps (e.g. nginx on centos yum/ubuntu apt) spawn 'nobody' processes