Subject: Re: kern/13615: NetBSD current requires a .note.netbsd.ident section
To: Christos Zoulas <christos@zoulas.com>
From: Todd Vierling <tv@wasabisystems.com>
List: netbsd-bugs
Date: 08/05/2001 16:16:31
On Sun, 5 Aug 2001, Christos Zoulas wrote:

: >The best solution is to fix shells so they will not run scripts `manually'
: >by default if exec*() returns ENOEXEC.  Scripts properly prepended with a
: >magic number (the #! marker) will be started up by the kernel as expected
: >anyway; only those scripts with no magic number would fail.  This would weed
: >out the possibility of running a foreign binary as a script.
: >
: >This can cause some breakage, so the impact of such change would need to be
: >assessed first.  It might be useful as a shell `internal config variable' in
: >some cases.
:
: Many shells are smart and check if the file contains ascii data before
: executing it.

If we want to go this route, we simply need to fix our shells to be a little
smarter, and I'd be perfectly happy with that.  It'd provide a reasonable
bit of protection against running unsupported binaries without a bunch of
kernel goop.

Note that this is digressing a bit from the original bug report.

-- 
-- Todd Vierling <tv@wasabisystems.com>  *  Wasabi NetBSD:  Run with it.
-- NetBSD 1.5 now available on CD-ROM  --  http://www.wasabisystems.com/