From: Robert Klemme Date: 2010-04-06T18:02:03+09:00 Subject: Re: $SAFE=0 for setuid? 2010/4/6 Rick Ashton : > Robert Klemme wrote: >> >> Write a wrapper script with setuid.  You can even do such unsafe things >> as >> >> #!/bin/sh -f >> "$@" Btw, that should have read #!/bin/sh -f exec "$@" It's more efficient. > Yeah I did try this already as: > #!/usr/bin/env sh > ruby script.rb Rather state the path to ruby explicitly. Otherwise you'll introduce another security hole. > but no dice it still gives me safe level 1 on start :( I'm guessing the > child processes inherit the flag? Did you remove the setuid flag from the Ruby script before you tested this approach? Cheers robert -- remember.guy do |as, often| as.you_can - without end http://blog.rubybestpractices.com/