Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> schrieb > In <[EMAIL PROTECTED]>, Sebastian 'lunar' Wiesner > wrote: > >> Gabriel Genellina <[EMAIL PROTECTED]> schrieb >>> A similar function exists on Linux too. But even if a file has the >>> right file format, if it does not have the execute bit set, won't >>> run. And you could set that bit on a JPG image too - and nothing >>> good would happen, I presume. >> >> Really? I don't think so. Afaik on Linux executable binary files need >> an ELF header. > > There are other executable loaders for `a.out` and `COFF` in the > kernel, and with the `binfmt_misc` module you can make anything with a > "magic" header executable, including Python scripts/bytecode and even > JPEG images.
Yes, I know... But ELF is actually the most common linker format on Linux systems. a.out is a legacy format, that is afaik not used by any modern distribution. Concerning COFF I'm not sure, if there is really a COFF loader in the kernel. At least I did not find any information about such a loader in the kernel configuration. It just lists elf, a.out and binfmt_misc. But basically you're right. One could even write a loader for JPEG files. But as long as such an loader is not part of a standard linux distribution, nothing bad happens when you try to execute a JPEG file, and that's what I wanted to point out. Sebastian -- Freedom is always the freedom of dissenters. (Rosa Luxemburg) -- http://mail.python.org/mailman/listinfo/python-list