From 268edf0e6230c9455972c3343125d416a71a8759 Mon Sep 17 00:00:00 2001 From: Ian Gudger Date: Fri, 4 May 2018 23:19:13 -0700 Subject: Remove ineffectual code in sentry ELF loader PiperOrigin-RevId: 195517702 Change-Id: Id90309a6365cac06e68e8774aa79dc76ce1b11c7 --- pkg/sentry/loader/elf.go | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'pkg/sentry/loader/elf.go') 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 } -- cgit v1.2.3