[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: seduid scripts
Hash-{pling,bang} interpretation should be done by the kernel, it is after
all akin to a magic number which is used for all other executables.
As for file names used on the line, the solution is very simple... Just
translate all forward slashes to backward ones for the first argument only
(ie the shell to be run) then do run that command this the original file as
an argument.
The following are examples:-
#!/bin/csh -> #!\bin\csh -> #!<current drive letter>:\bin\csh
#!c:/bin/csh -> #!c:\bin\csh
#!\bin\csh -> #!<current drive>:\bin\csh
#!c:\bin\csh -> #!c:\bin\csh
This is VERY simple and should be VERY simple to do. The only problem being
generating the ARGV stuff.. But that's stock code anyway.
If you are worried about poisoning the kernel, blame the original TOS
authors for the brain-damage, MiNT already has had to do a lot to get around
other brain-damage, why not this too?
Steve
--
---------------------------------------------------------------------------
Computer Systems Administrator, Dept. of Earth Sciences, Oxford University.
E-Mail: steve@uk.ac.ox.earth (JANET) steve@earth.ox.ac.uk (Internet).
Tel:- Oxford (0865) 282110 (UK) or +44 865 282110 (International).