summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorIan Gudger <igudger@google.com>2018-05-04 23:19:13 -0700
committerShentubot <shentubot@google.com>2018-05-04 23:20:01 -0700
commit268edf0e6230c9455972c3343125d416a71a8759 (patch)
tree8dcbaabdd41d50f70574fd0a96ec2d759690a5aa
parentd70787d340b3967fd691fbbd079dece329f7a65c (diff)
Remove ineffectual code in sentry ELF loader
PiperOrigin-RevId: 195517702 Change-Id: Id90309a6365cac06e68e8774aa79dc76ce1b11c7
-rw-r--r--pkg/sentry/loader/elf.go5
1 files changed, 1 insertions, 4 deletions
diff --git a/pkg/sentry/loader/elf.go b/pkg/sentry/loader/elf.go
index d23dc1096..8579eeee4 100644
--- a/pkg/sentry/loader/elf.go
+++ b/pkg/sentry/loader/elf.go
@@ -408,11 +408,8 @@ func loadParsedELF(ctx context.Context, m *mm.MemoryManager, f *fs.File, info el
path := make([]byte, phdr.Filesz)
_, err := readFull(ctx, f, usermem.BytesIOSequence(path), int64(phdr.Off))
if err != nil {
- ctx.Infof("Error reading PT_INTERP path: %v", err)
// If an interpreter was specified, it should exist.
- if err == io.EOF || err == io.ErrUnexpectedEOF {
- err = syserror.ENOEXEC
- }
+ ctx.Infof("Error reading PT_INTERP path: %v", err)
return loadedELF{}, syserror.ENOEXEC
}