[PATCH] Restore 2.2 behaviour about threatening ELF interpreters in 2.4

From: Oleg Drokin (green@ixcelerator.com)
Date: Wed Aug 30 2000 - 03:42:49 EST


Hello!

   One of our guys have found that binfmt_elf.c in 2.4 does not make
   last byte of ELF interpreter to be zero (which is not needed by ELF specs).
   So, this patch is needed.

--- binfmt_elf.orig.c Wed Aug 30 12:14:34 2000
+++ binfmt_elf.c Wed Aug 30 12:14:42 2000
@@ -475,6 +475,7 @@
                                            elf_ppnt->p_filesz);
                         if (retval < 0)
                                 goto out_free_interp;
+ elf_interpreter[elf_ppnt->p_filesz - 1] = 0x0;
                         /* If the program interpreter is one of these two,
                          * then assume an iBCS2 image. Otherwise assume
                          * a native linux image.

Bye,
    Oleg
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Thu Aug 31 2000 - 21:00:25 EST