Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!tut.cis.ohio-state.edu!usenet.ins.cwru.edu!ncoast!allbery From: allbery@NCoast.ORG (Brandon S. Allbery KB8JRR) Newsgroups: comp.unix.shell Subject: Re: the #! notation Message-ID: <1991Jan23.044019.4807@NCoast.ORG> Date: 23 Jan 91 04:40:19 GMT References: <1991Jan21.174803.6661@mp.cs.niu.edu> <16209@burdvax.PRC.Unisys.COM> <587@fciva.FRANKCAP.COM> Reply-To: allbery@ncoast.ORG (Brandon S. Allbery KB8JRR) Followup-To: comp.unix.shell Distribution: na Organization: North Coast Computer Resources (ncoast) Lines: 25 As quoted from <587@fciva.FRANKCAP.COM> by dag@fciva.FRANKCAP.COM (Daniel A. Graifer): +--------------- | Perhaps I've missed something here, but none of this #! stuff works on my | machine (running Sys V/386 3.1). Is this something that only works in | BSD-derived unixes? What about V3.2 or V4? +--------------- It's a BSD-ism (and requires some kernel hacks to implement). It also includes the seeds of a security hole --- if you've ever read any messages on the net about "disabling setuid shell scripts", the #! mechanism is both what makes setuid shell scripts possible and what makes them insecure. Note that some shells can emulate this mechanism when the kernel doesn't support it --- I think bash does, for instance, and I have posted my "bexec" mechanism for making any System V csh do so many times. (I will *not* repost it here yet again; if anyone wants it, send me mail. But considering the number of times I've posted it in the past, it ought to be archived all over the net by now.) ++Brandon -- Me: Brandon S. Allbery VHF/UHF: KB8JRR on 220, 2m, 440 Internet: allbery@NCoast.ORG Packet: KB8JRR @ WA8BXN America OnLine: KB8JRR AMPR: KB8JRR.AmPR.ORG [44.70.4.88] uunet!usenet.ins.cwru.edu!ncoast!allbery Delphi: ALLBERY