Compare commits

..

116 Commits
2.003 ... 2.011

Author SHA1 Message Date
Jamie Cameron
43bf4bbc15 Set the correct algorithm when setting up rndc https://github.com/webmin/webmin/issues/1817 2023-01-11 19:08:06 -08:00
Jamie Cameron
6451f4b115 Store and show default TTL set by $ttl https://github.com/webmin/webmin/issues/1816 2023-01-10 22:23:36 -08:00
iliajie
f6b8cc6302 Update CHANGELOG.md (2.011) 2023-01-10 18:11:43 +02:00
Jamie Cameron
f2209fb633 Also respect epoch when checking version 2023-01-09 23:46:20 -08:00
Jamie Cameron
1879848d11 Remove spacer 2023-01-09 23:29:44 -08:00
Jamie Cameron
aaf7b9f24b Changelog for new version 2023-01-09 21:46:50 -08:00
Jamie Cameron
451a7e2e6a New version bump 2023-01-09 21:41:20 -08:00
iliajie
509141f5d5 Fix mailbox_idle_check_interval bugs
https://sourceforge.net/p/webadmin/bugs/5602/
2023-01-09 18:27:57 +02:00
iliajie
52c06534db Fix to drop remove mailbox_check_interval option 2023-01-09 18:23:06 +02:00
iliajie
29ef2d5f33 Fix to keep original copyright year 2023-01-09 00:36:20 +02:00
Jamie Cameron
1febfdbe0f Add option to insert a new map entry before an existing one 2023-01-08 12:45:25 -08:00
Jamie Cameron
277f67dac9 Fix line length 2023-01-07 22:07:27 -08:00
Jamie Cameron
d199de8469 Add a param to create a new block before an existing one 2023-01-07 22:07:01 -08:00
iliajie
1f7753db43 Update copyright year in webmin sub-commands 2023-01-08 04:20:37 +02:00
iliajie
c02b2cdbea Update copyright year in webmin command 2023-01-08 04:16:38 +02:00
iliajie
8fabb28e7a Fix to start with one for each type as adding now works 2023-01-08 01:48:15 +02:00
iliajie
4117119c44 Fix to support multiple attr 2023-01-08 01:41:45 +02:00
iliajie
2584bc05cf Merge remote-tracking branch 'origin/master' 2023-01-08 00:48:07 +02:00
iliajie
72ecf54a17 Fix JavaScript id ref bug 2023-01-08 00:47:53 +02:00
Jamie Cameron
a0f2527ed0 Merge branch 'master' of github.com:webmin/webmin 2023-01-07 12:57:33 -08:00
Jamie Cameron
343307f703 localhost isn't a valid hostname 2023-01-07 12:57:09 -08:00
iliajie
d4f541015d Fix to drop useless code 2023-01-07 21:48:55 +02:00
iliajie
e92763e3d7 Fix to refer to direct child 2023-01-07 21:24:46 +02:00
iliajie
b0eb96d003 Fix to prevent forcing using tables in tabs (fix widths) 2023-01-07 20:58:44 +02:00
iliajie
5c26bf4de3 Fix to prevent forcing using tables in tabs 2023-01-07 19:59:10 +02:00
iliajie
374e5bf07c Fix to print strong instad of b which is used for header generation 2023-01-05 23:07:16 +02:00
Jamie Cameron
ca814a4e6f If we get an ERROR output when executing an SQL file, consider it failed even if the exit status is zero 2023-01-03 18:25:50 -08:00
Jamie Cameron
9b2fc2c9f4 When moving a maildir, also move any Maildir++ sub-folders 2023-01-02 18:26:14 -08:00
Jamie Cameron
ca6acb4a8c Don't error out if deleting an LDAP object that's already been deleted 2022-12-29 21:23:46 -08:00
Jamie Cameron
4dd017dce4 Merge branch 'master' of github.com:webmin/webmin 2022-12-28 21:57:38 -08:00
Jamie Cameron
562eb544e5 Don't fail user or group deletion if they have already been deleted https://github.com/virtualmin/virtualmin-gpl/issues/493 2022-12-28 21:37:45 -08:00
iliajie
65668c084f Merge remote-tracking branch 'origin/master' 2022-12-28 21:06:51 +02:00
iliajie
111aa65b8f Fix to update to the latest Xterm.js 5.1.0 2022-12-28 21:06:20 +02:00
Jamie Cameron
52926dcb65 Merge branch 'master' of github.com:webmin/webmin 2022-12-26 18:26:09 -08:00
Jamie Cameron
9fa99120ef Add support for resolve_dequoted_address 2022-12-26 18:26:01 -08:00
Jamie Cameron
ab94e020e0 Merge pull request #1812 from webmin/dev/fix-anonimous-user-test
Fix to test if anonymous user actually exists
2022-12-26 17:50:45 -08:00
iliajie
29354389f4 Fix to test if anonymous user actually exists 2022-12-26 12:51:10 +02:00
iliajie
c3bd222492 Fix wording 2022-12-26 12:22:20 +02:00
Jamie Cameron
459a5ee6b8 Fix bug in granting anonymous access if the anonymous user doesn't exist yet 2022-12-23 15:49:53 -08:00
iliajie
623fcc23d9 Fix to load images always from source host 2022-12-21 14:36:51 +02:00
iliajie
9d37f0d9e6 Fix to also check if session keys are set 2022-12-20 20:28:53 +02:00
Jamie Cameron
5fde216573 Merge branch 'master' of github.com:webmin/webmin 2022-12-18 21:54:20 -08:00
Jamie Cameron
4bd9c59038 Freeze and thaw dynamic reverse zones when updating a forward record https://github.com/webmin/webmin/issues/1810 2022-12-18 21:50:26 -08:00
iliajie
8c299b60ff Fix theme support in a single mode 2022-12-18 19:17:46 +02:00
iliajie
ad7967f3b5 Fix uninitialized warning 2022-12-18 19:07:21 +02:00
Jamie Cameron
e080fb3470 Zone type might be in upper case https://sourceforge.net/p/webadmin/bugs/5600/ 2022-12-17 23:17:55 -08:00
iliajie
62fccc4e0d Fix to nowrap virtual server select and submit button 2022-12-16 20:10:11 +02:00
iliajie
b0fc89f487 Fix release note links for Rocky 2022-12-16 20:08:27 +02:00
iliajie
a965b41cce Fix HTML arrow in accordions in Safari 2022-12-16 17:59:17 +02:00
iliajie
0bbb255a88 Fix adding in alerts (more) 2022-12-16 17:57:48 +02:00
iliajie
57b9e4ca3f Fix to smaller arrow size 2022-12-16 17:37:09 +02:00
iliajie
dbb691a7c4 Fix to always print table row even if empty #1809 2022-12-16 17:29:02 +02:00
iliajie
cf61a472f5 Fix padding in alerts 2022-12-16 17:17:22 +02:00
Jamie Cameron
2a31af4870 When moving a Maildir folder, only move the cur/new/tmp dirs because there might be other sub-folders or files 2022-12-14 14:00:13 -08:00
Jamie Cameron
54044b78ef RC4 isn't strong enough anymore https://sourceforge.net/p/webadmin/bugs/5599/ 2022-12-14 11:38:01 -08:00
Jamie Cameron
726d28d807 Verify long-running websockets sessions in miniserv 2022-12-14 11:18:28 -08:00
iliajie
8db65344d5 Fix to rename framed theme ; fix version and deps 2022-12-11 20:07:21 +02:00
iliajie
cb6ad018cf Fix support for Usermin 2022-12-11 19:55:11 +02:00
iliajie
00bf2dd153 Fix arrow color in accordions 2022-12-11 19:03:18 +02:00
iliajie
b54bd7f21e Fix switches color 2022-12-11 18:57:47 +02:00
iliajie
6829c94257 Add favicons to Framed Theme 2022-12-11 18:56:18 +02:00
iliajie
095288d661 Fix to add more space for switches in two mode 2022-12-11 16:48:48 +02:00
iliajie
3ea461d70c Fix Cloudmin mode 2022-12-11 16:46:51 +02:00
iliajie
5058e9c752 Add a new SVG icons to the navigation menu 2022-12-10 21:37:15 +02:00
iliajie
590ce839ae Add logos to the dashboard depending on the product 2022-12-10 21:36:40 +02:00
iliajie
e18e20605a Fix to use HTML collapse in hidden_start and hidden_end 2022-12-10 18:45:47 +02:00
iliajie
e38b923430 Fix to add borders to alerts in Gray theme 2022-12-10 16:57:03 +02:00
iliajie
06d429af32 Fix to switch to using HTML only menu accordion https://github.com/webmin/webmin/issues/1802#issuecomment-1343254856
.. to support browsers with disabled JavaScript
2022-12-10 15:58:55 +02:00
iliajie
f300bd7f5b Add support for more options in unit section in systemd 2022-12-10 15:14:00 +02:00
Jamie Cameron
50df0e4d02 Fix merge 2022-12-08 21:58:43 -08:00
Jamie Cameron
c6a4a80e58 Set USER variable properly for jk_chrootsh 2022-12-08 21:57:39 -08:00
Jamie Cameron
bb75d7fa7b ui-lib conversion 2022-12-05 23:24:44 -08:00
Jamie Cameron
ce43b53e5c ui-lib conversion 2022-12-05 23:20:23 -08:00
Jamie Cameron
aaee5bedac Merge pull request #1805 from webmin/dev/set-xterm-improvements2
Add support to set TERM variable and shell character encoding
2022-12-05 09:58:19 -08:00
iliajie
edcf8841ab Fix to set config option directly 2022-12-05 19:50:54 +02:00
Jamie Cameron
5275505ba0 Merge pull request #1807 from webmin/dev/add-new-libroot-env-var
Fix to set a new `LIBROOT` environmental variable
2022-12-05 09:36:58 -08:00
iliajie
a9349c7fe5 Add new LIBROOT env var 2022-12-05 19:03:10 +02:00
Ilia
9f0d9a967b Merge pull request #1806 from Divarion-D/patch-1
Update ru
2022-12-05 17:06:38 +02:00
iliajie
5f6f65a78f Fix to use PERLLIB as DOCUMENT_ROOT never set at a time 2022-12-05 17:03:51 +02:00
Danil
bb15603724 Merge pull request #2 from Divarion-D/patch-2
Update ru.auto
2022-12-05 15:21:48 +03:00
Danil
84c92c4da2 Update ru.auto 2022-12-05 15:16:37 +03:00
Danil
e51e3a8d42 Update ru 2022-12-05 11:41:25 +03:00
iliajie
d336f5a15b Fix to add colors to ip command in module default mode 2022-12-05 02:59:42 +02:00
iliajie
6c297057d3 Add support to set shell character encoding 2022-12-05 02:16:18 +02:00
iliajie
1531b18566 Add support to set TERM variable 2022-12-05 01:40:18 +02:00
Jamie Cameron
be9b67de40 Fix editing and creation of IPv6 addresses 2022-12-03 22:07:02 -08:00
Jamie Cameron
a80df4be5c Merge branch 'master' of github.com:webmin/webmin 2022-12-03 21:47:07 -08:00
Jamie Cameron
b05a55e8c2 Complete support for editing interfaces in include files 2022-12-03 21:46:25 -08:00
iliajie
f1a434b65a Fix to always set vendor_perl if perllib config option is set
https://sourceforge.net/p/webadmin/bugs/5595/
2022-12-02 00:22:43 +02:00
iliajie
543b87c9e7 Fix signature verified message padding 2022-12-01 21:53:15 +02:00
iliajie
fa16dc06d1 Fix language strings on Webmin update 2022-12-01 21:22:04 +02:00
iliajie
1aa0d9b812 Fix a bug when there is no output on RPM upgrades 2022-12-01 20:23:38 +02:00
iliajie
6269c24f03 Fix to check deeper for potentially missing dependencies 2022-12-01 19:31:55 +02:00
iliajie
cf4ebf0bfe Fix WebSocket protocol to be conditional 2022-12-01 15:04:59 +02:00
iliajie
2f21d0b067 Fix to call setup_ssl_contexts conditionally 2022-12-01 14:42:20 +02:00
iliajie
bf19dc1119 Fix to actually print loaded file timestamp 2022-12-01 14:17:51 +02:00
Jamie Cameron
40091463ee Use correct extension for package file https://github.com/webmin/authentic-theme/issues/1633 2022-11-27 20:24:21 -08:00
Jamie Cameron
4eaddb6359 Major version bump 2022-11-27 20:09:30 -08:00
Jamie Cameron
3a33573c30 Fix all days text 2022-11-27 20:08:52 -08:00
Jamie Cameron
5410dd7bb9 Merge branch 'master' of github.com:webmin/webmin 2022-11-27 12:23:29 -08:00
Jamie Cameron
e58d54ed86 Use absolute path 2022-11-27 12:23:23 -08:00
iliajie
d900e90203 Update translations 2022-11-27 21:03:46 +02:00
Jamie Cameron
f27ad16496 Merge branch 'master' of github.com:webmin/webmin 2022-11-27 09:25:41 -08:00
Jamie Cameron
6673b314b2 Return line number and filename 2022-11-27 09:25:35 -08:00
Jamie Cameron
2e0b7ef82b Merge pull request #1799 from webmin/dev/test-if-Net-SSLeay-get_servername
Fix to check if `Net::SSLeay::get_servername` exists (on CentOS 6)
2022-11-27 09:25:03 -08:00
iliajie
e72415952c Fix to check if Net::SSLeay::get_servername exists (on CentOS 6)
https://github.com/webmin/webmin/issues/1798#issuecomment-1328295876
2022-11-27 19:19:15 +02:00
Jamie Cameron
4d67184f2c Put websockets lib into the xterm directory 2022-11-27 09:18:31 -08:00
Jamie Cameron
f4f6eeac6d Merge branch 'master' of github.com:webmin/webmin 2022-11-27 09:15:10 -08:00
Jamie Cameron
3e3dae7854 Fix permissions 2022-11-27 09:15:06 -08:00
iliajie
f4b54f13ee Add text to suggest to install EPEL first for RHEL systems
.. or install package manually from `devel:languages:perl` on openSUSE
2022-11-27 16:57:52 +02:00
iliajie
276c599e55 Fix changelog include major 2.010 2022-11-27 14:50:33 +02:00
iliajie
97725db48d Add mention for the new setup-repos.sh script 2022-11-27 14:48:54 +02:00
iliajie
7fcfafd0fa Add possibly missing Digest::MD5 dependency 2022-11-27 14:46:34 +02:00
iliajie
31385f526c Merge remote-tracking branch 'origin/master' 2022-11-27 13:15:55 +02:00
iliajie
35a5e3f5b9 Fix missing websockets-lib-funcs.pl file in dist
https://sourceforge.net/p/webadmin/bugs/5592/
https://github.com/webmin/webmin/issues/1797
2022-11-27 13:15:33 +02:00
Jamie Cameron
ad8311d22e Fix version 2022-11-26 13:58:21 -08:00
229 changed files with 1170 additions and 640 deletions

