Sv.2 suid bits
    Joseph S. D. Yao 
    jsdy at hadron.UUCP
       
    Thu Nov 28 14:19:42 AEST 1985
    
    
  
In article <123 at rexago1.UUCP> rich at rexago1.UUCP (K. Richard Magill) writes:
>On SV.2 (3b2, pc7300 (Safari)) suid bits do not work on shell scripts.  Am
>I just silly or don't I remember them working on 2 other UN*X-ish (TNIX,
>XENIX) environments?
Setuid bits never used to work on shell scripts, because the shell
scripts were/are not executed -- the  s h e l l  is/was executed
with the script name as argument.  In 4BSD and 4BSD-ische systems,
if the first two chars in a shell script are "#!" and the rest of
the first line is the name of a program (most often a shell) to
run with that script as input, then the kernel runs that program,
but some other effects are as if the script had been directly
executed; e.g., the setuid and getuid bits are honoured.
Note that on non-4BSD-ische systems where the C shell emulates
this behaviour, the side effects still don't exist because the
kernel is not doing the executing.
-- 
	Joe Yao		hadron!jsdy at seismo.{CSS.GOV,ARPA,UUCP}
    
    
More information about the Net.bugs.usg
mailing list