Path: utzoo!attcan!uunet!lll-winken!lll-tis!helios.ee.lbl.gov!pasteur!ames!mailrus!cornell!uw-beaver!uw-june!uw-entropy!dataio!pilchuck!ssc!markz From: markz@ssc.UUCP (Mark Zenier) Newsgroups: comp.unix.xenix Subject: Re: "#!" scripts, kernel patches, and Xenix Message-ID: <1459@ssc.UUCP> Date: 15 Sep 88 17:00:16 GMT References: <161@tessera.UUCP> <858@viscous> <405@pigs.UUCP> Organization: SSC, Inc., Seattle, WA Lines: 18 In article <405@pigs.UUCP>, haugj@pigs.UUCP (The Beach Bum) writes: > In article <858@viscous> rosso@sco.COM (Ross Oliver) writes: > >In article <161@tessera.UUCP> jtc@tessera.UUCP (J.T. Conklin) writes: > >>Has anyone patched the kernel exec routine to execute interpreter > >>files ("#!" scripts)? > > > >The exec() function executes binaries only. If exec() fails (which > >it does on a shell script), then it is up to your shell to decide > >what to do. > Isn't the shell script check implemented in the library routine that is linked in, and not the kernel. This is what Rochkind says in "Advanced Unix Programming". This sounds much easier than disassembling half of the kernel. Mark Zenier uunet!pilchuck!ssc!markz "He did decide, though, that with more time and a great deal of mental effort, he could probably turn the activity into an acceptable perversion"-Mick Farren