View File

@@ -1,7 +1,25 @@
## Changelog
#### 2.010 (November 26, 2022)
#### 2.011 (January 10, 2023)
* Add ability to set shell character encoding and set `TERM` environmental variable in the new Terminal module
* Add support for editing network interfaces in include files for Debian systems
* Add various improvements to the old good Framed Theme
* Fix to change Gray Framed Theme name to Framed Theme
* Fix to verify and close WebSocket session, if parent session was closed
* Fix to remove `RC4` from the list of strong ciphers
* Fix don't fail LDAP user or group deletion, if they have already been deleted
* Fix error handling in MySQL/MariaDB Database server module when executing SQL commands
* Fix adding an extra server attachment field and other bugs in Read User Mail module
* Fix the link to release notes for Rocky Linux
* Fix issues with freezing and thawing dynamic reverse zones in BIND DNS Server module
* Fix bugs for modules granting anonymous access
* Fix `mailbox_idle_check_interval` option related bugs in Dovecot module [sourceforge.net#5602](https://sourceforge.net/p/webadmin/bugs/5602/)
* Fix to use correct extension for package file when upgrading Webmin [webmin/authentic-theme#1633](https://github.com/webmin/authentic-theme/issues/1633)
* Update the Authentic theme to the latest version
#### 2.010 (November 27, 2022)
* Add a new Terminal module (interactive shell)
* Add a new `setup-repos.sh` script to setup Webmin repos
* Add to replace old Gray Theme with Virtualmin Framed Theme
* Add _systemd_ improvements
* Add proper support for openSUSE Leap and Tumbleweed

View File

@@ -31,7 +31,7 @@ Webmin can be installed in two different ways:
1. By downloading a pre-built package, available for different distributions (CentOS, Fedora, SuSE, Mandriva, Debian, Ubuntu, Solaris and [other](https://www.webmin.com/support.html)) under [latest release assets](https://github.com/webmin/webmin/releases/latest) or from our [download page](https://webmin.com/download.html);
<kbd>Note: It is highly recommended to [add repository](https://doxfer.webmin.com/Webmin/Installation) to your system for having automatic updates.</kbd>
2. By downloading, extracting [source file](https://prdownloads.sourceforge.net/webadmin/webmin-2.003.tar.gz), and running [_setup.sh_](https://www.webmin.com/tgz.html) script, with no arguments, which will setup to run it directly from this directory, or with a command-line argument, such as targeted directory.
2. By downloading, extracting [source file](https://prdownloads.sourceforge.net/webadmin/webmin-2.011.tar.gz), and running [_setup.sh_](https://www.webmin.com/tgz.html) script, with no arguments, which will setup to run it directly from this directory, or with a command-line argument, such as targeted directory.
<kbd>Note: If you are installing Webmin [on Windows](https://www.webmin.com/windows.html) system, you must run the command `perl setup.pl` instead. The Windows version depends on several programs, and modules that may not be part of the standard distribution. You will need _process.exe_ command, _sc.exe_ command, and _Win32::Daemon_ Perl module.</kbd>
## Documentation

File diff suppressed because one or more lines are too long

View File

@@ -1959,16 +1959,8 @@ my $miniserv = { };
my @anon = split(/\s+/, $miniserv->{'anonymous'} || "");
my ($user, $found) = &get_anonymous_access($path, $miniserv);
return 1 if ($found >= 0); # Already setup
# Grant access to the user and path
&lock_file(&get_miniserv_config_file());
$user ||= '';
push(@anon, "$path=$user");
$miniserv->{'anonymous'} = join(" ", @anon);
&put_miniserv_config($miniserv);
&unlock_file(&get_miniserv_config_file());
if (!$user) {
my $auser = grep { $_->{'name'} eq $user } &list_users();
if (!$auser) {
# Create a user if need be
$user = "anonymous";
my $uinfo = { 'name' => $user,
@@ -1980,16 +1972,23 @@ if (!$user) {
else {
# Make sure the user has the module
my ($uinfo) = grep { $_->{'name'} eq $user } &list_users();
$uinfo->{'modules'} ||= [];
if ($uinfo && &indexof($mod, @{$uinfo->{'modules'}}) < 0) {
$uinfo->{'modules'} ||= [];
push(@{$uinfo->{'modules'}}, $mod);
&modify_user($uinfo->{'name'}, $uinfo);
}
else {
print STDERR "Anonymous access is granted to user $user, but he doesn't exist!\n";
print STDERR "Anonymous access attempted to be granted to user $user, but it doesn't exist!\n";
}
}
# Grant access to the user and path
&lock_file(&get_miniserv_config_file());
push(@anon, "$path=$user");
$miniserv->{'anonymous'} = join(" ", @anon);
&put_miniserv_config($miniserv);
&unlock_file(&get_miniserv_config_file());
&reload_miniserv();
}

View File

@@ -149,6 +149,6 @@ C</etc/webmin>
=head1 LICENSE AND COPYRIGHT
Copyright 2022 Jamie Cameron <jcameron@webmin.com>
Copyright 2018 Jamie Cameron <jcameron@webmin.com>
Joe Cooper <joe@virtualmin.com>

View File

@@ -114,6 +114,6 @@ Name of the user to disable two-factor authentication for.
=head1 LICENSE AND COPYRIGHT
Copyright 2022 Jamie Cameron <jcameron@webmin.com>
Copyright 2018 Jamie Cameron <jcameron@webmin.com>
Joe Cooper <joe@virtualmin.com>
Ilia Rostovtsev <ilia@virtualmin.com>

View File

@@ -164,5 +164,5 @@ domain.tld)
=head1 LICENSE AND COPYRIGHT
Copyright 2022 Jamie Cameron <jcameron@webmin.com>
Copyright 2018 Jamie Cameron <jcameron@webmin.com>
Joe Cooper <joe@virtualmin.com>

View File

@@ -199,5 +199,5 @@ Display the description of the option from the module C<config.info> file, inste
=head1 LICENSE AND COPYRIGHT
Copyright 2022 Jamie Cameron <jcameron@webmin.com>
Copyright 2018 Jamie Cameron <jcameron@webmin.com>
Joe Cooper <joe@virtualmin.com>

View File

@@ -258,7 +258,7 @@ Set new user password. Using this option may be unsecure.
=head1 LICENSE AND COPYRIGHT
Copyright 2022 Jamie Cameron <jcameron@webmin.com>
Copyright 2018 Jamie Cameron <jcameron@webmin.com>
Joe Cooper <joe@virtualmin.com>
Ilia Rostovtsev <ilia@virtualmin.com>

View File

@@ -172,7 +172,7 @@ sub root
=head1 LICENSE AND COPYRIGHT
Copyright 2022 Jamie Cameron <jcameron@webmin.com>
Copyright 2018 Jamie Cameron <jcameron@webmin.com>
Joe Cooper <joe@virtualmin.com>
Ilia Rostovtsev <ilia@virtualmin.com>

View File

@@ -181,5 +181,5 @@ already exist in the file, and was added)
=head1 LICENSE AND COPYRIGHT
Copyright 2022 Jamie Cameron <jcameron@webmin.com>
Copyright 2018 Jamie Cameron <jcameron@webmin.com>
Joe Cooper <joe@virtualmin.com>

View File

@@ -431,7 +431,7 @@ Returns Webmin and other modules and themes versions installed (only those for w
=head1 LICENSE AND COPYRIGHT
Copyright 2022 Jamie Cameron <jcameron@webmin.com>
Copyright 2018 Jamie Cameron <jcameron@webmin.com>
Joe Cooper <joe@virtualmin.com>
Ilia Rostovtsev <ilia@virtualmin.com>

View File

@@ -982,7 +982,7 @@ sub can_edit_reverse
return $access{'reverse'} || &can_edit_zone($_[0]);
}
# record_input(zone-name, view, type, file, origin, [num], [record],
# record_input(zone-name, view, type, file, origin, [num], [&record],
# [new-name, new-value])
# Display a form for editing or creating a DNS record
sub record_input
@@ -1059,8 +1059,12 @@ else {
$ttl = $rec{'ttl'} || '';
$ttlunit = "";
}
my $defmsg = $text{'default'};
if ($rec{'realttl'}) {
$defmsg .= " ($rec{'realttl'})";
}
print &ui_table_row($text{'edit_ttl'},
&ui_opt_textbox("ttl", $ttl, 8, $text{'default'})." ".
&ui_opt_textbox("ttl", $ttl, 8, $defmsg)." ".
&time_unit_choice("ttlunit", $ttlunit));
# Value(s) fields
@@ -2458,6 +2462,7 @@ if ($changed || !$znc{'version'} ||
foreach my $z (@vz) {
my $type = &find_value("type", $z->{'members'});
next if (!$type);
$type = lc($type);
my $file = &find_value("file", $z->{'members'});
my $up = &find("update-policy", $z->{'members'});
my $au = &find("allow-update", $z->{'members'});
@@ -2472,6 +2477,7 @@ if ($changed || !$znc{'version'} ||
foreach my $z (&find("zone", $conf)) {
my $type = &find_value("type", $z->{'members'});
next if (!$type);
$type = lc($type);
my $file = &find_value("file", $z->{'members'});
$file ||= ""; # slaves and other types with no file
my $up = &find("update-policy", $z->{'members'});

View File

@@ -183,14 +183,15 @@ for(my $i=0; $i<@_; $i++) {
if ($in{'type'} eq 'ALL') {
push(@cols, $r->{'type'});
}
if ($r->{'ttl'} && $r->{'ttl'} =~ /(\d+)([SMHDW]?)/i) {
$r->{'ttl'} =~ s/S//i;
if ($r->{'ttl'} =~ s/M//i) { $r->{'ttl'} *= 60; }
if ($r->{'ttl'} =~ s/H//i) { $r->{'ttl'} *= 3600; }
if ($r->{'ttl'} =~ s/D//i) { $r->{'ttl'} *= 86400; }
if ($r->{'ttl'} =~ s/W//i) { $r->{'ttl'} *= 604800; }
my $ttl = $r->{'realttl'};
if ($ttl && $ttl =~ /(\d+)([SMHDW]?)/i) {
$ttl =~ s/S//i;
if ($ttl =~ s/M//i) { $ttl *= 60; }
if ($ttl =~ s/H//i) { $ttl *= 3600; }
if ($ttl =~ s/D//i) { $ttl *= 86400; }
if ($ttl =~ s/W//i) { $ttl *= 604800; }
}
push(@cols, $r->{'ttl'} ? &html_escape($r->{'ttl'}) : $text{'default'});
push(@cols, $ttl ? &html_escape($ttl) : $text{'default'});
for(my $j=0; $j<@hmap; $j++) {
my $v;
if ($in{'type'} eq "RP" && $j == 0) {

View File

@@ -120,7 +120,9 @@ while($line = <$FILE>) {
close($FILE);
# parse into data structures
my $i = 0; my $num = 0;
my $i = 0;
my $num = 0;
my $currttl = undef;
while($i < @tok) {
if ($tok[$i] =~ /^\$origin$/i) {
# $ORIGIN directive (may be relative or absolute)
@@ -179,6 +181,7 @@ while($i < @tok) {
'defttl' => $tok[$i++],
'type' => '' };
push(@rv, $defttl);
$currttl = $defttl->{'defttl'};
}
elsif ($tok[$i] =~ /^\$(\S+)/i) {
# some other special directive
@@ -279,6 +282,7 @@ while($i < @tok) {
}
$dir{'values'} = \@values;
$dir{'eline'} = $lnum[$i-1];
$dir{'realttl'} = $dir{'ttl'} || $currttl;
# Work out canonical form, and maybe use it
my $canon = $dir{'name'};

View File

@@ -76,12 +76,14 @@ if ($in{'delete'}) {
($in{'type'} eq "A" ||
$in{'type'} eq "AAAA" &&
&expandall_ip6($in{'oldvalue0'}) eq &expandall_ip6(&ip6int_to_net($orevrec->{'name'})))) {
&before_editing($orevconf);
&lock_file(&make_chroot($orevrec->{'file'}));
&delete_record($orevrec->{'file'} , $orevrec);
&lock_file(&make_chroot($orevfile));
my @orrecs = &read_zone_file($orevfile, $orevconf->{'name'});
&bump_soa_record($orevfile, \@orrecs);
&sign_dnssec_zone_if_key($orevconf, \@orrecs);
&after_editing($orevconf);
}
# Update forward
@@ -92,12 +94,14 @@ if ($in{'delete'}) {
(!$ipv6 && &arpa_to_ip($in{'oldname'}) eq $ofwdrec->{'values'}->[0] ||
$ipv6 && &expandall_ip6(&ip6int_to_net($in{'oldname'})) eq &expandall_ip6($ofwdrec->{'values'}->[0])) &&
$fulloldvalue0 eq $ofwdrec->{'name'}) {
&before_editing($ofwdconf);
&lock_file(&make_chroot($ofwdrec->{'file'}));
&delete_record($ofwdrec->{'file'}, $ofwdrec);
&lock_file(&make_chroot($ofwdfile));
my @ofrecs = &read_zone_file($ofwdfile, $ofwdconf->{'name'});
&bump_soa_record($ofwdfile, \@ofrecs);
&sign_dnssec_zone_if_key($ofwdconf, \@ofrecs);
&after_editing($ofwdconf);
}
&redirect("edit_recs.cgi?zone=$in{'zone'}&view=$in{'view'}&type=$in{'redirtype'}&sort=$in{'sort'}");
@@ -603,6 +607,8 @@ else {
# Updating the reverse record. Either the name, address
# or both may have changed. Furthermore, the reverse record
# may now be in a different file!
&before_editing($orevconf);
&before_editing($revconf);
&lock_file(&make_chroot($orevfile));
&lock_file(&make_chroot($revfile));
my @orrecs = &read_zone_file($orevfile, $orevconf->{'name'});
@@ -634,17 +640,21 @@ else {
&bump_soa_record($orevfile, \@orrecs);
&sign_dnssec_zone_if_key($orevconf, \@orrecs);
}
&after_editing($revconf);
&after_editing($orevconf);
}
elsif ($in{'rev'} && !$orevrec && $revconf && !$revrec &&
&can_edit_reverse($revconf)) {
# we don't handle the old reverse domain but handle the new
# one.. create a new reverse record
&before_editing($revconf);
&lock_file(&make_chroot($revfile));
my @rrecs = &read_zone_file($revfile, $revconf->{'name'});
&create_record($revfile, $rname,
$ttl, "IN", "PTR", $fullname, $in{'comment'});
&bump_soa_record($revfile, \@rrecs);
&sign_dnssec_zone_if_key($revconf, \@rrecs);
&after_editing($revconf);
}
my $ipv6;
@@ -656,6 +666,8 @@ else {
&expandall_ip6($ofwdrec->{'values'}->[0]) &&
$fulloldvalue0 eq $ofwdrec->{'name'}) {
# Updating the forward record
&before_editing($ofwdfile);
&before_editing($fwdfile);
&lock_file(&make_chroot($ofwdfile));
&lock_file(&make_chroot($fwdfile));
my @ofrecs = &read_zone_file($ofwdfile, $ofwdconf->{'name'});
@@ -690,6 +702,8 @@ else {
&bump_soa_record($ofwdfile, \@ofrecs);
&sign_dnssec_zone_if_key($ofwdconf, \@ofrecs);
}
&after_editing($fwdfile);
&after_editing($ofwdfile);
}
}
&bump_soa_record($in{'file'}, \@recs);

View File

@@ -35,7 +35,8 @@ if ($options) {
$port = &find_value("default-port", $options->{'members'});
}
$port ||= 953;
my $algorithm = &find("algorithm", $rconf);
my $algorithm = &find_value("algorithm", $rkey->{'members'}) ||
&find_value("algorithm", $rconf);
$algorithm ||= "hmac-md5";
# Add the key to named.conf

View File

@@ -76,9 +76,9 @@ elsif ($config{'display_mode'} == 0) {
else {
$link = &ui_link("edit_cmd.cgi?id=$c->{'id'}",$text{'index_edit'});
}
$html .= &ui_table_row(undef,
&ui_links_row([ $link ]), 2);
$link = &ui_links_row([ $link ]);
}
$html .= &ui_table_row(undef, $link, 2);
$html .= &ui_table_end();
$html .= &ui_form_end();
push(@grid, $html);

View File

@@ -334,11 +334,11 @@ foreach my $m (@{$section->{'members'}}) {
}
}
# create_section(&conf, &section, [&parent])
# create_section(&conf, &section, [&parent], [&before])
# Adds a section to the config file
sub create_section
{
local ($conf, $section, $parent) = @_;
local ($conf, $section, $parent, $before) = @_;
local $indent = " " x $section->{'indent'};
local @newlines;
push(@newlines, $indent.$section->{'name'}." ".$section->{'value'}." {");
@@ -355,10 +355,17 @@ if ($parent) {
$section->{'line'} = $parent->{'eline'};
}
else {
# Add to the end of the global config file
# Add to the global config file
$file = &get_config_file();
$lref = &read_file_lines($file);
$section->{'line'} = scalar(@$lref);
if ($before) {
# Add before another block
$section->{'line'} = $before->{'line'};
}
else {
# Add at the end
$section->{'line'} = scalar(@$lref);
}
}
splice(@$lref, $section->{'line'}, 0, @newlines);
&renumber($conf, $section->{'eline'}, $section->{'file'},

View File

@@ -52,22 +52,13 @@ print &ui_table_row($text{'mail_control'},
print &ui_table_hr();
# Check interval
$check = &find_value("mailbox_check_interval", $conf);
print &ui_table_row($text{'mail_check'},
&ui_radio("check", $check eq '' ? 0 : $check == 0 ? 1 : 2,
[ [ 1, $text{'mail_never'} ],
[ 2, &ui_textbox("checki", $check ? $check : "", 10).
" ".$text{'mail_secs'} ],
[ 0, &getdef("mailbox_check_interval",
[ [ 0, $text{'mail_never'} ] ]) ] ]), 3);
# Idle interval
$idle = &find_value("mailbox_idle_check_interval", $conf);
$idle_never = $idle =~ /520\s+weeks/;
print &ui_table_row($text{'mail_idle'},
&ui_radio("idle", $idle eq '' ? 0 : $idle == 0 ? 1 : 2,
&ui_radio("idle", $idle eq '' ? 0 : $idle_never ? 1 : 2,
[ [ 1, $text{'mail_never'} ],
[ 2, &ui_textbox("idlei", $idle ? $idle : "", 10).
[ 2, &ui_textbox("idlei", $idle && !$idle_never ? int($idle) : "", 10).
" ".$text{'mail_secs'} ],
[ 0, &getdef("mailbox_idle_check_interval",
[ [ 0, $text{'mail_never'} ] ]) ] ]), 3);

View File

@@ -15,7 +15,6 @@ index_version=Weergawe $1
stop_err=Kon nie Dovecot stop nie
stop_erunning=Nie meer hardloop nie
start_err=Kon nie Dovecot begin nie
start_eprotos=Geen protokolle is gekies op die <b>Netwerk- en protokolle</b> -bladsy nie
apply_err=Kon nie konfigurasie toepas nie
net_title=Netwerk en protokolle

View File

@@ -15,7 +15,6 @@ index_version=Version $1
stop_err=فشل في إيقاف Dovecot
stop_erunning=لم يعد يعمل
start_err=فشل في بدء تشغيل Dovecot
start_eprotos=No protocols selected on the <b>Networking and Protocols</b> page
apply_err=فشل في تطبيق التكوين
net_title=الشبكات والبروتوكولات

View File

@@ -15,7 +15,6 @@ index_version=Версія $1
stop_err=Не атрымалася спыніць Галубка
stop_erunning=Больш не працуе
start_err=Не атрымалася запусціць Dovecot
start_eprotos=На старонцы <b>Сетка і пратаколы</b> адсутнічаюць пратаколы
apply_err=Не атрымалася прымяніць канфігурацыю
net_title=Сетка і пратаколы

View File

@@ -15,7 +15,6 @@ index_version=Версия $1
stop_err=Грешка при спиране на Dovecot
stop_erunning=Вече не работи
start_err=Грешка при стартиране на Dovecot
start_eprotos=Няма избрани протоколи на страницата за Мрежа и протоколи
apply_err=Грешка при прилагането на конфигурация
net_title=Мрежа и протоколи

View File

@@ -15,7 +15,6 @@ index_version=Versió $1
stop_err=No s'ha pogut aturar Dovecot
stop_erunning=Ja no està en execució
start_err=No s'ha pogut iniciar Dovecot
start_eprotos=No has seleccionat cap protocol a la pàgina de <b>Xarxa i Protocols</b>
apply_err=No s'ha pogut aplicar la configuració
net_title=Xarxa i Protocols

View File

@@ -15,7 +15,6 @@ index_version=Verze $1
stop_err=Chyba při zastavení Dovecotu
stop_erunning=Nadále není spuštěn
start_err=Chyba při spuštění Dovecotu
start_eprotos=Na stránce <b>Sítě a protokoly</b> nebyly vybrány žádné protokoly
apply_err=Chyba při aplikaci konfigurace
net_title=Sítě a protokoly

View File

@@ -15,7 +15,6 @@ index_version=Version $1
stop_err=Kunne ikke stoppe Dovecot
stop_erunning=Kører ikke længere
start_err=Kunne ikke starte Dovecot
start_eprotos=Ingen protokoller er valgt på siden <b>Netværk og protokoller</b>
apply_err=Kunne ikke anvende konfiguration
net_title=Netværk og protokoller

View File

@@ -15,7 +15,6 @@ index_version=Version $1
stop_err=Stoppen von Dovecot fehlgeschlagen
stop_erunning=Läuft nicht länger
start_err=Starten von Dovecot fehlgeschlagen
start_eprotos=Keine Protokolle auf der <b>Netzwerke und Protokolle</b> Seite ausgewählt
apply_err=Fehlgeschlagen die Konfiguration anzuwenden
net_title=Netzwerke und Protokolle

View File

@@ -15,7 +15,6 @@ index_version=Έκδοση $1
stop_err=Αποτυχία διακοπής του Dovecot
stop_erunning=Δεν λειτουργεί πλέον
start_err=Δεν ήταν δυνατή η εκκίνηση του Dovecot
start_eprotos=Δεν έχουν επιλεγεί πρωτόκολλα στη σελίδα <b>Δικτύωση και πρωτόκολλα</b>
apply_err=Αποτυχία εφαρμογής διαμόρφωσης
net_title=Δικτύωση και πρωτόκολλα

View File

@@ -1,5 +1,3 @@
start_eprotos=No hay protocolos seleccionados en la página <b>Redes y protocolos</b>
net_lmtp=LMTP
net_ssl_required=Solo acepta SSL
net_listen=Interfaces para conexiones no SSL

View File

@@ -15,7 +15,6 @@ index_version=$1 bertsioa
stop_err=Ezin izan da Dovecot gelditu
stop_erunning=Jada ez da martxan
start_err=Huts egin du Dovecot abiaraztean
start_eprotos=<b>Sare eta protokoloak</b> orrialdean ez da protokolo hautatu
apply_err=Ezin izan da konfigurazioa aplikatu
net_title=Sare eta Protokoloak

View File

@@ -15,7 +15,6 @@ index_version=Version $1
stop_err=Dovecot متوقف نشد
stop_erunning=دیگر در حال اجرا نیست
start_err=Dovecot شروع نشد
start_eprotos=No protocols selected on the <b>Networking and Protocols</b> page
apply_err=پیکربندی انجام نشد
net_title=شبکه و پروتکل

View File

@@ -15,7 +15,6 @@ index_version=Versio $1
stop_err=Dovecotin pysäyttäminen epäonnistui
stop_erunning=Ei enää juokse
start_err=Dovecotin käynnistäminen epäonnistui
start_eprotos=<b>Verkottuminen ja protokollat</b> -sivulla ei ole valittu yhtään protokollaa
apply_err=Asetusten määrittäminen epäonnistui
net_title=Verkottuminen ja protokollat

View File

@@ -12,7 +12,6 @@ index_version=Version $1
stop_err=Impossible d'arrêter Dovecot
stop_erunning=Ne fonctionne plus
start_err=Impossible de démarrer Dovecot
start_eprotos=Aucun protocole sélectionné sur la page <b>Réseaux et protocoles</b>
apply_err=Impossible d'appliquer la configuration
net_title=Réseaux et protocoles

View File

@@ -15,7 +15,6 @@ index_version=Version $1
stop_err=עצירת Dovecot נכשלה
stop_erunning=כבר לא רץ
start_err=הפעלת Dovecot נכשלה
start_eprotos=No protocols selected on the <b>Networking and Protocols</b> page
apply_err=החלת התצורה נכשלה
net_title=רשת ופרוטוקולים

View File

@@ -8,7 +8,6 @@ index_bootdesc=Promijenite ovu postavku kako biste omogućili ili onemogućili p
stop_err=Zaustavljanje nije uspjelo u Dovecotu
stop_erunning=Nema više trčanja
start_err=Nije uspio pokrenuti Dovecot
start_eprotos=Nijedan protokol nije odabran na stranici <b>Umrežavanje i protokoli</b>
net_title=Umrežavanje i protokoli
net_header=Opcije protokola za umrežavanje i protokola pošte

View File

@@ -15,7 +15,6 @@ index_version=Version $1
stop_err=Failed to stop Dovecot
stop_erunning=No longer running
start_err=Failed to start Dovecot
start_eprotos=No protocols selected on the <b>Networking and Protocols</b> page
apply_err=Failed to apply configuration
net_title=Networking and Protocols

View File

@@ -15,7 +15,6 @@ index_version=Versione $1
stop_err=Tentativo di arrestare Dovecot fallito
stop_erunning=Non più in esecuzione
start_err=Tentativo di avvio di Dovecot fallito
start_eprotos=Nessun protocollo selezionato nella pagina <b>Reti e protocolli</b>
apply_err=Tentativo di applicare la configurazione fallito
net_title=Reti e protocolli

View File

@@ -15,7 +15,6 @@ index_version=バージョン$1
stop_err=Dovecotを停止できませんでした
stop_erunning=もう走っていない
start_err=Dovecotを起動できませんでした
start_eprotos=[<b>ネットワークとプロトコル</b>]ページでプロトコルが選択されていません
apply_err=構成を適用できませんでした
net_title=ネットワーキングとプロトコル

View File

@@ -15,7 +15,6 @@ index_version=버전 $1
stop_err=도브 코트를 멈추지 못했습니다.
stop_erunning=더 이상 달리지 않는다
start_err=도브 코트를 시작하지 못했습니다
start_eprotos=<b>네트워킹 및 프로토콜</b> 페이지에서 선택된 프로토콜이 없습니다
apply_err=구성을 적용하지 못했습니다
net_title=네트워킹 및 프로토콜

View File

@@ -15,7 +15,6 @@ index_version=$1 versija
stop_err=Nepavyko sustabdyti Dovecot
stop_erunning=Daugiau nebėga
start_err=Nepavyko paleisti „Dovecot“
start_eprotos=Puslapyje <b>Tinklų kūrimas ir protokolai</b> nepasirinkta nė vieno protokolo
apply_err=Nepavyko pritaikyti konfigūracijos
net_title=Tinklų kūrimas ir protokolai

View File

@@ -15,7 +15,6 @@ index_version=Versija $1
stop_err=Neizdevās apturēt Dovecot
stop_erunning=Vairs neskrienu
start_err=Neizdevās palaist Dovecot
start_eprotos=Lapā <b>Tīklošana un protokoli</b> nav atlasīts neviens protokols
apply_err=Neizdevās piemērot konfigurāciju
net_title=Tīklošana un protokoli

View File

@@ -15,7 +15,6 @@ index_version=Versi $1
stop_err=Gagal menghentikan Dovecot
stop_erunning=Tidak lagi berjalan
start_err=Gagal memulakan Dovecot
start_eprotos=Tiada protokol yang dipilih pada halaman <b>Rangkaian dan Protokol</b>
apply_err=Gagal menggunakan konfigurasi
net_title=Rangkaian dan Protokol

View File

@@ -15,7 +15,6 @@ index_version=Verżjoni $1
stop_err=Naqset milli twaqqaf Dovecot
stop_erunning=Ma għadux għaddej
start_err=Naqset milli tibda Dovecot
start_eprotos=L-ebda protokoll magħżul fuq il-paġna <b>Netwerking u Protokolli</b>
apply_err=Ma rnexxielux japplika l-konfigurazzjoni
net_title=Netwerking u Protokolli

View File

@@ -15,7 +15,6 @@ index_version=Versie $1
stop_err=Mislukt om Dovecot te stoppen
stop_erunning=Werkt niet meer
start_err=Mislukt om Dovecot te starten
start_eprotos=Geen protocollen geselecteerd op de <b>Netwerken en Protocollen</b> pagina
apply_err=Mislukt om de configuratie toe te voegen
net_title=Netwerken en Protocollen

View File

@@ -15,7 +15,6 @@ index_version=Versjon $1
stop_err=Kunne ikke stoppe Dovecot
stop_erunning=Kjører ikke lenger
start_err=Kunne ikke starte Dovecot
start_eprotos=Ingen protokoller valgt på siden <b>Nettverk og protokoller</b>
apply_err=Kunne ikke ta i bruk konfigurasjon
net_title=Nettverk og protokoller

View File

@@ -15,7 +15,6 @@ index_version=Wersja $1
stop_err=Błąd zatrzymywania Dovecot
stop_erunning=Nie jest dłużej uruchomiony
start_err=Błąd uruchamiania Dovecot
start_eprotos=Nie wybrano protokołów na stronie <b>Sieć i protokoły</b>
apply_err=Zastosowanie konfiguracji nie powiodło się
net_title=Sieć i protokoły

View File

@@ -15,7 +15,6 @@ index_version=Versão $1
stop_err=Falha ao parar o Dovecot
stop_erunning=Não está mais em execução
start_err=Falha ao iniciar o Dovecot
start_eprotos=Nenhum protocolo selecionado na página <b>Rede e protocolos</b>
apply_err=Falha ao aplicar a configuração
net_title=Redes e protocolos

View File

@@ -15,7 +15,6 @@ index_version=Versão $1
stop_err=Falha ao parar o Dovecot
stop_erunning=Não está mais em execução
start_err=Falha ao iniciar o Dovecot
start_eprotos=Nenhum protocolo selecionado na página <b>Rede e protocolos</b>
apply_err=Falha ao aplicar a configuração
net_title=Redes e protocolos

View File

@@ -15,7 +15,6 @@ index_version=Versiunea $1
stop_err=Nu a reușit să oprească Dovecot
stop_erunning=Nu mai alerga
start_err=Nu a reușit să pornească Dovecot
start_eprotos=Nu au fost selectate protocoale pe pagina <b>Rețea și protocoale</b>
apply_err=Eroare la aplicarea configurației
net_title=Networking și protocoale

View File

@@ -15,7 +15,6 @@ index_version=Версия $1
stop_err=Не удалось остановить голубятню
stop_erunning=Больше не работает
start_err=Не удалось запустить Dovecot
start_eprotos=На странице <b>Сеть и протоколы</b> не выбраны протоколы.
apply_err=Не удалось применить конфигурацию
net_title=Сеть и протоколы

View File

@@ -15,7 +15,6 @@ index_version=Verzia $1
stop_err=Nepodarilo sa zastaviť Dovecot
stop_erunning=Už nebeží
start_err=Nepodarilo sa spustiť program Dovecot
start_eprotos=Na stránke <b>Sieť a protokoly</b> neboli vybrané žiadne protokoly
apply_err=Nepodarilo sa použiť konfiguráciu
net_title=Vytváranie sietí a protokoly

View File

@@ -15,7 +15,6 @@ index_version=Različica $1
stop_err=Ni bilo mogoče ustaviti Dovecota
stop_erunning=Ne teče več
start_err=Ni bilo mogoče zagnati Dovecota
start_eprotos=Na strani <b>Omrežje in protokoli</b> niso izbrani nobeni protokoli
apply_err=Konfiguracije ni bilo mogoče uporabiti
net_title=Mreženje in protokoli

View File

@@ -15,7 +15,6 @@ index_version=Version $1
stop_err=Det gick inte att stoppa Dovecot
stop_erunning=Kör inte längre
start_err=Det gick inte att starta Dovecot
start_eprotos=Inga protokoll valda på sidan <b>Nätverk och protokoll</b>
apply_err=Det gick inte att tillämpa konfigurationen
net_title=Nätverk och protokoll

View File

@@ -15,7 +15,6 @@ index_version=รุ่น $1
stop_err=ไม่สามารถหยุด Dovecot
stop_erunning=ไม่ทำงานอีกต่อไป
start_err=ไม่สามารถเริ่ม Dovecot
start_eprotos=ไม่มีการเลือกโปรโตคอลในหน้า <b>เครือข่ายและโปรโตคอล</b>
apply_err=ไม่สามารถใช้การกำหนดค่า
net_title=เครือข่ายและโปรโตคอล

View File

@@ -15,7 +15,6 @@ index_version=Sürüm $1
stop_err=Dovecot durdurulamadı
stop_erunning=Artık koşmuyor
start_err=Dovecot başlatılamadı
start_eprotos=<b>Ağ ve Protokoller</b> sayfasında hiçbir protokol seçilmedi
apply_err=Yapılandırma uygulanamadı
net_title=Ağ ve Protokoller

View File

@@ -15,7 +15,6 @@ index_version=Версія $1
stop_err=Не вдалося зупинити голубця
stop_erunning=Більше не працює
start_err=Не вдалося запустити Dovecot
start_eprotos=На сторінці <b>Мережі та протоколи</b> не вибрано жодних протоколів
apply_err=Не вдалося застосувати конфігурацію
net_title=Мережі та протоколи

View File

@@ -15,7 +15,6 @@ index_version=Version $1
stop_err=ڈوکوٹ کو روکنے میں ناکام
stop_erunning=اب نہیں چل رہا ہے
start_err=ڈوکوٹ شروع کرنے میں ناکام
start_eprotos=No protocols selected on the <b>Networking and Protocols</b> page
apply_err=تشکیل دینے میں ناکام
net_title=نیٹ ورکنگ اور پروٹوکول

View File

@@ -15,7 +15,6 @@ index_version=Phiên bản $1
stop_err=Không thể ngăn chặn Dovecot
stop_erunning=Không còn chạy
start_err=Không thể khởi động Dovecot
start_eprotos=Không có giao thức nào được chọn trên trang <b>Mạng và Giao thức</b>
apply_err=Không thể áp dụng cấu hình
net_title=Mạng và giao thức

View File

@@ -15,7 +15,6 @@ index_version=版本$1
stop_err=无法停止鸽舍
stop_erunning=不再运行
start_err=无法启动鸽舍
start_eprotos=<b>网络和协议</b>页面上未选择协议
apply_err=应用配置失败
net_title=网络和协议

View File

@@ -15,7 +15,6 @@ index_version=版本 $1
stop_err=停止 Dovecot 伺服器失敗
stop_erunning=非執行中...
start_err=啟動 Dovecot 伺服器失敗
start_eprotos=沒有選擇通訊協定在 <b>網路及通訊協定</b> 頁面
apply_err=套用設定失敗
net_title=網路及通訊協定

View File

@@ -38,13 +38,10 @@ else {
&save_directive($conf, "default_mail_env", $env eq "" ? undef : $env);
}
# Check and idle intervals
$in{'check'} != 2 || $in{'checki'} =~ /^\d+$/ || &error($text{'mail_echeck'});
&save_directive($conf, "mailbox_check_interval",
$in{'check'} == 1 ? 0 : $in{'check'} == 2 ? $in{'checki'} : undef);
# Idle intervals
$in{'idle'} != 2 || $in{'idlei'} =~ /^\d+$/ || &error($text{'mail_eidle'});
&save_directive($conf, "mailbox_idle_check_interval",
$in{'idle'} == 1 ? 0 : $in{'idle'} == 2 ? $in{'idlei'} : undef);
$in{'idle'} == 1 ? "520 weeks" : $in{'idle'} == 2 ? "$in{'idlei'} seconds" : undef);
# Yes/no options
&save_directive($conf, "mail_full_filesystem_access",

View File

@@ -6,30 +6,24 @@ do 'firewall-lib.pl';
# Output HTML for editing security options for the acl module
sub acl_security_form
{
my ($o) = @_;
# Show editable tables
print "<tr> <td valign=top><b>$text{'acl_tables'}</b></td> <td colspan=3>\n";
local $t;
my $tables = "";
foreach $t (@known_tables) {
printf "<input type=checkbox name=%s value=1 %s> %s<br>\n",
$t, $_[0]->{$t} ? "checked" : "", $text{'index_table_'.$t};
$tables .= &ui_checkbox($t, 1, $text{'index_table_'.$t},
$o->{$t})."<br>\n";
}
print "</td> </tr>\n";
print &ui_table_row($text{'acl_tables'}, $tables, 3);
# Show allowed target types
print "<tr> <td><b>$text{'acl_jumps'}</b></td>\n";
print "<td colspan=3>",&ui_opt_textbox("jumps", $_[0]->{'jumps'}, 40,
$text{'acl_jall'}),"</td> </tr>\n";
print &ui_table_row($text{'acl_jumps'},
&ui_opt_textbox("jumps", $o->{'jumps'}, 40, $text{'acl_jall'}), 3);
# Show bootup/apply options
local ($f, $i);
foreach $f (@acl_features) {
print "<tr>\n" if ($i%2 == 0);
print "<td><b>",$text{'acl_'.$f},"</b></td> <td>\n";
printf "<input type=radio name=%s value=1 %s> %s\n",
$f, $_[0]->{$f} ? "checked" : "", $text{'yes'};
printf "<input type=radio name=%s value=0 %s> %s</td>\n",
$f, $_[0]->{$f} ? "" : "checked", $text{'no'};
print "</tr>\n" if ($i++%2 == 1);
foreach my $f (@acl_features) {
print &ui_table_row($text{'acl_'.$f},
&ui_yesno_radio($f, $o->{$f}));
}
}
@@ -37,14 +31,14 @@ foreach $f (@acl_features) {
# Parse the form for security options for the acl module
sub acl_security_save
{
local $t;
foreach $t (@known_tables) {
$_[0]->{$t} = $in{$t};
my ($o) = @_;
foreach my $t (@known_tables) {
$o->{$t} = $in{$t};
}
local $f;
foreach $f (@acl_features) {
$_[0]->{$f} = $in{$f};
foreach my $f (@acl_features) {
$o->{$f} = $in{$f};
}
$_[0]->{'jumps'} = $in{'jumps_def'} ? undef : $in{'jumps'};
$o->{'jumps'} = $in{'jumps_def'} ? undef : $in{'jumps'};
}

View File

@@ -17,18 +17,23 @@ print &ui_form_start("save_right.cgi", "post");
print &ui_table_start($text{'edright_header'}, undef ,2);
# Visible sections
print &ui_table_row($text{'edright_sects'},
join("<br>\n", map { &ui_checkbox($_->{'name'}, 1, $_->{'title'},
!$sects->{'no'.$_->{'name'}}) }
&list_right_frame_sections()));
my @right_frame_sects = &list_right_frame_sections();
if (@right_frame_sects) {
print &ui_table_row($text{'edright_sects'},
join("<br>\n", map { &ui_checkbox($_->{'name'}, 1, $_->{'title'},
!$sects->{'no'.$_->{'name'}}) }
@right_frame_sects));
}
# Show list by default
print &ui_table_row($text{'edright_list'},
&ui_radio("list", $sects->{'list'} || 0,
[ [ 0, $text{'edright_list0'} ],
$hasvirt ? ( [ 1, $text{'edright_list1'} ] ) : ( ),
$hasvm2 ? ( [ 2, $text{'edright_list2'} ] ) : ( ),
]));
if ($hasvirt || $hasvm2) {
# Show list by default
print &ui_table_row($text{'edright_list'},
&ui_radio("list", $sects->{'list'} || 0,
[ [ 0, $text{'edright_list0'} ],
$hasvirt ? ( [ 1, $text{'edright_list1'} ] ) : ( ),
$hasvm2 ? ( [ 2, $text{'edright_list2'} ] ) : ( ),
]));
}
# Alternate page
print &ui_table_row($text{'edright_alt'},
@@ -36,12 +41,14 @@ print &ui_table_row($text{'edright_alt'},
$text{'edright_alturl'}));
# Default tab
print &ui_table_row($text{'edright_deftab'},
&ui_select("tab", $sects->{'tab'},
[ [ "", $text{'edright_tab1'} ],
$hasvirt ? ( [ "virtualmin", $text{'edright_virtualmin'} ] ) : ( ),
$hasvm2 ? ( [ "vm2", $text{'edright_vm2'} ] ) : ( ),
[ "webmin", $text{'edright_webmin'} ] ]));
if ($hasvirt || $hasvm2) {
print &ui_table_row($text{'edright_deftab'},
&ui_select("tab", $sects->{'tab'},
[ [ "", $text{'edright_tab1'} ],
$hasvirt ? ( [ "virtualmin", $text{'edright_virtualmin'} ] ) : ( ),
$hasvm2 ? ( [ "vm2", $text{'edright_vm2'} ] ) : ( ),
[ "webmin", $text{'edright_webmin'} ] ]));
}
# Left frame size
print &ui_table_row($text{'edright_fsize'},

Binary file not shown.

After

Width:  |  Height:  |  Size: 876 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 544 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 867 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

View File

@@ -95,7 +95,23 @@ if ($current_lang_info->{'rtl'} || $current_lang eq "ar") {
# Page header
print "<html>\n";
print "<head> <title>$title</title> </head>\n";
print "<head>\n";
print "<title>$title</title>\n";
my $imgdir = "@{[&get_webprefix()]}/images";
my $prod = 'webmin';
if (foreign_available("server-manager")) {
$prod = 'cloudmin';
}
elsif (foreign_available("virtual-server")) {
$prod = 'virtualmin';
}
elsif (get_product_name() eq 'usermin') {
$prod = 'usermin';
}
print "<link rel='icon' type='image/png' sizes='16x16' href='$imgdir/favicons/$prod/favicon-16x16.png'>\n";
print "<link rel='icon' type='image/png' sizes='32x32' href='$imgdir/favicons/$prod/favicon-32x32.png'>\n";
print "<link rel='icon' type='image/png' sizes='192x192' href='$imgdir/favicons/$prod/favicon-192x192.png'>\n";
print "</head>\n";
# Upper custom frame
if ($upperframe) {

View File

@@ -26,7 +26,7 @@ config_nnext=Next
config_nprev=Prev
edright_title=System Information Configuration
edright_header=Virtualmin system information page settings
edright_header=System information page settings
edright_sects=Visible information
edright_list=Default right-frame content
edright_list0=System information

View File

@@ -17,7 +17,6 @@ require "gray-theme/theme.pl";
ReadParse();
popup_header("Virtualmin");
print "<script type='text/javascript' src='@{[&get_webprefix()]}/unauthenticated/toggleview.js'></script>\n";
my $is_master;
# Is this user root?
@@ -54,9 +53,9 @@ if ($nw == 0 || $nw == 2 && $is_master) {
# Default left-side mode
my $mode = $in{'mode'} ? $in{'mode'} :
$sects->{'tab'} =~ /vm2/ ? "server-manager" :
$sects->{'tab'} =~ /virtualmin/ ? "virtual-server" :
$sects->{'tab'} =~ /mail/ ? "mailboxes" :
($sects->{'tab'} && $sects->{'tab'} =~ /vm2/) ? "server-manager" :
($sects->{'tab'} && $sects->{'tab'} =~ /virtualmin/) ? "virtual-server" :
($sects->{'tab'} && $sects->{'tab'} =~ /mail/) ? "mailboxes" :
@leftitems ? $has[0]->{'id'} : "modules";
# Show mode selector
@@ -83,7 +82,7 @@ if (@has > 1) {
print "</div>";
}
print "<div class='wrapper'>\n";
print "<div class='wrapper leftmenu'>\n";
print "<table id='main' width='100%'><tbody><tr><td>\n";
my $selwidth = (get_left_frame_width() - 70)."px";
@@ -103,6 +102,16 @@ else {
!$titlemods{$_->{'module'}} } @leftitems;
}
# Show Webmin search form
my $cansearch = ($gaccess{'webminsearch'} || '') ne '0' &&
!$sects->{'nosearch'};
if ($mode eq "modules" && $cansearch) {
push(@leftitems, { 'type' => 'input',
'desc' => $text{'left_search'},
'name' => 'search',
'cgi' => '/webmin_search.cgi', });
push(@leftitems, { 'type' => 'hr' });
}
# Show system information link
push(@leftitems, { 'type' => 'item',
'id' => 'home',
@@ -147,19 +156,71 @@ if ($ENV{'HTTP_WEBMIN_SERVERS'}) {
'target' => 'window' });
}
# Show Webmin search form
my $cansearch = ($gaccess{'webminsearch'} || '') ne '0' &&
!$sects->{'nosearch'};
if ($mode eq "modules" && $cansearch) {
push(@leftitems, { 'type' => 'input',
'desc' => $text{'left_search'},
'name' => 'search',
'cgi' => '/webmin_search.cgi', });
}
show_menu_items_list(\@leftitems, 0);
print "</td></tr></tbody></table>\n";
print <<EOF;
<script type='text/javascript'>
(function() {
var imgs = document.querySelectorAll('img[src]'),
mailfolders = 0;
imgs.forEach(function(img) {
var i = document.createElement("i");
if (img.src) {
if (img.src.includes('webmin-small.png')) {
i.classList.add('ff', 'ff-webmin');
} else if (img.src.includes('usermin-small.png')) {
i.classList.add('ff', 'ff-webmin', 'ff-usermin');
} else if (img.src.includes('virtualmin.png')) {
i.classList.add('ff', 'ff-virtualmin');
} else if (img.src.includes('vm2.png')) {
i.classList.add('ff', 'ff-cloudmin');
} else if (img.src.includes('index.png')) {
i.classList.add('ff', 'ff-fw', 'ff-virtualmin-tick');
} else if (img.src.includes('graph.png')) {
i.classList.add('ff', 'ff-fw', 'ff-chart');
} else if (img.src.includes('gohome.png')) {
i.classList.add('ff', 'ff-fw', 'ff-home');
} else if (img.src.includes('stock_quit.png')) {
i.classList.add('ff', 'ff-fw', 'ff-sign-out');
} else if (img.src.includes('reload.png')) {
i.classList.add('ff', 'ff-fw', 'ff-refresh');
} else if (img.src.includes('mail.') && !mailfolders) {
i.classList.add('ff', 'ff-mail');
mailfolders = 1;
} else if (img.src.includes('mail.') && mailfolders) {
i.classList.add('ff', 'ff-folder-open');
} else if (img.src.includes('address.')) {
i.classList.add('ff', 'ff-address-book');
} else if (img.src.includes('address.')) {
i.classList.add('ff', 'ff-address-book');
} else if (img.src.includes('sig.')) {
i.classList.add('ff', 'ff-signature');
} else if (img.src.includes('changepass.')) {
i.classList.add('ff', 'ff-lock');
}
if (i.classList.length) {
img.replaceWith(i);
}
}
});
var inputs = document.querySelectorAll('input[src]');
inputs.forEach(function(input) {
var b = document.createElement("button"),
i = document.createElement("i");
if (input.src) {
if (input.src.includes('ok.png')) {
i.classList.add('ff', 'ff-play-circle');
b.type = 'submit';
b.classList.add('servers-submit');
b.appendChild(i);
input.replaceWith(b);
}
}
});
})();
</script>
EOF
print "</div>\n";
popup_footer();
@@ -201,18 +262,10 @@ foreach my $item (@$items) {
elsif ($item->{'type'} eq 'cat') {
# Start of a new category
my $c = $item->{'id'};
print "<div class='linkwithicon'>";
print "<a href=\"javascript:toggleview('cat$c','toggle$c')\" ".
"id='toggle$c'><img border='0' src='images/closed.gif' ".
"alt='[+]'></a>\n";
print "<div class='aftericon'>".
"<a href=\"javascript:toggleview('cat$c','toggle$c')\" ".
"id='toggletext$c'>".
"<font color='#000000'>$item->{'desc'}</font></a></div>";
print "</div>\n";
print "<div class='itemhidden' id='cat$c'>\n";
print "<details>";
print "<summary><span>$item->{'desc'}</span></summary>";
show_menu_items_list($item->{'members'}, $indent+1);
print "</div>\n";
print "</details>\n";
}
elsif ($item->{'type'} eq 'html') {
# Some HTML block

View File

@@ -1,50 +0,0 @@
.mode {
left: auto;
right: auto;
}
.linkwithicon {
position: relative;
white-space: nowrap;
left: 2px;
width: 16px;
padding-top: 4px;
padding-bottom: 4px;
}
.linkwithicon img, .mode img {
margin-bottom: -2px;
}
.leftlink {
position: relative;
left: 4px;
right: 4px;
line-height: 1.6em;
}
.linkindented {
border: none;
position: relative;
margin-right: 2px;
margin-left: 20px;
line-height: 1.6em;
}
.linkwithicon.inactive a,
.linkindented.inactive a {
/* pointer-events: none; */
filter: grayscale(1);
opacity: .75;
}
.linkindented.inactive {
white-space: pre;
}
.linkwithicon.inactive sub,
.linkindented.inactive sub {
vertical-align: top;
}
.aftericon {
display: inline;
}
.domainmenu {
white-space: nowrap;
position: relative;
left: 4px;
padding-top: 2px;
}

File diff suppressed because one or more lines are too long

View File

@@ -1,7 +1,6 @@
desc=Gray Framed Theme
longdesc=A legacy framed theme that supports Virtualmin and Cloudmin
version=10.0
desc=Framed Theme
longdesc=A legacy framed theme that also supports Virtualmin and Cloudmin
version=10.1
webmin=1
usermin=1
depends=1.994
usermin_depends=1.840
depends=2.000 1.860

View File

@@ -598,6 +598,26 @@ $rv .= "</td></tr></table>\n"; # wrapper
return $rv;
}
sub theme_ui_hidden_start
{
my ($title, $name, $status) = @_;
my $rv;
my $opened = $status ? " open" : "";
$rv .= "<details class='ui_hidden_start'$opened>";
$rv .= "<summary>$title</summary>\n";
return $rv;
}
=head2 ui_hidden_end(name)
Returns HTML for the end of a hidden section, started by ui_hidden_start.
=cut
sub theme_ui_hidden_end
{
return "</details>\n";
}
# theme_ui_hidden_table_start(heading, [tabletags], [cols], name, status,
# [&default-tds], [rightheading])
# A table with a heading and table inside, and which is collapsible
@@ -608,31 +628,17 @@ my $rv;
if (!$main::ui_hidden_start_donejs++) {
$rv .= &ui_hidden_javascript();
}
my $divid = "hiddendiv_$name";
my $openerid = "hiddenopener_$name";
my $defimg = $status ? "open.gif" : "closed.gif";
my $defclass = $status ? 'opener_shown' : 'opener_hidden';
my $text = defined($tconfig{'cs_text'}) ? $tconfig{'cs_text'} :
defined($gconfig{'cs_text'}) ? $gconfig{'cs_text'} : "000000";
my $opened = $status ? " open" : "";
my $header = defined($heading) ? "<span>$heading</span>" : "";
my $rheader = defined($rightheading) ? "<span class='rightheading'>$rightheading</span>" : "";
if (!$main::WRAPPER_OPEN) { # If we're not already inside of a wrapper, wrap it
$rv .= "<table class='shrinkwrapper' $tabletags>\n";
$rv .= "<tr><td>\n";
$rv .= "<div>\n";
}
$main::WRAPPER_OPEN++;
my $colspan = 1;
$rv .= "<table class='ui_table' $tabletags>\n";
if (defined($heading) || defined($rightheading)) {
$rv .= "<thead><tr>";
if (defined($heading)) {
$rv .= "<td><a href=\"javascript:hidden_opener('$divid', '$openerid')\" id='$openerid'><img border=0 src='@{[&get_webprefix()]}/images/$defimg'></a> <a href=\"javascript:hidden_opener('$divid', '$openerid')\" class='ui-hidden-table-title'><b>$heading</b></a></td>";
}
if (defined($rightheading)) {
$rv .= "<td align=right>$rightheading</td>";
$colspan++;
}
$rv .= "</tr> </thead>\n";
}
$rv .= "<tbody><tr> <td colspan=$colspan><div class='$defclass' id='$divid'><table width=100%>\n";
$rv .= "<details class='ui_hidden_table_start'$opened>";
$rv .= "<summary>$header $rheader</summary>\n";
$rv .= "<table width=100%>\n";
$main::ui_table_cols = $cols || 4;
$main::ui_table_pos = 0;
$main::ui_table_default_tds = $tds;
@@ -644,12 +650,10 @@ return $rv;
# ui_hidden_table_start
sub theme_ui_hidden_table_end
{
my ($name) = @_;
local $rv = "</table></div></td></tr></tbody></table>\n";
local $rv = "</table></details>\n";
if ( $main::WRAPPER_OPEN == 1 ) {
$main::WRAPPER_OPEN--;
#$rv .= "</div>\n";
$rv .= "</td></tr></table>\n";
$rv .= "</div>\n";
}
elsif ($main::WRAPPER_OPEN) { $main::WRAPPER_OPEN--; }
return $rv;

File diff suppressed because one or more lines are too long

View File

@@ -1,6 +0,0 @@
function toggleview (id1,id2) {
var obj1 = document.getElementById(id1);
var obj2 = document.getElementById(id2);
(obj1.className=="itemshown") ? obj1.className="itemhidden" : obj1.className="itemshown";
(obj1.className=="itemshown") ? obj2.innerHTML="<img border='0' src='images/open.gif' alt='[&ndash;]'>" : obj2.innerHTML="<img border='0' src='images/closed.gif' alt='[+]'>";
}

View File

@@ -2346,6 +2346,15 @@ my $cfile = &get_systemd_root($name)."/".$name;
&open_lock_tempfile(CFILE, ">$cfile");
&print_tempfile(CFILE, "[Unit]\n");
&print_tempfile(CFILE, "Description=$desc\n") if ($desc);
if (ref($opts)) {
&print_tempfile(CFILE, "Before=$opts->{'before'}\n") if ($opts->{'before'});
&print_tempfile(CFILE, "After=$opts->{'after'}\n") if ($opts->{'after'});
&print_tempfile(CFILE, "Wants=$opts->{'wants'}\n") if ($opts->{'wants'});
&print_tempfile(CFILE, "Requires=$opts->{'requires'}\n") if ($opts->{'requires'});
&print_tempfile(CFILE, "Conflicts=$opts->{'conflicts'}\n") if ($opts->{'conflicts'});
&print_tempfile(CFILE, "OnFailure=$opts->{'onfailure'}\n") if ($opts->{'onfailure'});
&print_tempfile(CFILE, "OnSuccess=$opts->{'onsuccess'}\n") if ($opts->{'onsuccess'});
}
&print_tempfile(CFILE, "\n");
&print_tempfile(CFILE, "[Service]\n");
&print_tempfile(CFILE, "ExecStart=$start\n");

View File

@@ -267,7 +267,10 @@ sub delete_user
local $ldap = &ldap_connect();
local $rv = $ldap->delete($_[0]->{'dn'});
if ($rv->code) {
&error(&text('usave_edelete', $rv->error));
my $err = $rv->error;
if ($err !~ /No such object/i) {
&error(&text('usave_edelete', $err));
}
}
$ldap->unbind();
@list_users_cache = grep { $_ ne $_[0] } @list_users_cache
@@ -379,7 +382,10 @@ sub delete_group
local $ldap = &ldap_connect();
local $rv = $ldap->delete($_[0]->{'dn'});
if ($rv->code) {
&error(&text('gsave_edelete', $rv->error));
my $err = $rv->error;
if ($err !~ /No such object/i) {
&error(&text('gsave_edelete', $err));
}
}
$ldap->unbind();
@list_groups_cache = grep { $_ ne $_[0] } @list_groups_cache

View File

@@ -1478,8 +1478,24 @@ return undef if (&is_readonly_mode());
if ($src->{'type'} == $dst->{'type'} && !$src->{'remote'}) {
# Can just move the file or dir
local @st = stat($src->{'file'});
&unlink_file($dst->{'file'});
&rename_as_mail_user($src->{'file'}, $dst->{'file'});
if ($src->{'type'} == 1) {
# Move each Maildir sub-dir, and any Maildir++ sub-folders
opendir(MAILDIR, $src->{'file'});
my @mdfiles = readdir(MAILDIR);
closedir(MAILDIR);
@mdfiles = grep { /^(cur|new|tmp|\..*)$/ &&
$_ ne "." && $_ ne ".." } @mdfiles;
foreach my $sd (@mdfiles) {
&unlink_file($dst->{'file'}."/".$sd);
&rename_as_mail_user($src->{'file'}."/".$sd,
$dst->{'file'}."/".$sd);
}
}
else {
# Move the mail file
&unlink_file($dst->{'file'});
&rename_as_mail_user($src->{'file'}, $dst->{'file'});
}
if (@st) {
&mailbox_fix_permissions($dst, \@st);
}
@@ -3607,6 +3623,7 @@ if (block) {
var new_input = document.createElement('input');
new_input.setAttribute('name', "attach"+count);
new_input.setAttribute('type', 'file');
new_input.setAttribute('multiple', '');
if (first_input) {
new_input.setAttribute('size',
first_input.getAttribute('size'));
@@ -3621,7 +3638,7 @@ return false;
}
function add_ss_attachment()
{
var block = document.getElementById("ssattachblock");
var block = document.getElementById("sattachblock");
if (block) {
var count = 0;
var first_input = document.forms[0]["file0"];
@@ -3713,9 +3730,9 @@ if (defined(&list_addresses)) {
@faddrs = grep { $_->[3] } &list_addresses();
}
local $f = $multi ? &ui_textarea($name, $value, 3, 40, undef, 0,
"style='width:95%'")
"style='width:90%'")
: &ui_textbox($name, $value, 40, 0, undef,
"style='width:95%'");
"style='width:90%'");
if ((!$from || @faddrs) && defined(&address_button)) {
$f .= " ".&address_button($name, 0, $from);
}

View File

@@ -353,13 +353,13 @@ print &ui_hidden("charset", $main::force_charset);
# Start tabs for from / to / cc / bcc
# Subject is separate
print &ui_table_start($text{'reply_headers'}, "width=100%", 2);
@tds = ( "width=10%", "width=90% nowrap" );
print "<tbody><tr><td>";
@tabs = ( [ "from", $text{'reply_tabfrom'} ],
[ "to", $text{'reply_tabto'} ],
[ "cc", $text{'reply_tabcc'} ],
[ "bcc", $text{'reply_tabbcc'} ],
[ "options", $text{'reply_taboptions'} ] );
print &ui_table_row(undef, &ui_tabs_start(\@tabs, "tab", "to", 0), 2);
print &ui_tabs_start(\@tabs, "tab", "to", 0);
# From address tab
$from ||= &get_user_from_address(\@uinfo);
@@ -391,45 +391,43 @@ elsif ($access{'fmode'} == 3) {
$frominput = "<tt>$ouser\@$access{'from'}</tt>".
&ui_hidden("from", "$ouser\@$access{'from'}");
}
print &ui_tabs_start_tabletab("tab", "from");
print &ui_table_row($text{'mail_from'}, $frominput, 1, \@tds);
print &ui_tabs_end_tabletab();
print &ui_tabs_start_tab("tab", "from");
print &ui_div_row($text{'mail_from'}, $frominput);
print &ui_tabs_end_tab();
# Show To: field
print &ui_tabs_start_tabletab("tab", "to");
print &ui_table_row($text{'mail_to'}, &ui_address_field("to", $to, 0, 1),
1, \@tds);
print &ui_tabs_end_tabletab();
print &ui_tabs_start_tab("tab", "to");
print &ui_div_row($text{'mail_to'}, &ui_address_field("to", $to, 0, 1));
print &ui_tabs_end_tab();
# Show Cc: field
print &ui_tabs_start_tabletab("tab", "cc");
print &ui_table_row($text{'mail_cc'}, &ui_address_field("cc", $cc, 0, 1),
1, \@tds);
print &ui_tabs_end_tabletab();
print &ui_tabs_start_tab("tab", "cc");
print &ui_div_row($text{'mail_cc'}, &ui_address_field("cc", $cc, 0, 1));
print &ui_tabs_end_tab();
# Show Bcc: field
$bcc ||= $config{'bcc_to'};
print &ui_tabs_start_tabletab("tab", "bcc");
print &ui_table_row($text{'mail_bcc'}, &ui_address_field("bcc", $bcc, 0, 1),
1, \@tds);
print &ui_tabs_end_tabletab();
print &ui_tabs_start_tab("tab", "bcc");
print &ui_div_row($text{'mail_bcc'}, &ui_address_field("bcc", $bcc, 0, 1));
print &ui_tabs_end_tab();
# Show tab for options
print &ui_tabs_start_tabletab("tab", "options");
print &ui_table_row($text{'mail_pri'},
print &ui_tabs_start_tab("tab", "options");
print &ui_div_row($text{'mail_pri'},
&ui_select("pri", "",
[ [ 1, $text{'mail_highest'} ],
[ 2, $text{'mail_high'} ],
[ "", $text{'mail_normal'} ],
[ 4, $text{'mail_low'} ],
[ 5, $text{'mail_lowest'} ] ]), 1, \@tds);
print &ui_tabs_end_tabletab();
[ 5, $text{'mail_lowest'} ] ]));
print &ui_tabs_end_tab();
print &ui_tabs_end();
# Subject field, outside tabs
print &ui_table_row($text{'mail_subject'},
print &ui_div_row($text{'mail_subject'},
&ui_textbox("subject", $subject, 40, 0, undef,
"style='width:95%'"), 1, \@tds);
"style='width:95%'"));
print "</td></tr></tbody>";
print &ui_table_end();
# Create link for switching to HTML/text mode for new mail
@@ -516,7 +514,7 @@ if (@fwdmail) {
}
# Display new attachment fields
&show_attachments_fields(3, $access{'canattach'});
&show_attachments_fields(1, $access{'canattach'});
print &ui_form_end([ [ undef, $text{'reply_send'} ] ]);

View File

@@ -178,7 +178,7 @@ if ($bodycontents) {
}
else {
print &ui_table_start($text{'view_body'}, "width=100%", 1);
print &ui_table_row(undef, "<b>$text{'view_nobody'}</b>");
print &ui_table_row(undef, "<strong>$text{'view_nobody'}</strong>");
print &ui_table_end();
}

View File

@@ -105,7 +105,7 @@ if ($product eq "webmin") {
# Create the control file
$size = int(`du -sk $tmp_dir`);
@deps = ( "perl", "libnet-ssleay-perl", "openssl", "libauthen-pam-perl", "libpam-runtime", "libio-pty-perl", "unzip", "shared-mime-info", "tar", "libdigest-sha-perl" );
@deps = ( "perl", "libnet-ssleay-perl", "openssl", "libauthen-pam-perl", "libpam-runtime", "libio-pty-perl", "unzip", "shared-mime-info", "tar", "libdigest-sha-perl", "libdigest-md5-perl" );
$deps = join(", ", @deps);
open(CONTROL, ">$control_file");
print CONTROL <<EOF;

View File

@@ -87,7 +87,7 @@ Version: $ver
Release: $rel
Provides: %{name}-%{version} perl(WebminCore)
Requires(pre): /usr/bin/perl
Requires: /bin/sh /usr/bin/perl /bin/rm perl(lib) perl(open) perl(Net::SSLeay) perl(Time::Local) perl(Encode::Detect) perl(Data::Dumper) perl(File::Path) perl(File::Basename) perl(Digest::SHA) openssl unzip tar
Requires: /bin/sh /usr/bin/perl /bin/rm perl(lib) perl(open) perl(Net::SSLeay) perl(Time::Local) perl(Encode::Detect) perl(Data::Dumper) perl(File::Path) perl(File::Basename) perl(Digest::SHA) perl(Digest::MD5) openssl unzip tar
AutoReq: 0
License: BSD-3-clause
Group: System/Tools

View File

@@ -361,7 +361,7 @@ playtime_total=Total time
playtime_date=Show play time on :
playtime_ok=Show
playtime_today=&lt;Today&gt;
playtime_all=&lt;All days combined&gt;
playtime_alldays=&lt;All days combined&gt;
versions_title=Minecraft Versions
versions_file=Filename

View File

@@ -31,7 +31,7 @@ if (keys %$playtime || @players) {
print &ui_form_start("list_playtime.cgi");
print "<b>$text{'playtime_date'}</b>\n";
my @opts = ( [ "", $text{'playtime_today'} ],
[ "all", $text{'playtime_all'} ] );
[ "all", $text{'playtime_alldays'} ] );
push(@opts, @days);
print &ui_select("date", $in{'date'}, \@opts, 1, 0, 0, 0,
"onChange='form.submit()'"),"\n";

View File

@@ -27,9 +27,12 @@ else {
$config_file = "$pwd/$ARGV[0]";
}
%config = &read_config_file($config_file);
$ENV{'LIBROOT'} = $config{'root'};
if ($config{'perllib'}) {
push(@INC, split(/:/, $config{'perllib'}));
push(@INC, "$config{'root'}/vendor_perl");
$ENV{'PERLLIB'} .= ':'.$config{'perllib'};
$ENV{'PERLLIB'} .= ':'."$config{'root'}/vendor_perl";
}
@startup_msg = ( );
@@ -2393,6 +2396,7 @@ if (&get_type($full) eq "internal/cgi" && $validated != 4) {
$envlang = $ENV{"LANG"};
$envroot = $ENV{"SystemRoot"};
$envperllib = $ENV{'PERLLIB'};
$envdoclroot = $ENV{'LIBROOT'};
foreach my $k (keys %ENV) {
delete($ENV{$k});
}
@@ -2401,6 +2405,7 @@ if (&get_type($full) eq "internal/cgi" && $validated != 4) {
$ENV{"USER"} = $envuser if ($envuser);
$ENV{"OLD_LANG"} = $envlang if ($envlang);
$ENV{"SystemRoot"} = $envroot if ($envroot);
$ENV{'LIBROOT'} = $envdoclroot if ($envdoclroot);
$ENV{'PERLLIB'} = $envperllib if ($envperllib);
$ENV{"HOME"} = $user_homedir;
$ENV{"SERVER_SOFTWARE"} = $config{"server"};
@@ -4712,12 +4717,14 @@ if (!Net::SSLeay::accept($ssl_con)) {
return undef;
}
# Check for a per-hostname SSL context and use that instead
my $h = Net::SSLeay::get_servername($ssl_con);
if ($h) {
my $c = $ssl_contexts{$h} ||
$h =~ /^[^\.]+\.(.*)$/ && $ssl_contexts{"*.$1"};
if ($c) {
$ssl_ctx = $c;
if (defined(&Net::SSLeay::get_servername)) {
my $h = Net::SSLeay::get_servername($ssl_con);
if ($h) {
my $c = $ssl_contexts{$h} ||
$h =~ /^[^\.]+\.(.*)$/ && $ssl_contexts{"*.$1"};
if ($c) {
$ssl_ctx = $c;
}
}
}
return ($ssl_con, $ssl_ctx->{'certfile'}, $ssl_ctx->{'keyfile'});
@@ -4767,7 +4774,8 @@ print DEBUG "in reload_config_file\n";
&build_config_mappings();
&read_webmin_crons();
&precache_files();
&setup_ssl_contexts();
&setup_ssl_contexts()
if ($use_ssl);
&parse_websockets_config();
if ($config{'session'}) {
dbmclose(%sessiondb);
@@ -5765,6 +5773,7 @@ lc($rheader{'sec-websocket-accept'}) eq lc($bdigest) ||
# Start forwarding data
seek(DEBUG, 0, 2);
print DEBUG "in websockets loop\n";
my $last_session_check_time = time();
while(1) {
my $rmask = undef;
vec($rmask, fileno($fh), 1) = 1;
@@ -5783,7 +5792,21 @@ while(1) {
last if (!defined($buf) || length($buf) == 0);
syswrite($fh, $buf, length($buf)) || last;
}
my $now = time();
if ($now - $last_session_check_time > 10) {
# Re-validate the browser session every 10 seconds
print DEBUG "verifying websockets session $session_id\n";
print $PASSINw "verify $session_id 0 $acptip\n";
<$PASSOUTr> =~ /(\d+)\s+(\S+)/;
if ($1 != 2) {
print DEBUG "session $session_id has expired!\n";
last;
}
$last_session_check_time = $now;
}
}
close($fh);
close(SOCK);
print DEBUG "done websockets loop\n";
return 0;

View File

@@ -288,6 +288,7 @@ else {
@titles = @titles[0..4];
@images = @images[0..4];
}
@images = map { $_ = &get_webprefix()."/mysql/$_" } @images;
&icons_table(\@links, \@titles, \@images, 5);
}

View File

@@ -1036,7 +1036,19 @@ if ($_[4] && $_[4] ne 'root' && $< == 0) {
$cmd = &command_as_user($_[4], 0, $cmd);
}
local $out = &backquote_logged("$cmd 2>&1");
local @rv = ($?, $? ? $out || "$cmd failed" : $out);
local @rv;
if ($?) {
# Total failure
@rv = ($?, $out || "$cmd failed");
}
elsif ($out =~ /(^|\n)(ERROR\s+\d+.*)/) {
# Some command in the file failed
@rv = (1, $2);
}
else {
# All OK
@rv = (0, $out);
}
&make_authstr(); # Put back old password environment variable
return @rv;
}

View File

@@ -24,7 +24,7 @@ my @autos = &get_auto_defs();
my @rv;
my %v6map;
foreach $iface (@ifaces) {
my ($name, $addrfam, $method, $options) = @$iface;
my ($name, $addrfam, $method, $options, $file, $lnum) = @$iface;
if ($addrfam eq 'inet') {
# IPv4 interface .. parse and add to list
my $cfg = { };
@@ -91,11 +91,16 @@ foreach $iface (@ifaces) {
$cfg->{$param} = $value;
}
}
if ($cfg->{'address'} =~ /^(\S+)\/(\d+)$/) {
$cfg->{'address'} = $1;
$cfg->{'netmask'} = &prefix_to_mask($2);
}
$cfg->{'dhcp'} = ($method eq 'dhcp');
$cfg->{'bootp'} = ($method eq 'bootp');
$cfg->{'edit'} = ($cfg->{'name'} !~ /^ppp|lo/);
$cfg->{'index'} = scalar(@rv);
$cfg->{'file'} = $network_interfaces_config;
$cfg->{'file'} = $file;
$cfg->{'line'} = $lnum;
push(@rv, $cfg);
}
elsif ($addrfam eq "inet6") {
@@ -255,8 +260,8 @@ if(($cfg->{'vlan'} == 1) && ($cfg->{'mtu'})) {
# Find the existing interface section
my @ifaces = get_interface_defs();
my $found = 0;
my $found6 = 0;
my $found;
my $found6;
foreach $iface (@ifaces) {
local $address;
foreach my $opt (@{$iface->[3]}) {
@@ -267,7 +272,7 @@ foreach $iface (@ifaces) {
}
if ($iface->[0] eq $cfg->{'fullname'} && $iface->[1] eq 'inet') {
# Found interface to change
$found = 1;
$found = $iface->[4];
foreach my $o (@{$iface->[3]}) {
if ($o->[0] eq 'gateway' ||
$o->[0] eq 'pre-up' && $o->[1] =~ /brctl/ ||
@@ -279,7 +284,7 @@ foreach $iface (@ifaces) {
}
if ($iface->[0] eq $cfg->{'fullname'} && $iface->[1] eq 'inet6') {
# Found IPv6 block
$found6 = 1;
$found6 = $iface->[4];
}
}
@@ -307,11 +312,11 @@ else {
# Update existing section
if($in{'vlan'} == 1) {
&modify_interface_def($cfg->{'physical'}.'.'.$cfg->{'vlanid'},
'inet', $method, \@options, 0);
'inet', $method, \@options, 0, $found);
}
else {
&modify_interface_def($cfg->{'fullname'},
'inet', $method, \@options, 0);
'inet', $method, \@options, 0, $found);
}
if ($cfg->{'bond'} == 1 && $gconfig{'os_version'} < 5) {
&modify_module_def($cfg->{'fullname'}, 0, $cfg->{'mode'},
@@ -345,16 +350,16 @@ my $method = $cfg->{'auto6'} ? "manual" : "static";
if (!$found6 && @options6) {
# Need to add IPv6 block
&new_interface_def($cfg->{'fullname'},
'inet6', $method, \@options6);
'inet6', $method, \@options6, $found);
}
elsif ($found6 && @options6) {
# Need to update IPv6 block
&modify_interface_def($cfg->{'fullname'},
'inet6', $method, \@options6, 0);
'inet6', $method, \@options6, 0, $found6);
}
elsif ($found6 && !@options6) {
# Need to delete IPv6 block
&delete_interface_def($cfg->{'fullname'}, 'inet6');
&delete_interface_def($cfg->{'fullname'}, 'inet6', $found6);
}
# Set auto option to include this interface, or not
@@ -516,9 +521,9 @@ sub new_module_def
sub delete_interface
{
my $cfg = $_[0];
&delete_interface_def($cfg->{'fullname'}, 'inet');
&delete_interface_def($cfg->{'fullname'}, 'inet', $cfg->{'file'});
if (@{$cfg->{'address6'}}) {
&delete_interface_def($cfg->{'fullname'}, 'inet6');
&delete_interface_def($cfg->{'fullname'}, 'inet6', $cfg->{'file'});
}
my @autos = get_auto_defs();
if ($gconfig{'os_version'} >= 3 || scalar(@autos)) {
@@ -777,59 +782,80 @@ $sysctl{'net.ipv4.ip_forward'} = $in{'forward'};
# gets a list of interface definitions (including their options) from the
# central config file
# the returned list is an array whose contents are tupels of
# (name, addrfam, method, options) with
# (name, addrfam, method, options, file, line) with
# name the interface name (e.g. eth0)
# addrfam the address family (e.g. inet, inet6)
# method the address activation method (e.g. static, dhcp, loopback)
# options is a list of (param, value) pairs
# file the file this interface was read from
# line the line number in the file
sub get_interface_defs
{
local *CFGFILE;
my ($file) = @_;
$file ||= $network_interfaces_config;
my $fh;
my @ret;
&open_readfile(CFGFILE, $network_interfaces_config) || return ();
open($fh, $file) || return ();
# read the file line by line
$line = <CFGFILE>;
my $line = <$fh>;
my $lnum = 0;
while (defined $line) {
print STDERR "file=$file line=$line\n";
chomp($line);
# skip comments
if ($line =~ /^\s*#/ || $line =~ /^\s*$/) {
$line = <CFGFILE>;
$line = <$fh>;
$lnum++;
next;
}
if ($line =~ /^\s*auto/) {
# skip auto stanzas
$line = <CFGFILE>;
$line = <$fh>;
$lnum++;
while(defined($line) && $line !~ /^\s*(iface|mapping|auto|source|allow-hotplug)/) {
$line = <CFGFILE>;
$line = <$fh>;
$lnum++;
next;
}
}
elsif ($line =~ /^\s*mapping/) {
# skip mapping stanzas
$line = <CFGFILE>;
$line = <$fh>;
$lnum++;
while(defined($line) && $line !~ /^\s*(iface|mapping|auto|source|allow-hotplug)/) {
$line = <CFGFILE>;
$line = <$fh>;
$lnum++;
next;
}
}
elsif ($line =~ /^\s*source/) {
# Skip includes
$line = <CFGFILE>;
elsif ($line =~ /^\s*source\s+(\S+)/) {
# Expand includes
$line = <$fh>;
$lnum++;
my $src = $1;
my @srcs = glob($src);
foreach $src (@srcs) {
print STDERR "including $src\n";
my @inc = &get_interface_defs($src);
push(@ret, @inc);
}
}
elsif ($line =~ /^\s*allow-hotplug/) {
# Skip hotplug lines
$line = <CFGFILE>;
$line = <$fh>;
$lnum++;
}
elsif (my ($name, $addrfam, $method) = ($line =~ /^\s*iface\s+(\S+)\s+(\S+)\s+(\S+)\s*$/) ) {
# only lines starting with "iface" are expected here
my @iface_options;
# now read everything until the next iface definition
$line = <CFGFILE>;
$line = <$fh>;
$lnum++;
while (defined $line && ! ($line =~ /^\s*(iface|mapping|auto|source|allow-hotplug)/)) {
# skip comments and empty lines
if ($line =~ /^\s*#/ || $line =~ /^\s*$/) {
$line = <CFGFILE>;
$line = <$fh>;
$lnum++;
next;
}
my ($param, $value);
@@ -842,15 +868,17 @@ while (defined $line) {
else {
error("Error in option line: '$line' invalid");
}
$line = <CFGFILE>;
$line = <$fh>;
$lnum++;
}
push(@ret, [$name, $addrfam, $method, \@iface_options]);
push(@ret, [$name, $addrfam, $method, \@iface_options,
$file, $lnum]);
}
else {
error("Error reading file $network_interfaces_config: unexpected line '$line'");
}
}
close(CFGFILE);
close($fh);
return @ret;
}
@@ -858,7 +886,7 @@ return @ret;
# Returns a list of interfaces in auto lines
sub get_auto_defs
{
local @rv;
my @rv;
&open_readfile(CFGFILE, $network_interfaces_config);
while(<CFGFILE>) {
s/\r|\n//g;
@@ -901,20 +929,21 @@ if (!$found) {
}
# modifies the options of an already stored interface definition
# the parameters should be (name, addrfam, method, options, mode)
# the parameters should be (name, addrfam, method, options, mode, file)
# with options being an array of (param, value) pairs
# and mode being 0 for modify and 1 for delete
sub modify_interface_def
{
my ($name, $addrfam, $method, $options, $mode) = @_;
my ($name, $addrfam, $method, $options, $mode, $file) = @_;
$file ||= $network_interfaces_config;
# make a backup copy
&copy_source_dest($network_interfaces_config, "$network_interfaces_config~");
&copy_source_dest($file, $file."~");
local *OLDCFGFILE, *NEWCFGFILE;
&open_readfile(OLDCFGFILE, "$network_interfaces_config~") ||
error("Unable to open $network_interfaces_config");
&lock_file($network_interfaces_config);
&open_tempfile(NEWCFGFILE, "> $network_interfaces_config", 1) ||
error("Unable to open $network_interfaces_config");
&open_readfile(OLDCFGFILE, $file."~") ||
error("Unable to open $file");
&lock_file($file);
&open_tempfile(NEWCFGFILE, ">$file", 1) ||
error("Unable to open $file");
my $inside_modify_region = 0;
my $iface_line = 0;
@@ -962,38 +991,38 @@ while (defined ($line=<OLDCFGFILE>)) {
}
$iface_line = 0;
}
close(OLDCFGFILE);
&close_tempfile(NEWCFGFILE);
&unlock_file($network_interfaces_config);
&unlock_file($file);
&unlink_file($file."~");
}
# creates a new interface definition in the config file
# the parameters should be (name, addrfam, method, options)
# the parameters should be (name, addrfam, method, options, file)
# with options being an array of (param, value) pairs
# the selection key is (name, addrfam)
sub new_interface_def
{
# make a backup copy
&copy_source_dest($network_interfaces_config, "$network_interfaces_config~");
local ($name, $addrfam, $method, $options, $file) = @_;
$file ||= $network_interfaces_config;
local *CFGFILE;
&open_lock_tempfile(CFGFILE, ">> $network_interfaces_config") ||
error("Unable to open $network_interfaces_config");
local ($name, $addrfam, $method, $options) = @_;
&open_lock_tempfile(CFGFILE, ">>$file") ||
error("Unable to open $file");
&print_tempfile(CFGFILE, "\niface $name $addrfam $method\n");
foreach $option (@$options) {
my ($param, $value) = @$option;
&print_tempfile(CFGFILE, "\t$param $value\n");
}
&close_tempfile(CFGFILE);
&unlock_file($file);
}
# delete an already defined interface
# the parameters should be (name, addrfam)
# the parameters should be (name, addrfam, file)
sub delete_interface_def
{
local ($name, $addrfam, $method) = @_;
&modify_interface_def($name, $addrfam, '', [], 1);
local ($name, $addrfam, $file) = @_;
&modify_interface_def($name, $addrfam, '', [], 1, $file);
&modify_module_def($name, 1);
}

View File

@@ -151,7 +151,6 @@ else {
"",
[ [ "ok", $in{'mode'} eq 'new' ? $text{'index_install'}
: $text{'index_update'} ],
undef,
[ "refresh", $text{'index_refresh'} ] ],
1,
undef,

View File

@@ -180,7 +180,7 @@ if (-r $file) {
return ( );
}
# compare_versions(&pkg1, &pk2)
# compare_versions(&pkg1, &pkg2)
# Returns -1 if the version of pkg1 is older than pkg2, 1 if newer, 0 if same.
sub compare_versions
{
@@ -438,7 +438,8 @@ if (&supports_updates_available()) {
foreach my $a (&updates_available($nocache == 1)) {
my $c = $currentmap{$a->{'name'},$a->{'system'}};
next if (!$c);
next if ($a->{'version'} eq $c->{'version'});
next if ($a->{'version'} eq $c->{'version'} &&
$a->{'epoch'} eq $c->{'epoch'});
push(@rv, { 'name' => $a->{'name'},
'update' => $a->{'update'},
'system' => $a->{'system'},

Some files were not shown because too many files have changed in this diff Show More