Allow use of automatic 'all' ACL type
authorJamie Cameron <jcameron@webmin.com>
Thu, 3 Mar 2011 05:36:52 +0000 (21:36 -0800)
committerJamie Cameron <jcameron@webmin.com>
Thu, 3 Mar 2011 05:36:52 +0000 (21:36 -0800)
https://sourceforge.net/tracker/?func=detail&atid=117457&aid=3198123&group_id=17457

squid/always.cgi
squid/edit_cache.cgi
squid/edit_headeracc.cgi
squid/edit_logs.cgi
squid/http_access.cgi
squid/http_reply_access.cgi
squid/icp_access.cgi
squid/never.cgi
squid/pool_access.cgi

index 346daf5..cfe6379 100755 (executable)
@@ -33,6 +33,7 @@ printf "<input type=radio name=action value=deny %s> $text{'ahttp_d'}</td> </tr>
 
 for($i=1; $i<@always; $i++) { $match{$always[$i]}++; }
 @acls = grep { !$done{$_->{'values'}->[0]}++ } &find_config("acl", $conf);
+unshift(@acls, { 'values' => [ 'all' ] }) if ($squid_version >= 3);
 $r = @acls; $r = 10 if ($r > 10);
 
 print "<tr> <td valign=top><b>$text{'ahttp_ma'}</b></td>\n";
index eada6cc..f682cc6 100755 (executable)
@@ -131,6 +131,7 @@ if ($squid_version < 2) {
 print "<tr> <td valign=top><b>$text{'ec_ncua'}</b></td> <td>\n";
 print "<table>\n";
 @acls = grep { !$acldone{$_->{'values'}->[0]}++ } &find_config("acl", $conf);
+unshift(@acls, { 'values' => [ 'all' ] }) if ($squid_version >= 3);
 if ($squid_version >= 2.6) {
        # 2.6+ plus uses "cache deny"
        @v = &find_config("cache", $conf);
index c76e80c..8575788 100755 (executable)
@@ -38,6 +38,7 @@ printf "<input type=radio name=action value=deny %s> $text{'ahttp_d'}</td> </tr>
 
 for($i=2; $i<@v; $i++) { $match{$v[$i]}++; }
 @acls = grep { !$done{$_->{'values'}->[0]}++ } &find_config("acl", $conf);
+unshift(@acls, { 'values' => [ 'all' ] }) if ($squid_version >= 3);
 $r = @acls; $r = 10 if ($r > 10);
 
 print "<tr> <td valign=top><b>$text{'ahttp_ma'}</b></td>\n";
index 5c25f0d..32b395a 100755 (executable)
@@ -116,6 +116,8 @@ if ($squid_version >= 2.2) {
        if (!$bad_ident) {
                print "<tr><td valign=top><b>$text{'elogs_prilfa'}</b></td> <td colspan=3>\n";
                @acls = &find_config("acl", $conf);
+               unshift(@acls, { 'values' => [ 'all' ] })
+                       if ($squid_version >= 3);
                foreach $acl (@acls) {
                        $aclv = $acl->{'values'}->[0];
                        next if ($doneacl{$aclv}++);
index 080d7e0..1aebb2a 100755 (executable)
@@ -33,6 +33,7 @@ printf "<input type=radio name=action value=deny %s> $text{'ahttp_d'}</td> </tr>
 
 for($i=1; $i<@http; $i++) { $match{$http[$i]}++; }
 @acls = grep { !$done{$_->{'values'}->[0]}++ } &find_config("acl", $conf);
+unshift(@acls, { 'values' => [ 'all' ] }) if ($squid_version >= 3);
 $r = @acls; $r = 10 if ($r > 10);
 
 print "<tr> <td valign=top><b>$text{'ahttp_ma'}</b></td>\n";
index af0c30b..152f0a5 100755 (executable)
@@ -33,6 +33,7 @@ printf "<input type=radio name=action value=deny %s> $text{'ahttp_d'}</td> </tr>
 
 for($i=1; $i<@http; $i++) { $match{$http[$i]}++; }
 @acls = grep { !$done{$_->{'values'}->[0]}++ } &find_config("acl", $conf);
+unshift(@acls, { 'values' => [ 'all' ] }) if ($squid_version >= 3);
 $r = @acls; $r = 10 if ($r > 10);
 
 print "<tr> <td valign=top><b>$text{'ahttp_ma'}</b></td>\n";
index 3eb34aa..fd6eae6 100755 (executable)
@@ -33,6 +33,7 @@ printf "<input type=radio name=action value=deny %s> $text{'aicp_d'}</td> </tr>\
 
 for($i=1; $i<@icp; $i++) { $match{$icp[$i]}++; }
 @acls = grep { !$done{$_->{'values'}->[0]}++ } &find_config("acl", $conf);
+unshift(@acls, { 'values' => [ 'all' ] }) if ($squid_version >= 3);
 $r = @acls; $r = 10 if ($r > 10);
 
 print "<tr> <td valign=top><b>$text{'aicp_ma'}</b></td>\n";
index c71f963..5d6bfbf 100755 (executable)
@@ -33,6 +33,7 @@ printf "<input type=radio name=action value=deny %s> $text{'ahttp_d'}</td> </tr>
 
 for($i=1; $i<@never; $i++) { $match{$never[$i]}++; }
 @acls = grep { !$done{$_->{'values'}->[0]}++ } &find_config("acl", $conf);
+unshift(@acls, { 'values' => [ 'all' ] }) if ($squid_version >= 3);
 $r = @acls; $r = 10 if ($r > 10);
 
 print "<tr> <td valign=top><b>$text{'ahttp_ma'}</b></td>\n";
index 0ac6579..d88996e 100755 (executable)
@@ -34,6 +34,7 @@ printf "<input type=radio name=action value=deny %s> $text{'ahttp_d'}</td> </tr>
 
 for($i=2; $i<@delay; $i++) { $match{$delay[$i]}++; }
 @acls = grep { !$done{$_->{'values'}->[0]}++ } &find_config("acl", $conf);
+unshift(@acls, { 'values' => [ 'all' ] }) if ($squid_version >= 3);
 $r = @acls; $r = 10 if ($r > 10);
 
 print "<tr> <td valign=top><b>$text{'ahttp_ma'}</b></td>\n";