diff options
Diffstat (limited to 'fs/binfmt_elf.c')
-rw-r--r-- | fs/binfmt_elf.c | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/fs/binfmt_elf.c b/fs/binfmt_elf.c index 786ee275ec0a..18ed6dd906c1 100644 --- a/fs/binfmt_elf.c +++ b/fs/binfmt_elf.c | |||
@@ -595,7 +595,6 @@ static int load_elf_binary(struct linux_binprm *bprm, struct pt_regs *regs) | |||
595 | int load_addr_set = 0; | 595 | int load_addr_set = 0; |
596 | char * elf_interpreter = NULL; | 596 | char * elf_interpreter = NULL; |
597 | unsigned int interpreter_type = INTERPRETER_NONE; | 597 | unsigned int interpreter_type = INTERPRETER_NONE; |
598 | unsigned char ibcs2_interpreter = 0; | ||
599 | unsigned long error; | 598 | unsigned long error; |
600 | struct elf_phdr *elf_ppnt, *elf_phdata; | 599 | struct elf_phdr *elf_ppnt, *elf_phdata; |
601 | unsigned long elf_bss, elf_brk; | 600 | unsigned long elf_bss, elf_brk; |
@@ -713,14 +712,6 @@ static int load_elf_binary(struct linux_binprm *bprm, struct pt_regs *regs) | |||
713 | if (elf_interpreter[elf_ppnt->p_filesz - 1] != '\0') | 712 | if (elf_interpreter[elf_ppnt->p_filesz - 1] != '\0') |
714 | goto out_free_interp; | 713 | goto out_free_interp; |
715 | 714 | ||
716 | /* If the program interpreter is one of these two, | ||
717 | * then assume an iBCS2 image. Otherwise assume | ||
718 | * a native linux image. | ||
719 | */ | ||
720 | if (strcmp(elf_interpreter,"/usr/lib/libc.so.1") == 0 || | ||
721 | strcmp(elf_interpreter,"/usr/lib/ld.so.1") == 0) | ||
722 | ibcs2_interpreter = 1; | ||
723 | |||
724 | /* | 715 | /* |
725 | * The early SET_PERSONALITY here is so that the lookup | 716 | * The early SET_PERSONALITY here is so that the lookup |
726 | * for the interpreter happens in the namespace of the | 717 | * for the interpreter happens in the namespace of the |
@@ -740,7 +731,7 @@ static int load_elf_binary(struct linux_binprm *bprm, struct pt_regs *regs) | |||
740 | * switch really is going to happen - do this in | 731 | * switch really is going to happen - do this in |
741 | * flush_thread(). - akpm | 732 | * flush_thread(). - akpm |
742 | */ | 733 | */ |
743 | SET_PERSONALITY(loc->elf_ex, ibcs2_interpreter); | 734 | SET_PERSONALITY(loc->elf_ex, 0); |
744 | 735 | ||
745 | interpreter = open_exec(elf_interpreter); | 736 | interpreter = open_exec(elf_interpreter); |
746 | retval = PTR_ERR(interpreter); | 737 | retval = PTR_ERR(interpreter); |
@@ -819,7 +810,7 @@ static int load_elf_binary(struct linux_binprm *bprm, struct pt_regs *regs) | |||
819 | goto out_free_dentry; | 810 | goto out_free_dentry; |
820 | } else { | 811 | } else { |
821 | /* Executables without an interpreter also need a personality */ | 812 | /* Executables without an interpreter also need a personality */ |
822 | SET_PERSONALITY(loc->elf_ex, ibcs2_interpreter); | 813 | SET_PERSONALITY(loc->elf_ex, 0); |
823 | } | 814 | } |
824 | 815 | ||
825 | /* OK, we are done with that, now set up the arg stuff, | 816 | /* OK, we are done with that, now set up the arg stuff, |
@@ -853,7 +844,7 @@ static int load_elf_binary(struct linux_binprm *bprm, struct pt_regs *regs) | |||
853 | 844 | ||
854 | /* Do this immediately, since STACK_TOP as used in setup_arg_pages | 845 | /* Do this immediately, since STACK_TOP as used in setup_arg_pages |
855 | may depend on the personality. */ | 846 | may depend on the personality. */ |
856 | SET_PERSONALITY(loc->elf_ex, ibcs2_interpreter); | 847 | SET_PERSONALITY(loc->elf_ex, 0); |
857 | if (elf_read_implies_exec(loc->elf_ex, executable_stack)) | 848 | if (elf_read_implies_exec(loc->elf_ex, executable_stack)) |
858 | current->personality |= READ_IMPLIES_EXEC; | 849 | current->personality |= READ_IMPLIES_EXEC; |
859 | 850 | ||