summaryrefslogtreecommitdiffhomepage
path: root/runsc/boot/loader.go
diff options
context:
space:
mode:
authorKevin Krakauer <krakauer@google.com>2018-08-24 14:41:38 -0700
committerShentubot <shentubot@google.com>2018-08-24 14:42:40 -0700
commit02dfceab6d4c4a2a3342ef69be0265b7ab03e5d7 (patch)
tree31a84af980c995689395641e2a1cc2b5281e9e02 /runsc/boot/loader.go
parent7b0dfb0cdbdcb402c000d30399dbfd2eeebe1266 (diff)
runsc: Allow runsc to properly search the PATH for executable name.
Previously, runsc improperly attempted to find an executable in the container's PATH. We now search the PATH via the container's fsgofer rather than the host FS, eliminating the confusing differences between paths on the host and within a container. PiperOrigin-RevId: 210159488 Change-Id: I228174dbebc4c5356599036d6efaa59f28ff28d2
Diffstat (limited to 'runsc/boot/loader.go')
-rw-r--r--runsc/boot/loader.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/runsc/boot/loader.go b/runsc/boot/loader.go
index 7debf0ac2..2f212c704 100644
--- a/runsc/boot/loader.go
+++ b/runsc/boot/loader.go
@@ -428,6 +428,10 @@ func (l *Loader) startContainer(k *kernel.Kernel, spec *specs.Spec, conf *Config
return 0, fmt.Errorf("failed to create new process: %v", err)
}
+ if procArgs.Filename, err = GetExecutablePathInternal(procArgs.NewContext(k), &procArgs); err != nil {
+ return 0, err
+ }
+
tg, err := l.k.CreateProcess(procArgs)
if err != nil {
return 0, fmt.Errorf("failed to create process in sentry: %v", err)