From ad3576c16467d8b36452307b005b6af0d0f0f9d2 Mon Sep 17 00:00:00 2001 From: Ophestra Date: Mon, 24 Mar 2025 15:28:25 +0900 Subject: sandbox: resolve tty name Signed-off-by: Ophestra --- sandbox/sequential.go | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'sandbox/sequential.go') diff --git a/sandbox/sequential.go b/sandbox/sequential.go index f37567d9..d6967035 100644 --- a/sandbox/sequential.go +++ b/sandbox/sequential.go @@ -156,7 +156,7 @@ func (d MountDev) apply(params *Params) error { if err := hostProc.bindMount( toHost("/dev/"+name), targetPath, - syscall.MS_RDONLY, + 0, true, ); err != nil { return err @@ -204,10 +204,12 @@ func (d MountDev) apply(params *Params) error { if err := ensureFile(consolePath, 0444, 0755); err != nil { return err } - if err := hostProc.bindMount( - hostProc.stdout(), + if name, err := os.Readlink(hostProc.stdout()); err != nil { + return msg.WrapErr(err, err.Error()) + } else if err = hostProc.bindMount( + toHost(name), consolePath, - syscall.MS_RDONLY, + 0, false, ); err != nil { return err -- cgit v1.3.1