Fix tty and io permission for userns

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
This commit is contained in:
Michael Crosby 2016-02-11 11:23:35 -08:00
parent 20a39bce97
commit cf28969328
22 changed files with 1427 additions and 1124 deletions

View file

@ -157,11 +157,10 @@ func (p *process) delete() error {
func (p *process) openIO() error {
p.stdio = &stdio{}
var (
uid = int(p.state.User.UID)
gid = int(p.state.User.GID)
uid = p.state.RootUID
gid = p.state.RootGID
)
if p.state.Terminal {
// FIXME: this is wrong for user namespaces and will need to be translated
console, err := libcontainer.NewConsole(uid, gid)
if err != nil {
return err