kernel recognizing #! scripts

ado at elsie.UUCP ado at elsie.UUCP
Sat Mar 10 06:52:52 AEST 1984


	One advantage to having the kernel recognize #! scripts is
	that set-uid/gid mode works.  Just as with a binary, the
	kernel recognizes this mode and starts the shell or whatever with
	appropriate effective uid/gid.  On 4.1bsd, scripts without
	#! ignore set-uid mode. . .
		Rich Altmaier, Integrated Office Systems.
		decwrl!ios!richa

Note, however, that in a binary program you can issue a system call to
reset the user (or group) id to the "real" (as distinct from the effective) id.
I've yet to learn of a way to do this in shell scripts.  Maybe the unavailable
korn shell supports it.
--
The "unix" in "net.unix-wizards" is a down-cased variant of "UNIX" (please note:
all UPPER CASE), which is a Bell Labs trademark.
-- 
UUCP:	decvax!harpo!seismo!rlgvax!cvl!elsie!ado
DDD:	(301) 496-5688



More information about the Comp.unix.wizards mailing list