diff options
| author | Ophestra <cat@gensokyo.uk> | 2025-03-24 15:28:25 +0900 |
|---|---|---|
| committer | Ophestra <cat@gensokyo.uk> | 2025-03-24 16:03:07 +0900 |
| commit | ad3576c16467d8b36452307b005b6af0d0f0f9d2 (patch) | |
| tree | 6db4bcd2590ac4054fe51b9f955490a2402fb9fd /sandbox/sequential.go | |
| parent | b989a4601a386561103715187fde9400ad5b4e72 (diff) | |
sandbox: resolve tty name
Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'sandbox/sequential.go')
| -rw-r--r-- | sandbox/sequential.go | 10 |
1 files changed, 6 insertions, 4 deletions
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 |
