Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!sundc!gouldsd!mjranum From: mjranum@gouldsd.UUCP (Marcus J Ranum) Newsgroups: comp.unix.questions Subject: Re: setuid shell scripts Message-ID: <416@gouldsd.UUCP> Date: Mon, 1-Dec-86 11:35:40 EST Article-I.D.: gouldsd.416 Posted: Mon Dec 1 11:35:40 1986 Date-Received: Mon, 1-Dec-86 21:18:12 EST References: <13@houligan.UUCP> <1112@decuac.DEC.COM> Organization: Gould Electronics, Landover MD. Lines: 19 Summary: setuid shells. In article <13@houligan.UUCP>, dave@murphy.UUCP (Rael's brother John) writes: > It works on BSD4.2 and 4.3 systems. ... When writing setuid shell scripts it's a good idea to specifically set the PATH (not including '.' or any WRITEABLE directory) You also must avoid any programs that have a shell escape or can call a program with a shell escape. Usually when I have to do setuid shell scripts, I change directory to someplace innocuous and unwritable, set the PATH to nothing, and call *EVERYTHING* with explicit path names. Even then, it's a rotten idea to use setuid shells when you have a perfectly good C compiler around and can do a much better job... -- TRUST NO-ONE !! STAY ALERT !! KEEP YOUR LASER HANDY !! THE COMPUTER IS YOUR FRIEND !!!