summaryrefslogtreecommitdiffhomepage
path: root/pkg/sentry/syscalls/linux
diff options
context:
space:
mode:
authorBrian Geffon <bgeffon@google.com>2019-01-08 12:56:59 -0800
committerShentubot <shentubot@google.com>2019-01-08 12:58:08 -0800
commit3676b7ff1ca07e9fec1e380a0c2068390ce5d8de (patch)
tree8b0c0cc57500993a848f3cf5eba6a0f6ae900275 /pkg/sentry/syscalls/linux
parentf95b94fbe3e557b16ed2b78c87e8936c0aeab6c5 (diff)
Improve loader related error messages returned to users.
PiperOrigin-RevId: 228382827 Change-Id: Ica1d30e0df826bdd77f180a5092b2b735ea5c804
Diffstat (limited to 'pkg/sentry/syscalls/linux')
-rw-r--r--pkg/sentry/syscalls/linux/sys_thread.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/pkg/sentry/syscalls/linux/sys_thread.go b/pkg/sentry/syscalls/linux/sys_thread.go
index c12693ee2..61cafefb9 100644
--- a/pkg/sentry/syscalls/linux/sys_thread.go
+++ b/pkg/sentry/syscalls/linux/sys_thread.go
@@ -104,9 +104,9 @@ func Execve(t *kernel.Task, args arch.SyscallArguments) (uintptr, *kernel.Syscal
// Load the new TaskContext.
maxTraversals := uint(linux.MaxSymlinkTraversals)
- tc, err := t.Kernel().LoadTaskImage(t, t.MountNamespace(), root, wd, &maxTraversals, filename, argv, envv, t.Arch().FeatureSet())
- if err != nil {
- return 0, nil, err
+ tc, se := t.Kernel().LoadTaskImage(t, t.MountNamespace(), root, wd, &maxTraversals, filename, argv, envv, t.Arch().FeatureSet())
+ if se != nil {
+ return 0, nil, se.ToError()
}
ctrl, err := t.Execve(tc)