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

Chuck.Phillips Chuck.Phillips at FtCollins.NCR.COM
Wed Feb 13 02:03:33 AEST 1991


Submitted-by: Chuck.Phillips at FtCollins.NCR.COM (Chuck.Phillips)

>>>>> On 4 Feb 91 11:50:07 GMT, Chuck.Phillips at 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



More information about the Comp.std.unix mailing list