Sv.2 suid bits

Clive Charlwood crc at abic.UUCP
Tue Dec 10 05:19:02 AEST 1985


> 
> >> 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?
> >Suid bits on shell scripts don't work on any machine I have ever used. 
> >This includes PDP-11/70, Vax, 3b20, U370, PC7300.  It is frustrating,
> >but I have wound up making up a little C program which execs the shell. 
> >The C program has the suid bit set...
> 
> I'm glad I didn't know this, because I had need of  some scripts that
> were suid, so I wrote them and they worked! I am on a Masscomp,
> which runs a blend of SysIII, SysV, 4.1, and 4.2.
> 

I too have used the setuid bit on a masscomp machine. Two important
points though. 
    i)  You need to include the line '#! /bin/sh' so that exec(2) can
	handle it.

    ii) Your shell script runs as a restricted shell. (Anybody know a
	way around this folks)


	Clive Charlwood.

	P.S. I hate :->, :-) ;-} etc. Please desist.



More information about the Net.bugs.usg mailing list