summaryrefslogtreecommitdiffhomepage
path: root/runsc/boot/fs.go
diff options
context:
space:
mode:
authorFabricio Voznika <fvoznika@google.com>2020-06-08 23:06:50 -0700
committergVisor bot <gvisor-bot@google.com>2020-06-08 23:08:23 -0700
commit4e96b94915633cc06bf04bd680f4eeba6a764dc9 (patch)
treecdf3424e0d7c3d3f4346f23dd48667c9db1c1468 /runsc/boot/fs.go
parent12f90947612bc5d1d7122871e8c7c1f6b9e4e303 (diff)
Combine executable lookup code
Run vs. exec, VFS1 vs. VFS2 were executable lookup were slightly different from each other. Combine them all into the same logic. PiperOrigin-RevId: 315426443
Diffstat (limited to 'runsc/boot/fs.go')
-rw-r--r--runsc/boot/fs.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/runsc/boot/fs.go b/runsc/boot/fs.go
index b98a1eb50..e83584b82 100644
--- a/runsc/boot/fs.go
+++ b/runsc/boot/fs.go
@@ -293,11 +293,11 @@ func setupContainerFS(ctx context.Context, conf *Config, mntr *containerMounter,
procArgs.MountNamespace = mns
// Resolve the executable path from working dir and environment.
- f, err := user.ResolveExecutablePath(ctx, procArgs.Credentials, procArgs.MountNamespace, procArgs.Envv, procArgs.WorkingDirectory, procArgs.Argv[0])
+ resolved, err := user.ResolveExecutablePath(ctx, procArgs)
if err != nil {
- return fmt.Errorf("searching for executable %q, cwd: %q, envv: %q: %v", procArgs.Argv[0], procArgs.WorkingDirectory, procArgs.Envv, err)
+ return err
}
- procArgs.Filename = f
+ procArgs.Filename = resolved
return nil
}