Re: Are setuid #!/foo/bar scripts secure

Marty Leisner (leisner@sdsp.mc.xerox.com)
Thu, 22 Aug 1996 14:43:13 PDT


Well, here's a reasonable way to right setuid shell scripts...

Make a shell setuid (bigger security risk, but ok at home on non-public
machines).

: leisner@thingy; cat foo
#! /tmp/setuidbash

whoami
id
ls -l /tmp/setuidbash
: leisner@thingy;

: leisner@thingy; ./foo
root
uid=220(leisner) gid=100(users) euid=0(root) groups=100(users),4(adm),6(disk),9
(kmem),10(wheel),11(floppy)
-rwsr-xr-x 1 root users 299649 Aug 22 17:43 /tmp/setuidbash

But I still thing some type of sysctl should control this behavior
(at home I want thinks to be very convenient).

-- 
marty
leisner@sdsp.mc.xerox.com  
Member of the League for Programming Freedom