From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (qmail 10423 invoked from network); 7 Aug 1998 11:21:55 -0000 Received: from headwall.maine.com (204.176.0.12) by mail2.redhat.com with SMTP; 7 Aug 1998 11:21:55 -0000 Received: (qmail 1679 invoked by uid 507); 7 Aug 1998 11:29:38 -0000 Message-ID: <19980807112938.1678.qmail@headwall.maine.com> From: cfm@maine.com Subject: Re: SUID scripts? In-Reply-To: <199808070403.WAA07748@ellpspace.math.ualberta.ca> from Michal Jaegermann at "Aug 6, 98 10:03:01 pm" To: axp-list@redhat.com Date: Fri, 7 Aug 1998 06:29:38 -0500 (EST) Cc: axp-list@redhat.com X-Mailer: ELM [version 2.4ME+ PL31 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit > Mike \"Ford\" Ditto wrote: > > > > Here is an implementation of "secure" set-ID #! files (A.K.A. set-uid > > shell scripts) for Linux 2.0.x. > > [ Long kernel hack with unknown security implications and a need to > be redone for every new kernel version elided... ] > > Instead of that it is much simpler to have a compiled "wrapper" > program which can call your shell script, avoiding various race > conditions, and execute it under id you want. This is, for example, Just a thought: even that might not always work with every shell. I recently built bash 2.latest and had to change some default setting that had to do with this. ( It is documented in the bash README.) If I understand correctly, the `full-featured' shells like bash aren't appropriate for execution SUID and that more, uh, rigorous shells like /bin/sh or better yet, perl are more suited. If you are going to wrap it and run it suid, you are probably better off doing it in perl. $.02 cfm -- Christopher F. Miller, Publisher cfm@maine.com MaineStreet Communications, Inc 208 Portland Road, Gray, ME 04039 1.207.657.5078 (MTRF 3-5pm) http://www.maine.com/