Skip to content

Commit

Permalink
Merge branch 'develop_kuzhi' into 'develop'
Browse files Browse the repository at this point in the history
bugfix: can't use sudo command

When use ssh connect to container, can't use sudo command,
```
$sudo ls
sudo: must be setuid root
```

fix: opencontainers/runc#705

Signed-off-by: Rudy Zhang <[email protected]>

See merge request !77376
  • Loading branch information
聿歌 committed Aug 16, 2018
2 parents 6c7edb5 + a9642b1 commit 33dd176
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions daemon/mgr/spec.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,11 @@ func createSpec(ctx context.Context, c *Container, specWrapper *SpecWrapper) err
if err != nil {
return errors.Wrapf(err, "failed to generate spec: %s", c.ID)
}

// fix https://github.com/opencontainers/runc/issues/705
// use ssh connect to container, can't use sudo command.
s.Process.NoNewPrivileges = false

specWrapper.s = s

s.Hostname = c.Config.Hostname.String()
Expand Down

0 comments on commit 33dd176

Please sign in to comment.