load_elf: check mckernel execution

refs #758
This commit is contained in:
Tomoki Shirasawa
2017-09-12 13:15:22 +09:00
parent a05b6e1ba8
commit cdfa4015b7
3 changed files with 15 additions and 0 deletions

View File

@@ -78,6 +78,9 @@ static int load_elf(struct linux_binprm *bprm
char *pbuf;
const char *path;
if (mcctrl_os_alive() == -1)
return -ENOEXEC;
if(bprm->envc == 0)
return -ENOEXEC;
if(memcmp(elf_ex->e_ident, ELFMAG, SELFMAG) != 0)