🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.unix
Article #755

Re: "#!" magic number (was: Shell standardization)

#755
From: Chuck.Phillips
Date: Tue, 12 Feb 1991 15:03
25 lines
1800 bytes
Submitted-by: Chuck.Phillips@FtCollins.NCR.COM (Chuck.Phillips)

>>>>> On 4 Feb 91 11:50:07 GMT, Chuck.Phillips@FtCollins.NCR.COM (Chuck.Phillips) said:
Chuck> Invitation for discussion: If the path after the "#!" doesn't begin
Chuck> with "/", "./" or "../", should PATH be searched for the execuatble?
Chuck> If so, how best could this be implemented?

Based on feedback from Ernest Hua (thanks!), I'd like to ammend this.  SUID
scripts under no circumstances should allow PATH searching for '#!'
arguments -- even if not SUID root.

Continuing the earlier thread, not only are directory structures
non-portable, but some interpreters (e.g. pearl, gawk, bash) have no POSIX
or otherwise defined directory location.  '#!' path searching also allows
vendors to write their own interpreters for scripts without forcing a
particular directory structure on admin.  Further, it allows different
versions of the same interpreter to be used simultaneously based on each
user's path.
--
Chuck Phillips  MS440
NCR Microelectronics 			chuck.phillips%ftcollins.ncr.com
2001 Danfield Ct.
Ft. Collins, CO.  80525   		...uunet!ncrlnk!ncr-mpd!bach!chuckp

Volume-Number: Volume 22, Number 123
Technical Details
Message-ID: <17838@cs.utexas.edu>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!uunet!cs.utexas.edu!jsq
References: <17011@cs.utexas.edu> <17065@cs.utexas.edu> <17155@cs.utexas.edu> <17650@cs.utexas.edu>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!uunet!cs.utexas.edu!jsq
From: Chuck.Phillips@FtCollins.NCR.COM (Chuck.Phillips)
Newsgroups: comp.std.unix
Subject: Re: "#!" magic number  (was: Shell standardization)
Message-ID: <17838@cs.utexas.edu>
Date: 12 Feb 91 15:03:33 GMT
References: <17011@cs.utexas.edu> <17065@cs.utexas.edu> <17155@cs.utexas.edu> <17650@cs.utexas.edu>
Sender: jsq@cs.utexas.edu
Organization: NCR Microelectronics, Ft. Collins, CO
Lines: 25
Approved: jsq@cs.utexas.edu (Moderator, John S. Quarterman)
X-Submissions: std-unix@uunet.uu.net