Set the interpreter path to /nonexistent.

CloudABI executables are statically linked and don't have an
interpreter. Setting the interpreter path to NULL used to work
previously, but r314851 introduced code that checks the string
unconditionally. Running CloudABI executables now causes a null pointer
dereference.

Looking at the rest of imgact_elf.c, it seems various other codepaths
already leaned on the fact that the interpreter path is set. Let's just
go ahead and pick an obviously incorrect interpreter path to appease
imgact_elf.c.

MFC after:	1 week
This commit is contained in:
Ed Schouten 2017-03-22 07:05:27 +00:00
parent 36cc183884
commit ae2373da91
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=315701
5 changed files with 5 additions and 0 deletions

View File

@ -228,4 +228,5 @@ Elf32_Brandinfo cloudabi32_brand = {
.machine = EM_386,
.sysvec = &cloudabi32_elf_sysvec,
.compat_3_brand = "CloudABI",
.interp_path = "/nonexistent",
};

View File

@ -214,4 +214,5 @@ Elf64_Brandinfo cloudabi64_brand = {
.sysvec = &cloudabi64_elf_sysvec,
.flags = BI_CAN_EXEC_DYN,
.compat_3_brand = "CloudABI",
.interp_path = "/nonexistent",
};

View File

@ -190,4 +190,5 @@ Elf32_Brandinfo cloudabi32_brand = {
.machine = EM_ARM,
.sysvec = &cloudabi32_elf_sysvec,
.compat_3_brand = "CloudABI",
.interp_path = "/nonexistent",
};

View File

@ -183,4 +183,5 @@ Elf64_Brandinfo cloudabi64_brand = {
.sysvec = &cloudabi64_elf_sysvec,
.flags = BI_CAN_EXEC_DYN,
.compat_3_brand = "CloudABI",
.interp_path = "/nonexistent",
};

View File

@ -201,4 +201,5 @@ Elf32_Brandinfo cloudabi32_brand = {
.machine = EM_386,
.sysvec = &cloudabi32_elf_sysvec,
.compat_3_brand = "CloudABI",
.interp_path = "/nonexistent",
};