summaryrefslogtreecommitdiffhomepage
path: root/runsc/boot
diff options
context:
space:
mode:
Diffstat (limited to 'runsc/boot')
-rw-r--r--runsc/boot/BUILD1
-rw-r--r--runsc/boot/fs.go11
2 files changed, 11 insertions, 1 deletions
diff --git a/runsc/boot/BUILD b/runsc/boot/BUILD
index 73893d699..1a81acde5 100644
--- a/runsc/boot/BUILD
+++ b/runsc/boot/BUILD
@@ -35,6 +35,7 @@ go_library(
"//pkg/sentry/fs/ramfs",
"//pkg/sentry/fs/sys",
"//pkg/sentry/fs/tmpfs",
+ "//pkg/sentry/fs/tty",
"//pkg/sentry/inet",
"//pkg/sentry/kernel",
"//pkg/sentry/kernel/auth",
diff --git a/runsc/boot/fs.go b/runsc/boot/fs.go
index 82bbea4d7..28c3e8cd0 100644
--- a/runsc/boot/fs.go
+++ b/runsc/boot/fs.go
@@ -27,6 +27,7 @@ import (
_ "gvisor.googlesource.com/gvisor/pkg/sentry/fs/proc"
_ "gvisor.googlesource.com/gvisor/pkg/sentry/fs/sys"
_ "gvisor.googlesource.com/gvisor/pkg/sentry/fs/tmpfs"
+ _ "gvisor.googlesource.com/gvisor/pkg/sentry/fs/tty"
specs "github.com/opencontainers/runtime-spec/specs-go"
"gvisor.googlesource.com/gvisor/pkg/abi/linux"
@@ -109,6 +110,14 @@ func configureMounts(ctx context.Context, spec *specs.Spec, conf *Config, mns *f
return err
}
+ // Always mount /dev/pts.
+ if err := mountSubmount(ctx, spec, conf, mns, nil, specs.Mount{
+ Type: "devpts",
+ Destination: "/dev/pts",
+ }); err != nil {
+ return err
+ }
+
// Mount proc and sys even if the user did not ask for it, as the spec
// says we SHOULD.
if !procMounted {
@@ -214,7 +223,7 @@ func mountSubmount(ctx context.Context, spec *specs.Spec, conf *Config, mns *fs.
var fsName string
var useOverlay bool
switch m.Type {
- case "proc", "sysfs", "devtmpfs":
+ case "devpts", "devtmpfs", "proc", "sysfs":
fsName = m.Type
case "none":
fsName = "sysfs"