[PATCH] SET_PERSONALITY for static executables

From: Paul Mackerras (paulus@samba.org)
Date: Tue Apr 09 2002 - 07:10:30 EST


Marcelo,

The SET_PERSONALITY call which made a brief appearance in 2.4.18-rc4
(setting the personality for static binaries in fs/binfmt_elf.c) still
hasn't reappeared as of 2.4.19-pre6. Here is the patch to put it back
in.

Thanks,
Paul.

diff -urN linux-2.4.19-pre6/fs/binfmt_elf.c linuxppc-merge/fs/binfmt_elf.c
--- linux-2.4.19-pre6/fs/binfmt_elf.c Sun Apr 7 21:31:19 2002
+++ linuxppc-merge/fs/binfmt_elf.c Mon Apr 8 22:27:22 2002
@@ -586,6 +586,9 @@
                     bprm->argc++;
                   }
                 }
+ } else {
+ /* Executables without an interpreter also need a personality */
+ SET_PERSONALITY(elf_ex, ibcs2_interpreter);
         }
 
         /* Flush all traces of the currently running executable */
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Mon Apr 15 2002 - 22:00:12 EST