#!/usr/bin/perl # edit_authparam.cgi # A form for editing authentication programs use strict; use warnings; no warnings 'redefine'; no warnings 'uninitialized'; our (%text, %in, %access, $squid_version, %config, $auth_program); require './squid-lib.pl'; $access{'authparam'} || &error($text{'authparam_ecannot'}); &ui_print_header(undef, $text{'authparam_title'}, "", "edit_authparam", 0, 0, 0, &restart_button()); my $conf = &get_config(); print &ui_form_start("save_authparam.cgi", "post"); print &ui_table_start($text{'authparam_header'}, "width=100%", 2); if ($squid_version >= 2.5) { # Squid versions 2.5 and above use different config options for # the external authentication program my @auth = &find_config("auth_param", $conf); # Show basic authentication options my %basic = map { $_->{'values'}->[1], $_->{'values'} } grep { $_->{'values'}->[0] eq 'basic' } @auth; my @p = @{$basic{'program'} || []}; my $m = !@p ? 0 : $p[2] =~ /^(\S+)/ && $1 eq $auth_program ? 2 : 1; print &ui_table_row($text{'authparam_bprogram'}, &ui_radio("b_auth_mode", $m, [ [ 0, $text{'none'} ], [ 2, $text{'eprogs_capweb'} ], [ 1, &ui_filebox("b_auth", $m == 1 ? join(" ", @p[2..$#p]) : "", 40) ] ])); my $c = $basic{'children'}->[2]; print &ui_table_row($text{'eprogs_noap'}, &ui_opt_textbox("b_children", $c, 5, $text{'default'})); my @t = @{$basic{'credentialsttl'} || []}; print &ui_table_row($text{'eprogs_ttl'}, &ui_radio("b_ttl_def", @t ? 0 : 1, [ [ 1, $text{'default'} ], [ 0, &time_fields("b_ttl", 6, $t[2], $t[3]) ] ])); my @r = @{$basic{'realm'} || []}; my $r = join(" ", @r[2..$#r]); print &ui_table_row($text{'eprogs_realm'}, &ui_opt_textbox("b_realm", $r, 40, $text{'default'})); # Show digest authentication options print &ui_table_hr(); my %digest = map { $_->{'values'}->[1], $_->{'values'} } grep { $_->{'values'}->[0] eq 'digest' } @auth; @p = @{$digest{'program'} || []}; $m = @p ? 1 : 0; print &ui_table_row($text{'authparam_dprogram'}, &ui_radio("d_auth_mode", $m, [ [ 0, $text{'none'} ], [ 1, &ui_filebox("d_auth", $m == 1 ? join(" ", @p[2..$#p]) : "", 40) ] ])); $c = $digest{'children'}->[2]; print &ui_table_row($text{'eprogs_noap'}, &ui_opt_textbox("d_children", $c, 5, $text{'default'})); @r = @{$digest{'realm'} || []}; $r = join(" ", @r[2..$#r]); print &ui_table_row($text{'eprogs_realm'}, &ui_opt_textbox("d_realm", $r, 40, $text{'default'})); print &ui_table_hr(); # Show NTML authentication options my %ntlm = map { $_->{'values'}->[1], $_->{'values'} } grep { $_->{'values'}->[0] eq 'ntlm' } @auth; @p = @{$ntlm{'program'} || []}; $m = @p ? 1 : 0; print &ui_table_row($text{'authparam_nprogram'}, &ui_radio("n_auth_mode", $m, [ [ 0, $text{'none'} ], [ 1, &ui_filebox("n_auth", $m == 1 ? join(" ", @p[2..$#p]) : "", 40) ] ])); $c = $ntlm{'children'}->[2]; print &ui_table_row($text{'eprogs_noap'}, &ui_opt_textbox("n_children", $c, 5, $text{'default'})); $r = $ntlm{'max_challenge_reuses'}->[2]; print &ui_table_row($text{'authparam_reuses'}, &ui_opt_textbox("n_reuses", $r, 5, $text{'default'})); @t = @{$ntlm{'max_challenge_lifetime'} || []}; print &ui_table_row($text{'authparam_lifetime'}, &ui_radio("n_ttl_def", @t ? 0 : 1, [ [ 1, $text{'default'} ], [ 0, &time_fields("n_ttl", 6, $t[2], $t[3]) ] ])); } elsif ($squid_version >= 2) { # Squid versions 2 and above use a single external # authentication program my $v = &find_config("authenticate_program", $conf); my $m = !$v ? 0 : $v->{'value'} =~ /^(\S+)/ && $1 eq $auth_program ? 2 : 1; print &ui_table_row($text{'eprogs_cap'}, &ui_radio("auth_mode", $m, [ [ 0, $text{'none'} ], [ 2, $text{'eprogs_capweb'} ], [ 1, &ui_filebox("auth", $m == 1 ? $v->{'value'} : "", 40) ] ])); print &opt_input($text{'eadm_par'}, "proxy_auth_realm", $conf, $text{'eadm_default'}, 40); print &opt_input($text{'eprogs_noap'}, "authenticate_children", $conf, $text{'default'}, 6); if ($squid_version >= 2.4) { print &opt_time_input($text{'authparam_ttl'}, "authenticate_ttl", $conf, $text{'default'}, 6); print &opt_time_input($text{'authparam_ipttl'}, "authenticate_ip_ttl", $conf, $text{'authparam_never'}, 6); } } print &ui_table_hr(); my $taa = &find_value("authenticate_ip_ttl", $conf); my @ta = split(/\s+/,$taa); print &ui_table_row($text{'eprogs_aittl'}, &ui_radio("b_aittl_def", @ta ? 0 : 1, [ [ 1, $text{'default'} ], [ 0, &time_fields("b_aittl", 6, $ta[0], $ta[1]) ] ])); print &ui_table_end(); print &ui_form_end([ [ undef, $text{'buttsave'} ] ]); &ui_print_footer("", $text{'eprogs_return'});
Name | Type | Size | Permission | Actions |
---|---|---|---|---|
help | Folder | 0755 |
|
|
images | Folder | 0755 |
|
|
lang | Folder | 0755 |
|
|
CHANGELOG | File | 2.59 KB | 0644 |
|
acl.cgi | File | 10.91 KB | 0755 |
|
acl_save.cgi | File | 8.13 KB | 0755 |
|
acl_security.pl | File | 1.72 KB | 0755 |
|
always.cgi | File | 1.76 KB | 0755 |
|
always_save.cgi | File | 1.17 KB | 0755 |
|
backup_config.pl | File | 732 B | 0755 |
|
cachemgr.cgi | File | 1.03 KB | 0755 |
|
calamaris.cgi | File | 3.09 KB | 0755 |
|
cgi_args.pl | File | 2.23 KB | 0755 |
|
chown.cgi | File | 1.42 KB | 0755 |
|
clear.cgi | File | 2.87 KB | 0755 |
|
config-AlmaLinux-7.0-ALL | File | 439 B | 0644 |
|
config-Amazon-Linux-2-ALL | File | 398 B | 0644 |
|
config-CentOS-Linux-7.0-ALL | File | 398 B | 0644 |
|
config-CentOS-Stream-Linux-8.0-ALL | File | 439 B | 0644 |
|
config-CloudLinux-8.0-ALL | File | 439 B | 0644 |
|
config-Oracle-Linux-8.0-ALL | File | 439 B | 0644 |
|
config-Redhat-Enterprise-Linux-7.0-ALL | File | 439 B | 0644 |
|
config-Rocky-Linux-7.0-ALL | File | 439 B | 0644 |
|
config-Scientific-Linux-7.0-ALL | File | 398 B | 0644 |
|
config-Ubuntu-Linux-16.0-ALL | File | 447 B | 0644 |
|
config-aix | File | 365 B | 0644 |
|
config-cobalt-linux | File | 364 B | 0644 |
|
config-coherent-linux | File | 422 B | 0644 |
|
config-corel-linux | File | 338 B | 0644 |
|
config-debian-linux | File | 338 B | 0644 |
|
config-debian-linux-10.0-ALL | File | 447 B | 0644 |
|
config-debian-linux-3.0-4.9 | File | 344 B | 0644 |
|
config-debian-linux-5.0-5.9 | File | 454 B | 0644 |
|
config-debian-linux-6.0-6.9 | File | 442 B | 0644 |
|
config-debian-linux-7.0-9.0 | File | 449 B | 0644 |
|
config-freebsd | File | 395 B | 0644 |
|
config-freebsd-8-ALL | File | 484 B | 0644 |
|
config-generic-linux | File | 405 B | 0644 |
|
config-gentoo-linux | File | 412 B | 0644 |
|
config-hpux | File | 405 B | 0644 |
|
config-irix | File | 405 B | 0644 |
|
config-lfs-linux | File | 374 B | 0644 |
|
config-macos | File | 405 B | 0644 |
|
config-mandrake-linux | File | 409 B | 0644 |
|
config-mandrake-linux-8.0-ALL | File | 406 B | 0644 |
|
config-msc-linux | File | 422 B | 0644 |
|
config-netbsd | File | 360 B | 0644 |
|
config-open-linux | File | 429 B | 0644 |
|
config-open-linux-3.1e | File | 431 B | 0644 |
|
config-openSUSE-Linux-15.0-ALL | File | 447 B | 0644 |
|
config-openbsd | File | 395 B | 0644 |
|
config-openmamba-linux | File | 347 B | 0644 |
|
config-openserver | File | 405 B | 0644 |
|
config-osf1 | File | 405 B | 0644 |
|
config-pardus-linux | File | 416 B | 0644 |
|
config-redhat-linux | File | 341 B | 0644 |
|
config-redhat-linux-24.0-ALL | File | 439 B | 0644 |
|
config-redhat-linux-6.0 | File | 427 B | 0644 |
|
config-redhat-linux-6.1-23.0 | File | 420 B | 0644 |
|
config-slackware-linux | File | 405 B | 0644 |
|
config-sol-linux | File | 401 B | 0644 |
|
config-solaris | File | 405 B | 0644 |
|
config-solaris-11-ALL | File | 461 B | 0644 |
|
config-suse-linux | File | 332 B | 0644 |
|
config-suse-linux-8.0 | File | 359 B | 0644 |
|
config-suse-linux-8.2-ALL | File | 456 B | 0644 |
|
config-trustix-linux | File | 412 B | 0644 |
|
config-turbo-linux | File | 341 B | 0644 |
|
config-united-linux | File | 435 B | 0644 |
|
config-unixware | File | 405 B | 0644 |
|
config.info | File | 1.16 KB | 0644 |
|
config.info.ca | File | 1.42 KB | 0644 |
|
config.info.cs | File | 924 B | 0644 |
|
config.info.de | File | 1.4 KB | 0644 |
|
config.info.es | File | 1.36 KB | 0644 |
|
config.info.fa | File | 1.57 KB | 0644 |
|
config.info.fr | File | 538 B | 0644 |
|
config.info.it | File | 570 B | 0644 |
|
config.info.ja | File | 1.34 KB | 0644 |
|
config.info.nl | File | 1.35 KB | 0644 |
|
config.info.no | File | 1.22 KB | 0644 |
|
config.info.pl | File | 737 B | 0644 |
|
config.info.pt_BR | File | 1.44 KB | 0644 |
|
config.info.ru | File | 1.39 KB | 0644 |
|
config.info.sv | File | 569 B | 0644 |
|
config.info.tr | File | 369 B | 0644 |
|
config.info.uk | File | 1.41 KB | 0644 |
|
config.info.zh | File | 450 B | 0644 |
|
config.info.zh_TW | File | 355 B | 0644 |
|
defaultacl | File | 228 B | 0644 |
|
delete_http_accesses.cgi | File | 848 B | 0755 |
|
delete_http_reply_accesses.cgi | File | 913 B | 0755 |
|
delete_https.cgi | File | 838 B | 0755 |
|
delete_icp_accesses.cgi | File | 836 B | 0755 |
|
delete_icps.cgi | File | 1.14 KB | 0755 |
|
delete_pools.cgi | File | 1.42 KB | 0755 |
|
delete_refreshes.cgi | File | 840 B | 0755 |
|
edit_acl.cgi | File | 6.99 KB | 0755 |
|
edit_admin.cgi | File | 2.44 KB | 0755 |
|
edit_authparam.cgi | File | 4.62 KB | 0755 |
|
edit_cache.cgi | File | 7.39 KB | 0755 |
|
edit_cache_host.cgi | File | 4.76 KB | 0755 |
|
edit_cachemgr.cgi | File | 1.82 KB | 0755 |
|
edit_delay.cgi | File | 2.86 KB | 0755 |
|
edit_ext.cgi | File | 1.53 KB | 0755 |
|
edit_headeracc.cgi | File | 1.96 KB | 0755 |
|
edit_icp.cgi | File | 5.28 KB | 0755 |
|
edit_iptables.cgi | File | 1.91 KB | 0755 |
|
edit_logs.cgi | File | 4.74 KB | 0755 |
|
edit_manual.cgi | File | 919 B | 0755 |
|
edit_mem.cgi | File | 2.48 KB | 0755 |
|
edit_misc.cgi | File | 3.92 KB | 0755 |
|
edit_nauth.cgi | File | 1.26 KB | 0755 |
|
edit_nuser.cgi | File | 1.46 KB | 0755 |
|
edit_pool.cgi | File | 4.18 KB | 0755 |
|
edit_ports.cgi | File | 3.28 KB | 0755 |
|
edit_progs.cgi | File | 3.06 KB | 0755 |
|
edit_refresh.cgi | File | 1.91 KB | 0755 |
|
http_access.cgi | File | 2 KB | 0755 |
|
http_access_save.cgi | File | 1.37 KB | 0755 |
|
http_reply_access.cgi | File | 1.81 KB | 0755 |
|
http_reply_access_save.cgi | File | 1.25 KB | 0755 |
|
icp_access.cgi | File | 1.98 KB | 0755 |
|
icp_access_save.cgi | File | 1.35 KB | 0755 |
|
index.cgi | File | 5.54 KB | 0755 |
|
init_cache.cgi | File | 3.03 KB | 0755 |
|
install_check.pl | File | 615 B | 0755 |
|
list_headeracc.cgi | File | 1.71 KB | 0755 |
|
list_refresh.cgi | File | 1.63 KB | 0755 |
|
log_parser.pl | File | 1.27 KB | 0755 |
|
module.info | File | 496 B | 0644 |
|
module.info.af | File | 0 B | 0644 |
|
module.info.af.auto | File | 122 B | 0644 |
|
module.info.ar | File | 0 B | 0644 |
|
module.info.ar.auto | File | 191 B | 0644 |
|
module.info.be | File | 0 B | 0644 |
|
module.info.be.auto | File | 231 B | 0644 |
|
module.info.bg | File | 0 B | 0644 |
|
module.info.bg.auto | File | 249 B | 0644 |
|
module.info.ca | File | 112 B | 0644 |
|
module.info.ca.auto | File | 16 B | 0644 |
|
module.info.cs | File | 27 B | 0644 |
|
module.info.cs.auto | File | 105 B | 0644 |
|
module.info.da | File | 0 B | 0644 |
|
module.info.da.auto | File | 134 B | 0644 |
|
module.info.de | File | 110 B | 0644 |
|
module.info.de.auto | File | 20 B | 0644 |
|
module.info.el | File | 0 B | 0644 |
|
module.info.el.auto | File | 230 B | 0644 |
|
module.info.es | File | 31 B | 0644 |
|
module.info.es.auto | File | 124 B | 0644 |
|
module.info.eu | File | 0 B | 0644 |
|
module.info.eu.auto | File | 138 B | 0644 |
|
module.info.fa | File | 0 B | 0644 |
|
module.info.fa.auto | File | 231 B | 0644 |
|
module.info.fi | File | 0 B | 0644 |
|
module.info.fi.auto | File | 159 B | 0644 |
|
module.info.fr | File | 28 B | 0644 |
|
module.info.fr.auto | File | 127 B | 0644 |
|
module.info.he | File | 0 B | 0644 |
|
module.info.he.auto | File | 194 B | 0644 |
|
module.info.hr | File | 0 B | 0644 |
|
module.info.hr.auto | File | 143 B | 0644 |
|
module.info.hu | File | 0 B | 0644 |
|
module.info.hu.auto | File | 170 B | 0644 |
|
module.info.it | File | 0 B | 0644 |
|
module.info.it.auto | File | 142 B | 0644 |
|
module.info.ja | File | 37 B | 0644 |
|
module.info.ja.auto | File | 147 B | 0644 |
|
module.info.ko | File | 31 B | 0644 |
|
module.info.ko.auto | File | 121 B | 0644 |
|
module.info.lt | File | 0 B | 0644 |
|
module.info.lt.auto | File | 151 B | 0644 |
|
module.info.lv | File | 0 B | 0644 |
|
module.info.lv.auto | File | 159 B | 0644 |
|
module.info.ms | File | 116 B | 0644 |
|
module.info.ms.auto | File | 15 B | 0644 |
|
module.info.mt | File | 0 B | 0644 |
|
module.info.mt.auto | File | 144 B | 0644 |
|
module.info.nl | File | 27 B | 0644 |
|
module.info.nl.auto | File | 98 B | 0644 |
|
module.info.no | File | 0 B | 0644 |
|
module.info.no.auto | File | 131 B | 0644 |
|
module.info.pl | File | 27 B | 0644 |
|
module.info.pl.auto | File | 115 B | 0644 |
|
module.info.pt | File | 29 B | 0644 |
|
module.info.pt.auto | File | 103 B | 0644 |
|
module.info.pt_BR | File | 32 B | 0644 |
|
module.info.pt_BR.auto | File | 109 B | 0644 |
|
module.info.ro | File | 0 B | 0644 |
|
module.info.ro.auto | File | 147 B | 0644 |
|
module.info.ru | File | 40 B | 0644 |
|
module.info.ru.auto | File | 171 B | 0644 |
|
module.info.sk | File | 0 B | 0644 |
|
module.info.sk.auto | File | 181 B | 0644 |
|
module.info.sl | File | 0 B | 0644 |
|
module.info.sl.auto | File | 146 B | 0644 |
|
module.info.sv | File | 26 B | 0644 |
|
module.info.sv.auto | File | 111 B | 0644 |
|
module.info.th | File | 0 B | 0644 |
|
module.info.th.auto | File | 231 B | 0644 |
|
module.info.tr | File | 29 B | 0644 |
|
module.info.tr.auto | File | 132 B | 0644 |
|
module.info.uk | File | 0 B | 0644 |
|
module.info.uk.auto | File | 243 B | 0644 |
|
module.info.ur | File | 0 B | 0644 |
|
module.info.ur.auto | File | 205 B | 0644 |
|
module.info.vi | File | 0 B | 0644 |
|
module.info.vi.auto | File | 147 B | 0644 |
|
module.info.zh | File | 30 B | 0644 |
|
module.info.zh.auto | File | 84 B | 0644 |
|
module.info.zh_TW | File | 33 B | 0644 |
|
module.info.zh_TW.auto | File | 90 B | 0644 |
|
move_always.cgi | File | 762 B | 0755 |
|
move_headeracc.cgi | File | 777 B | 0755 |
|
move_http.cgi | File | 748 B | 0755 |
|
move_http_reply.cgi | File | 797 B | 0755 |
|
move_icp.cgi | File | 736 B | 0755 |
|
move_never.cgi | File | 751 B | 0755 |
|
move_pool.cgi | File | 831 B | 0755 |
|
move_refresh.cgi | File | 822 B | 0755 |
|
nat | File | 34.84 KB | 0644 |
|
never.cgi | File | 1.75 KB | 0755 |
|
never_save.cgi | File | 1.15 KB | 0755 |
|
parser-lib.pl | File | 6.39 KB | 0755 |
|
pool_access.cgi | File | 1.82 KB | 0755 |
|
pool_access_save.cgi | File | 1.17 KB | 0755 |
|
purge.cgi | File | 1.11 KB | 0755 |
|
restart.cgi | File | 381 B | 0755 |
|
save_admin.cgi | File | 2.23 KB | 0755 |
|
save_authparam.cgi | File | 5.29 KB | 0755 |
|
save_cache.cgi | File | 6.03 KB | 0755 |
|
save_cache_host.cgi | File | 3.8 KB | 0755 |
|
save_cachemgr.cgi | File | 1.15 KB | 0755 |
|
save_delay.cgi | File | 656 B | 0755 |
|
save_ext.cgi | File | 2.32 KB | 0755 |
|
save_headeracc.cgi | File | 1.26 KB | 0755 |
|
save_icp.cgi | File | 1.18 KB | 0755 |
|
save_iptables.cgi | File | 2.9 KB | 0755 |
|
save_logs.cgi | File | 3.14 KB | 0755 |
|
save_manual.cgi | File | 493 B | 0755 |
|
save_mem.cgi | File | 1.72 KB | 0755 |
|
save_misc.cgi | File | 2.65 KB | 0755 |
|
save_nuser.cgi | File | 1.89 KB | 0755 |
|
save_pool.cgi | File | 3.19 KB | 0755 |
|
save_ports.cgi | File | 2.59 KB | 0755 |
|
save_progs.cgi | File | 2.55 KB | 0755 |
|
save_refresh.cgi | File | 1.46 KB | 0755 |
|
squid-auth.pl | File | 446 B | 0755 |
|
squid-lib.pl | File | 16.16 KB | 0755 |
|
start.cgi | File | 1.16 KB | 0755 |
|
stop.cgi | File | 881 B | 0755 |
|
syslog_logs.pl | File | 715 B | 0755 |
|
useradmin_update.pl | File | 2.8 KB | 0755 |
|