Linux mail.vriendennsm.nl 6.1.0-51-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.177-1 (2026-07-16) x86_64
Apache/2.4.68 (Debian)
Server IP : 217.154.75.17 & Your IP : 216.73.216.195
Domains :
Cant Read [ /etc/named.conf ]
User : www-data
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
usr /
share /
webmin /
Delete
Unzip
Name
Size
Permission
Date
Action
acl
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
adsl-client
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
apache
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
at
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
authentic-theme
[ DIR ]
drwxr-xr-x
2026-07-25 20:56
backup-config
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
bacula-backup
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
bandwidth
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
bin
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
bind8
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
blue-theme
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
change-user
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
cluster-copy
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
cluster-cron
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
cluster-passwd
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
cluster-shell
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
cluster-software
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
cluster-useradmin
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
cluster-usermin
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
cluster-webmin
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
cpan
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
cron
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
custom
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
dfsadmin
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
dhcpd
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
dovecot
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
exim
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
exports
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
fail2ban
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
fdisk
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
fetchmail
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
filemin
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
filter
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
firewall
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
firewall6
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
firewalld
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
fsdump
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
gray-theme
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
grub2
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
heartbeat
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
htaccess-htpasswd
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
idmapd
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
images
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
inetd
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
init
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
inittab
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
ipfilter
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
ipfw
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
ipsec
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
iscsi-client
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
iscsi-server
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
iscsi-target
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
iscsi-tgtd
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
kea-dhcp
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
krb5
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
lang
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
ldap-client
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
ldap-server
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
ldap-useradmin
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
logrotate
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
logviewer
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
lpadmin
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
lvm
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
mailboxes
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
mailcap
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
man
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
mount
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
mysql
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
net
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
nftables
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
nginx
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
nis
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
openslp
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
package-updates
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
pam
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
pap
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
passwd
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
phpini
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
postfix
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
postgresql
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
ppp-client
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
pptp-client
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
pptp-server
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
proc
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
procmail
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
proftpd
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
qmailadmin
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
quota
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
raid
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
samba
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
sarg
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
sendmail
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
servers
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
shell
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
shorewall
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
shorewall6
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
smart-status
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
smf
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
software
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
spam
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
squid
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
sshd
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
status
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
stunnel
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
syslog
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
syslog-ng
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
system-status
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
systemd
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
tcpwrappers
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
time
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
tunnel
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
unauthenticated
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
updown
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
useradmin
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
usermin
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
vendor_perl
[ DIR ]
drwxr-xr-x
2026-06-10 18:25
webalizer
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
webmin
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
webmincron
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
webminlog
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
xinetd
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
xterm
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
LICENCE
1.48
KB
-rw-r--r--
2026-07-17 21:17
LICENCE.ja
1.62
KB
-rw-r--r--
2026-07-17 21:17
README.md
4.23
KB
-rw-r--r--
2026-07-17 21:17
WebminCore.pm
9.05
KB
-rw-r--r--
2026-07-17 21:17
acl_security.pl
4.87
KB
-rwxr-xr-x
2026-07-17 21:17
changepass.pl
868
B
-rwxr-xr-x
2026-07-17 21:22
chooser.cgi
7.21
KB
-rwxr-xr-x
2026-07-17 21:22
config-aix
227
B
-rw-r--r--
2026-07-17 21:17
config-cobalt-linux
264
B
-rw-r--r--
2026-07-17 21:17
config-coherent-linux
264
B
-rw-r--r--
2026-07-17 21:17
config-corel-linux
264
B
-rw-r--r--
2026-07-17 21:17
config-debian-linux
264
B
-rw-r--r--
2026-07-17 21:17
config-freebsd
256
B
-rw-r--r--
2026-07-17 21:17
config-generic-linux
264
B
-rw-r--r--
2026-07-17 21:17
config-gentoo-linux
264
B
-rw-r--r--
2026-07-17 21:17
config-hpux
243
B
-rw-r--r--
2026-07-17 21:17
config-irix
284
B
-rw-r--r--
2026-07-17 21:17
config-lib.pl
11.84
KB
-rwxr-xr-x
2026-07-17 21:17
config-macos
260
B
-rw-r--r--
2026-07-17 21:17
config-mandrake-linux
278
B
-rw-r--r--
2026-07-17 21:17
config-msc-linux
264
B
-rw-r--r--
2026-07-17 21:17
config-netbsd
283
B
-rw-r--r--
2026-07-17 21:17
config-open-linux
264
B
-rw-r--r--
2026-07-17 21:17
config-openbsd
241
B
-rw-r--r--
2026-07-17 21:17
config-openmamba-linux
264
B
-rw-r--r--
2026-07-17 21:17
config-openserver
236
B
-rw-r--r--
2026-07-17 21:17
config-osf1
266
B
-rw-r--r--
2026-07-17 21:17
config-pardus-linux
264
B
-rw-r--r--
2026-07-17 21:17
config-redhat-linux
264
B
-rw-r--r--
2026-07-17 21:17
config-slackware-linux
280
B
-rw-r--r--
2026-07-17 21:17
config-sol-linux
264
B
-rw-r--r--
2026-07-17 21:17
config-solaris
417
B
-rw-r--r--
2026-07-17 21:17
config-suse-linux
264
B
-rw-r--r--
2026-07-17 21:17
config-syno-linux
364
B
-rw-r--r--
2026-07-17 21:17
config-trustix-linux
264
B
-rw-r--r--
2026-07-17 21:17
config-turbo-linux
264
B
-rw-r--r--
2026-07-17 21:17
config-united-linux
264
B
-rw-r--r--
2026-07-17 21:17
config-unixware
286
B
-rw-r--r--
2026-07-17 21:17
config-windows
88
B
-rw-r--r--
2026-07-17 21:17
config.cgi
1.64
KB
-rwxr-xr-x
2026-07-17 21:22
config_save.cgi
1.68
KB
-rwxr-xr-x
2026-07-17 21:22
copyconfig.pl
4.33
KB
-rwxr-xr-x
2026-07-17 21:22
create-module.pl
3.95
KB
-rwxr-xr-x
2026-07-17 21:22
date_chooser.cgi
2.19
KB
-rwxr-xr-x
2026-07-17 21:22
deb-name
7
B
-rw-r--r--
2026-07-17 21:22
defaultacl
124
B
-rw-r--r--
2026-07-17 21:17
defaulttheme
16
B
-rw-r--r--
2026-07-17 21:17
entities_map.txt
1.47
KB
-rw-r--r--
2026-07-17 21:17
fastrpc.cgi
11.87
KB
-rwxr-xr-x
2026-07-17 21:22
favicon.ico
14.73
KB
-rw-r--r--
2026-07-17 21:17
forgot.cgi
6.27
KB
-rwxr-xr-x
2026-07-17 21:22
forgot_form.cgi
1.14
KB
-rwxr-xr-x
2026-07-17 21:22
forgot_send.cgi
5.11
KB
-rwxr-xr-x
2026-07-17 21:22
group_chooser.cgi
7.51
KB
-rwxr-xr-x
2026-07-17 21:22
help.cgi
2.26
KB
-rwxr-xr-x
2026-07-17 21:22
html-editor-lib.pl
17.72
KB
-rw-r--r--
2026-07-17 21:17
index.cgi
5.61
KB
-rwxr-xr-x
2026-07-17 21:22
install-module.pl
1.54
KB
-rwxr-xr-x
2026-07-17 21:22
install-type
4
B
-rw-r--r--
2026-07-17 21:22
javascript-lib.pl
14.69
KB
-rwxr-xr-x
2026-07-17 21:17
lang_list.txt
2.51
KB
-rw-r--r--
2026-07-17 21:17
maketemp.pl
424
B
-rwxr-xr-x
2026-07-17 21:17
mime.types
12.42
KB
-rw-r--r--
2026-07-17 21:17
miniserv-lib.pl
175.51
KB
-rw-r--r--
2026-07-17 21:17
miniserv.pem
2.9
KB
-rw-r--r--
2026-07-17 21:17
miniserv.pl
33.88
KB
-rwxr-xr-x
2026-07-17 21:22
module_chooser.cgi
4.14
KB
-rwxr-xr-x
2026-07-17 21:22
negativeacl
29
B
-rw-r--r--
2026-07-17 21:17
newmods.pl
1.25
KB
-rwxr-xr-x
2026-07-17 21:17
os_eol.json
50.05
KB
-rw-r--r--
2026-07-17 21:17
os_list.txt
35.22
KB
-rw-r--r--
2026-07-17 21:17
oschooser.pl
4.55
KB
-rwxr-xr-x
2026-07-17 21:22
pam_login.cgi
4.33
KB
-rwxr-xr-x
2026-07-17 21:22
password_change.cgi
7.02
KB
-rwxr-xr-x
2026-07-17 21:22
password_form.cgi
1.3
KB
-rwxr-xr-x
2026-07-17 21:22
perlpath.pl
571
B
-rwxr-xr-x
2026-07-17 21:22
record-failed.pl
503
B
-rwxr-xr-x
2026-07-17 21:22
record-login.pl
513
B
-rwxr-xr-x
2026-07-17 21:22
record-logout.pl
516
B
-rwxr-xr-x
2026-07-17 21:22
robots.txt
26
B
-rw-r--r--
2026-07-17 21:17
rpc.cgi
4.03
KB
-rwxr-xr-x
2026-07-17 21:22
run-postinstalls.pl
971
B
-rwxr-xr-x
2026-07-17 21:22
run-uninstalls.pl
1004
B
-rwxr-xr-x
2026-07-17 21:22
safeacl
73
B
-rw-r--r--
2026-07-17 21:17
session_login.cgi
5.11
KB
-rwxr-xr-x
2026-07-17 21:22
setup-repos.sh
766
B
-rw-r--r--
2026-07-17 21:17
setup.bat
3.08
KB
-rw-r--r--
2026-07-17 21:17
setup.pl
32.4
KB
-rwxr-xr-x
2026-07-17 21:22
setup.sh
35.21
KB
-rwxr-xr-x
2026-07-17 21:17
switch_theme.cgi
1.22
KB
-rwxr-xr-x
2026-07-17 21:22
switch_user.cgi
404
B
-rwxr-xr-x
2026-07-17 21:22
thirdparty.pl
1.73
KB
-rwxr-xr-x
2026-07-17 21:17
ui-lib.pl
123.52
KB
-rwxr-xr-x
2026-07-17 21:17
update-from-repo.sh
14.77
KB
-rwxr-xr-x
2026-07-17 21:17
uptracker.cgi
2.89
KB
-rwxr-xr-x
2026-07-17 21:22
user_chooser.cgi
7.39
KB
-rwxr-xr-x
2026-07-17 21:22
version
6
B
-rw-r--r--
2026-07-17 21:17
web-lib-funcs.pl
417.23
KB
-rwxr-xr-x
2026-07-17 21:17
web-lib.pl
856
B
-rwxr-xr-x
2026-07-17 21:17
webmin-daemon
80
B
-rw-r--r--
2026-07-17 21:17
webmin-init
1.93
KB
-rwxr-xr-x
2026-07-17 21:17
webmin-pam
101
B
-rw-r--r--
2026-07-17 21:17
webmin-search-lib.pl
9.47
KB
-rwxr-xr-x
2026-07-17 21:17
webmin-systemd
374
B
-rw-r--r--
2026-07-17 21:17
webmin_search.cgi
2.63
KB
-rwxr-xr-x
2026-07-17 21:22
xmlrpc.cgi
4.14
KB
-rwxr-xr-x
2026-07-17 21:22
Save
Rename
# config-lib.pl # Common functions for parsing config.info files # Each module has a number of configurable parameters (stored in the config and # config-* files in the module directory). Descriptions and possible values for # each option are stored in the file config.info in the module directory. # Each line of config.info looks like # name=desc,type[,options] # desc - A description of the parameter # type - Possible types (and options) are # 0 - Free text # 1 - One of many (options are possibilities) # 2 - Many of many (options are possibilities) # 3 - Optional free text # 4 - Like 1, but uses a pulldown menu # 5 - User name # 6 - Group name # 7 - Directory # 8 - File # 9 - Multiline text # 10 - Like 1, but with free text option # 11 - Section header # 12 - Password free text, with don't change option # 13 - Like 2, but uses a list box # 14 - Parameter is the name of a function in config_info.pl that # returns an alternate set of config.info values. # 15 - Parameter is the suffix for a pair of functions with show_ # and parse_ prepended. # 16 - Password free text # generate_config(&config, info-file, [module], [&can-config], [checkbox-name], # [only-section]) # Prints HTML for sub generate_config { my ($configref, $file, $module, $canconfig, $cbox, $section) = @_; my %config = %$configref; my $auto = $gconfig{"langauto_$remote_user"}; my $neutral = $gconfig{"langneutral_$remote_user"}; if (!defined($auto)) { my $glangauto = $gconfig{'langauto'}; if (defined($glangauto)) { $auto = $glangauto; } else { my ($clanginfo) = grep { $_->{'lang'} eq $current_lang } &list_languages(); $auto = $clanginfo->{'auto'}; } } # Read the .info file in the right language my (%info, @info_order, %einfo, $o); &read_file($file, \%info, \@info_order); %einfo = %info; foreach $o (@lang_order_list) { &read_file("$file.$o", \%info, \@info_order); &read_file("$file.$o.auto", \%info, \@info_order) if ($auto && -r "$file.$o.auto"); &read_file("$file.$o.neutral", \%info, \@info_order) if ($neutral && -r "$file.$o.neutral"); } # Call any config pre-load function if (&foreign_defined($module, 'config_pre_load')) { &foreign_call($module, "config_pre_load", \%info, \@info_order); &foreign_call($module, "config_pre_load", \%einfo); } @info_order = &unique(@info_order); if ($section) { # Limit to settings in one section @info_order = &config_in_section($section, \@info_order, \%info); } # Show the parameter editors foreach my $c (@info_order) { my $checkhtml; if ($cbox) { # Show checkbox to allow configuring $checkhtml = &ui_checkbox($cbox, $c, "", !$canconfig || $canconfig->{$c}); } else { # Skip those not allowed to be configured next if ($canconfig && !$canconfig->{$c}); } my @p = split(/,/, $info{$c}); my @ep = split(/,/, $einfo{$c}); if (scalar(@ep) > scalar(@p)) { push(@p, @ep[scalar(@p) .. @ep-1]); } if ($p[1] == 14) { $module || &error($text{'config_ewebmin'}); &foreign_require($module, "config_info.pl"); my @newp = &foreign_call($module, $p[2], @p); $newp[0] ||= $p[0]; @p = @newp; } if ($p[1] == 11) { # Title row print &ui_table_row(undef, "<b>$p[0]</b>", 2, [ undef, $tb ]); next; } if ($p[1] == 16 && $gconfig{'config_16_insecure'}) { # Don't allow mode 16 $p[1] = 12; } my $label; if ($module && -r &help_file($module, "config_$c")) { $label = $checkhtml." ". &hlink($p[0], "config_$c", $module); } else { $label = $checkhtml." ".$p[0]; } my $field; if ($p[1] == 0) { # Text value $field = &ui_textbox($c, $config{$c}, $p[2] || 40, 0, $p[3]). " ".$p[4]; } elsif ($p[1] == 1) { # One of many my $len = 0; for(my $i=2; $i<@p; $i++) { $p[$i] =~ /^(\S*)\-(.*)$/; $len += length($2); } my @opts; for($i=2; $i<@p; $i++) { $p[$i] =~ /^(\S*)\-(.*)$/; push(@opts, [ $1, $2.($len > 50 ? "<br>" : "") ]); } $field = &ui_radio($c, $config{$c}, \@opts); } elsif ($p[1] == 2) { # Many of many my %sel; map { $sel{$_}++ } split(/,/, $config{$c}); for($i=2; $i<@p; $i++) { $p[$i] =~ /^(\S*)\-(.*)$/; $field .= &ui_checkbox($c, $1, $2, $sel{$1}); } } elsif ($p[1] == 3) { # Optional value my $none = $p[2] || $text{'config_none'}; $field = &ui_opt_textbox($c, $config{$c}, $p[3] || 20, $none, $p[6], 0, undef, $p[4])." ".$p[5]; } elsif ($p[1] == 4) { # One of many menu my @opts; for($i=2; $i<@p; $i++) { $p[$i] =~ /^(\S*)\-(.*)$/; push(@opts, [ $1, $2 ]); } $field = &ui_select($c, $config{$c}, \@opts); } elsif ($p[1] == 5) { # User chooser if ($p[2]) { $field = &ui_radio($c."_def", $config{$c} ? 0 : 1, [ [ 1, $p[2] ], [ 0, " " ] ]); } if ($p[3]) { $field .= &ui_textbox($c, $config{$c}, 30)." ". &user_chooser_button($c, 1); } else { $field .= &unix_user_input($c, $config{$c}); } } elsif ($p[1] == 6) { # Group chooser if ($p[2]) { $field = &ui_radio($c."_def", $config{$c} ? 0 : 1, [ [ 1, $p[2] ], [ 0, " " ] ]); } if ($p[3]) { $field .= &ui_textbox($c, $config{$c}, 30)." ". &group_chooser_button($c, 1); } else { $field .= &unix_group_input($c, $config{$c}); } } elsif ($p[1] == 7) { # Directory chooser $field = &ui_textbox($c, $config{$c}, 40)." ". &file_chooser_button($c, 1); } elsif ($p[1] == 8) { # File chooser $field = &ui_textbox($c, $config{$c}, 40)." ". &file_chooser_button($c, 0); } elsif ($p[1] == 9) { # Text area my $cols = $p[2] || 40; my $rows = $p[3] || 5; my $sp = $p[4] ? eval "\"$p[4]\"" : " "; $field = &ui_textarea($c, join("\n", split(/$sp/, $config{$c})), $rows, $cols); } elsif ($p[1] == 10) { # Radios with freetext option my $len = 20; for(my $i=2; $i<@p; $i++) { if ($p[$i] =~ /^(\S*)\-(.*)$/) { $len += length($2); } else { $len += length($p[$i]); } } my $fv = $config{$c}; my @opts; for(my $i=2; $i<@p; $i++) { ($p[$i] =~ /^(\S*)\-(.*)$/) || next; push(@opts, [ $1, $2.($len > 50 ? "<br>" : "") ]); $fv = undef if ($config{$c} eq $1); } push(@opts, [ "free", $p[$#p] !~ /^(\S*)\-(.*)$/ ? $p[$#p] : " " ]); $field = &ui_radio($c, $fv ? "free" : $config{$c}, \@opts)." ". &ui_textbox($c."_free", $fv, 20); } elsif ($p[1] == 12) { # Password field $field = &ui_radio($c."_nochange", 1, [ [ 1, $text{'config_nochange'} ], [ 0, $text{'config_setto'} ] ])." ". &ui_password($c, undef, $p[2] || 40, 0, $p[3]); } elsif ($p[1] == 13) { # Multiple selections from menu my @sel = split(/,/, $config{$c}); my @opts; for($i=2; $i<@p; $i++) { $p[$i] =~ /^(\S*)\-(.*)$/; push(@opts, [ $1, $2 ]); } $field = &ui_select($c, \@sel, \@opts, 5, 1); } elsif ($p[1] == 15) { # Input generated by function $module || &error($text{'config_ewebmin'}); &foreign_require($module, "config_info.pl"); $field = &foreign_call($module, "show_".$p[2], $config{$c}, @p); } elsif ($p[1] == 16) { # Password free text $field = &ui_password($c, undef, $p[2] || 40, 0, $p[3]); } $label = "<a name=$c>$label</a>"; print &ui_table_row($label, $field, 1, [ "width=30% nowrap" ]); } } # parse_config(&config, info-file, [module], [&canconfig], [section]) # Updates the specified configuration with values from %in sub parse_config { my ($config, $file, $module, $canconfig, $section) = @_; # Read the .info file my (%info, @info_order, $o); &read_file($file, \%info, \@info_order); foreach $o (@lang_order_list) { &read_file("$file.$o", \%info, \@info_order); } @info_order = &unique(@info_order); if ($section) { # Limit to settings in one section @info_order = &config_in_section($section, \@info_order, \%info); } # If config fields are conditional (not displayed) # make sure to preserve system default values to # prevent changing behaviour of a module if (&foreign_exists($module) && &foreign_require($module) && &foreign_defined($module, 'config_pre_load')) { &foreign_call($module, "config_pre_load", \%info, \@info_order); } # Actually parse the inputs foreach my $c (@info_order) { next if ($canconfig && !$canconfig->{$c}); my @p = split(/,/, $info{$c}); if ($p[1] == 14) { $_[2] || &error($text{'config_ewebmin'}); &foreign_require($_[2], "config_info.pl"); my @newp = &foreign_call($_[2], $p[2]); $newp[0] ||= $p[0]; @p = @newp; } if ($p[1] == 16 && $gconfig{'config_16_insecure'}) { # Don't allow mode 16 $p[1] = 12; } if ($p[1] == 0 || $p[1] == 7 || $p[1] == 8 || $p[1] == 16) { # Free text input $config->{$c} = $in{$c}; } elsif ($p[1] == 1 || $p[1] == 4) { # One of many $config->{$c} = $in{$c}; } elsif ($p[1] == 5 || $p[1] == 6) { # User or group $config->{$c} = ($p[2] && $in{$c."_def"} ? "" : $in{$c}); } elsif ($p[1] == 2 || $p[1] == 13) { # Many of many $in{$c} =~ s/\0/,/g; $config->{$c} = $in{$c}; } elsif ($p[1] == 3) { # Optional free text if ($in{$c."_def"}) { $config->{$c} = ""; } else { $config->{$c} = $in{$c}; } } elsif ($p[1] == 9) { # Multilines of free text my $sp = $p[4] ? eval "\"$p[4]\"" : " "; $in{$c} =~ s/\r//g; $in{$c} =~ s/\n/$sp/g; $in{$c} =~ s/\s+$//; $config->{$c} = $in{$c}; } elsif ($p[1] == 10) { # One of many or free text if ($in{$c} eq 'free') { $config->{$c} = $in{$c.'_free'}; } else { $config->{$c} = $in{$c}; } } elsif ($p[1] == 12) { # Optionally changed password if (!$in{"${c}_nochange"}) { $config->{$c} = $in{$c}; } } elsif ($p[1] == 15) { # Parse custom HTML field $_[2] || &error($text{'config_ewebmin'}); &foreign_require($_[2], "config_info.pl"); $config->{$c} = &foreign_call($_[2], "parse_".$p[2], $config->{$c}, @p); } } } # config_in_section(§ion, &order, &config-info) # Returns a list of config names that are in some section sub config_in_section { my ($section, $info_order, $info) = @_; my @new_order = ( ); my $in_section = 0; foreach my $c (@$info_order) { my @p = split(/,/, $info->{$c}); if ($p[1] == 11 && $c eq $section) { $in_section = 1; } elsif ($p[1] == 11 && $c ne $section) { $in_section = 0; } elsif ($in_section) { push(@new_order, $c); } } return @new_order; } # save_module_preferences(module, &config) # Check which user preferences can be save for # given module based on module's prefs.info file sub save_module_preferences { my ($module, $curr_config) = @_; my $module_dir = &module_root_directory($module); my $module_prefs_conf = "$module_dir/prefs.info"; if (-r $module_prefs_conf) { my %module_prefs_conf_allowed; &read_file($module_prefs_conf, \%module_prefs_conf_allowed); mkdir("$config_directory/$module", 0700); my $user_prefs_file = "$config_directory/$module/prefs.$remote_user"; &lock_file($user_prefs_file); if ($module_prefs_conf_allowed{'allowed'} eq "*") { &write_file($user_prefs_file, \%$curr_config); } else { my %newconfigtmp; foreach my $key (keys %{$curr_config}) { if (grep(/^$key$/, split(",", $module_prefs_conf_allowed{'allowed'}))) { $newconfigtmp->{$key} = $curr_config->{$key}; } } &write_file($user_prefs_file, \%$newconfigtmp); } &unlock_file($user_prefs_file); } } # hidden_config_cparams(&in) # Return HTML for hidden inputs for params to pass back to whatever linked # to config.cgi sub hidden_config_cparams { my ($in) = @_; my $rv = ""; foreach my $k (keys %$in) { next if ($k !~ /^(_cparam_|_cscript)/); foreach my $v (split(/\0/, $in{$k})) { $rv .= &ui_hidden($k, $v)."\n"; } } return $rv; } # link_config_cparams(module, &in, [add-cparam]) # Returns a URL to link to after the config is saved sub link_config_cparams { my ($m, $in, $keep) = @_; my $url = "/$m/"; my @w; if ($in->{'_cscript'}) { if ($keep) { push(@w, "_cscript=".&urlize($in->{'_cscript'})); } else { $url .= $in->{'_cscript'}; } } foreach my $k (keys %$in) { if ($k =~ /^_cparam_(.*)$/) { $n = $1; foreach my $v (split(/\0/, $in{$k})) { push(@w, &urlize($keep ? $k : $n)."=".&urlize($v)); } } } if (@w) { $url .= "?".join("&", @w); } return $url; } 1;