--- index.cgi.orig Thu Dec 7 12:36:47 2006 +++ index.cgi Thu Dec 7 12:39:32 2006 @@ -20,6 +20,7 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +## Bugfix; ignore '$RULE_PATH' 2006-12-07 # Do common initialization and get common routines # Note this also does the acl acess lookup @@ -75,6 +76,12 @@ foreach $ruleset (@rulefiles) { ($rule) = $ruleset =~ /[#]*(\S+)\.rules/; + ## Remove the fucking BUG in this Webmin module! + ($rule) =~ s/.*\$RULE_PATH\/*//g; + ($rule) =~ s/.*somefile*//g; + ($rule) =~ s/[^[:print:]]//g; + if(/($rule)/) {next;} + # Check to see if user can access a given ruleset if ($access{'rules'} ne "*") { if ($access{'rules'} =~ /^\!/) { @@ -95,10 +102,12 @@ if ($ruleset =~ /^#/) { # The ruleset is disabled $rulerow{$rule} .= "\"$text{'index_disabled'}\""; - $rulerow{$rule} .= "$text{'index_enable'}" if $access{'ruletog'}; +# $rulerow{$rule} .= "$text{'index_enable'}" if $access{'ruletog'}; + $rulerow{$rule} .= "$text{'index_enable'}" if $access{'ruletog'}; } else { $rulerow{$rule} .= "\"$text{'index_enabled'}\""; - $rulerow{$rule} .= "$text{'index_disable'}" if $access{'ruletog'}; +# $rulerow{$rule} .= "$text{'index_disable'}" if $access{'ruletog'}; + $rulerow{$rule} .= "$text{'index_disable'}" if $access{'ruletog'}; } }