Compare commits

..

1 Commits

Author SHA1 Message Date
Ilia Ross
2c8ec1bfff Fix not to return short hostname unless set 2023-08-25 15:58:35 +03:00
229 changed files with 451 additions and 2495 deletions

View File

@@ -1,26 +1,5 @@
## Changelog
#### 2.104 (October 16, 2023)
* Add support for numbered and bulleted lists in email HTML editor
* Add ability to display active file locks in `Webmin Configuration ⇾ File Locking` page
* Fix hostname detection on `systemd` systems to avoid excessive logging [#2020](https://github.com/webmin/webmin/issues/2020)
* Fix Webmin version display [#2023](https://github.com/webmin/webmin/issues/2023)
* Fix to check if UI library is loaded before using it [#2021](https://github.com/webmin/webmin/issues/2021)
* Fix the absent init script for legacy systems after the initial installation
* Update the Authentic theme to the latest version with various fixes and improvements
#### 2.103 (October 08, 2023)
* Add support for hostname detection using `hostnamectl` command
* Add support for other ACME services
* Add ability to hide dotfiles in File Manager [#1578](https://github.com/webmin/authentic-theme/issues/1578)
* Add `xz`, `zstd` and plain `tar` support when creating archives in File Manager [#2009](https://github.com/webmin/webmin/issues/2009)
* Add support for English (United States) (military time) locale
* Fix to correctly switch key hash type with ACME services
* Fix bug when `backend` wasn't saved correctly in Fail2Ban module [#1992](https://github.com/webmin/webmin/issues/1992)
* Fix large files download in Upload and Download module
* Fix Google Authentication on RHEL systems derivatives
* Update the Authentic theme to the latest version with various fixes and improvements
#### 2.102 (August 23, 2023)
* Add support for Amazon Linux 2023
* Fix a bug in Network Configuration module when parsing network size [sourceforge.net/discussion#55377]( https://sourceforge.net/p/webadmin/discussion/55377/thread/78e5aa05f3)

File diff suppressed because one or more lines are too long

View File

@@ -5,9 +5,12 @@ use strict;
use warnings;
BEGIN { $Pod::Usage::Formatter = 'Pod::Text::Color'; }
use 5.010; # Version in CentOS 6
use Getopt::Long qw(:config permute pass_through);
use Term::ANSIColor qw(:constants);
use Pod::Usage;
use Term::ANSIColor qw(:constants);
use File::Spec;
use File::Basename;
my $a0 = $ARGV[0];
@@ -35,12 +38,8 @@ sub main {
}
);
# Set defaults
$opt{'config'} ||= "/etc/webmin";
$opt{'commands'} = $a0;
# Load libs
loadlibs(\%opt);
my @remain = @ARGV;
# List commands?
@@ -49,6 +48,7 @@ sub main {
exit 0;
} elsif ($opt{'version'} || $opt{'versions'}) {
# Load libs
my $root = root($opt{'config'});
my $ver_checked = sub {
my ($ver_remote, $ver_curr) = @_;
if ($ver_remote && $ver_curr &&
@@ -82,7 +82,6 @@ sub main {
}
};
my $root = root($opt{'config'});
if ($root && -d $root) {
require("$root/web-lib-funcs.pl");
@@ -208,9 +207,6 @@ exit main( \@ARGV ) if !caller(0);
sub run_command {
my ( $optref, $subcmd, $remainref ) = @_;
# Load libs
loadlibs($optref);
# Figure out the Webmin root directory
my $root = root($optref->{'config'});
@@ -241,10 +237,6 @@ sub run_command {
sub get_command_path {
my ($root, $subcmd, $optref) = @_;
# Load libs
loadlibs($optref);
# Check for a root-level command (in "$root/bin")
my $command_path;
if ($subcmd) {
@@ -382,20 +374,6 @@ sub root {
return $root;
}
# loadlibs - Load libraries from the Webmin vendor dir
# as those may not be installed as dependency, because
# Webmin already provides them from package manager
# perspective.
sub loadlibs {
my ($optref) = @_;
$optref->{'config'} ||= "/etc/webmin";
my $root = root($optref->{'config'});
my $libroot = "$root/vendor_perl";
eval "use lib '$libroot'";
eval "use File::Basename";
eval "use File::Spec";
}
1;
=pod

View File

@@ -1976,31 +1976,21 @@ if (!$file) {
push(@{$dir->{'members'}}, { 'name' => 'file',
'values' => [ $file ] } );
# Allow transfer from slave IPs
my (@notify, @transfer);
foreach my $s (@$slaves) {
push(@notify, { 'name' => $s });
push(@transfer, { 'name' => $s });
}
if (@transfer) {
my $gat = &find("allow-transfer", $opts->{'members'});
if ($gat) {
push(@transfer, @{$gat->{'members'}});
}
}
if (@notify) {
# Add slave IPs
if (@$slaves) {
my $also = { 'name' => 'also-notify',
'type' => 1,
'members' => \@notify};
push(@{$dir->{'members'}}, $also);
push(@{$dir->{'members'}}, { 'name' => 'notify',
'values' => [ 'yes' ] });
}
if (@transfer) {
'members' => [ ] };
my $allow = { 'name' => 'allow-transfer',
'type' => 1,
'members' => \@transfer };
push(@{$dir->{'members'}}, $allow);
'members' => [ ] };
foreach my $s (@$slaves) {
push(@{$also->{'members'}}, { 'name' => $s });
push(@{$allow->{'members'}}, { 'name' => $s });
}
push(@{$dir->{'members'}}, $also, $allow);
push(@{$dir->{'members'}}, { 'name' => 'notify',
'values' => [ 'yes' ] });
}
# Create the zone file, with records

View File

@@ -5,7 +5,7 @@ use warnings;
no warnings 'redefine';
no warnings 'uninitialized';
# Globals
our (%access, %text, $bind_version);
our (%access, %text);
our $dnssec_dlv_zone;
require './bind8-lib.pl';
@@ -24,12 +24,10 @@ $tkeys ||= { 'members' => [ ] };
print &ui_form_start("save_trusted.cgi", "post");
print &ui_table_start($text{'trusted_header'}, undef, 2);
if (&compare_version_numbers($bind_version, '<', '9.16.0')) {
# DNSSEC enabled?
print &choice_input($text{'trusted_dnssec'}, 'dnssec-enable', $mems,
$text{'yes'}, 'yes', $text{'no'}, 'no',
$text{'default'}, undef);
}
# DNSSEC enabled?
print &choice_input($text{'trusted_dnssec'}, 'dnssec-enable', $mems,
$text{'yes'}, 'yes', $text{'no'}, 'no',
$text{'default'}, undef);
if (&supports_dnssec_client() == 2) {
print &choice_input($text{'trusted_validation'},
'dnssec-validation', $mems,

View File

@@ -4,7 +4,7 @@ use strict;
use warnings;
no warnings 'redefine';
no warnings 'uninitialized';
our (%access, %text, %in, %config, $bind_version);
our (%access, %text, %in, %config);
require './bind8-lib.pl';
$access{'defaults'} || &error($text{'trusted_ecannot'});
@@ -17,9 +17,7 @@ my $conf = $parent->{'members'};
my $options = &find("options", $conf);
# DNSSEC enabled
if (&compare_version_numbers($bind_version, '<', '9.16.0')) {
&save_choice("dnssec-enable", $options, 1);
}
&save_choice("dnssec-enable", $options, 1);
if (&supports_dnssec_client() == 2) {
&save_choice("dnssec-validation", $options, 1);
}

View File

@@ -19,10 +19,6 @@ while(@ARGV) {
shift(@ARGV);
$createsig = 1;
}
elsif ($ARGV[0] eq "--key") {
shift(@ARGV);
$keyname = shift(@ARGV);
}
elsif ($ARGV[0] eq "--exclude") {
shift(@ARGV);
push(@exclude, shift(@ARGV));
@@ -102,8 +98,7 @@ if ($file =~ /^(.*)\.gz$/i) {
}
if ($createsig) {
system("rm -f $file-sig.asc");
system("gpg ".($keyname ? " --default-key $keyname" : "").
" --armor --output $file-sig.asc --detach-sig $file");
system("gpg --armor --output $file-sig.asc --detach-sig $file");
}
# read_file(file, &assoc, [&order], [lowercase])

View File

@@ -1556,8 +1556,7 @@ if ($err) {
=head2 cleanup_temp_files
Called from cron to delete old files in the Webmin /tmp directory, and also
old lock links directories.
Called from cron to delete old files in the Webmin /tmp directory
=cut
sub cleanup_temp_files
@@ -1588,18 +1587,6 @@ foreach my $f (readdir(DIR)) {
}
}
closedir(DIR);
my $lockdir = $var_directory."/locks";
opendir(DIR, $lockdir);
foreach my $f (readdir(DIR)) {
next if ($f eq "." || $f eq "..");
next if ($f !~ /^\d+$/);
if (!kill(0, $f)) {
# Process is gone, but never cleaned up!
&unlink_file("$lockdir/$f");
}
}
closedir(DIR);
}
=head2 list_cron_files()

View File

@@ -216,11 +216,6 @@ return wantarray ? @rv : $rv[0];
sub save_directive
{
local ($conf, $name, $value, $sname, $svalue) = @_;
$newconf = [ grep { $_->{'file'} !~ /^\/usr\/share\/dovecot/ &&
$_->{'file'} !~ /^\/opt/ } @$conf ];
if (@$newconf) {
$conf = $newconf;
}
local $dir;
if (ref($name)) {
# Old directive given
@@ -582,4 +577,5 @@ else {
}
1;
r

View File

@@ -1,3 +1,4 @@
line2=System configuration,11
exports_file=Exported filesystems file,0
apply_cmd=Command to apply configuration,3,None
restart_command=Command to restart export server,0

View File

@@ -51,11 +51,9 @@ print &ui_table_row($text{'jail_ignoreip'},
my $backend = &find_value("backend", $jail);
print &ui_table_row($text{'jail_backend'},
&ui_select("backend", $backend || "auto",
[ [ "auto", $text{'jail_auto'} ],
[ "systemd", $text{'jail_systemd'} ],
[ "polling", $text{'jail_polling'} ],
[ "gamin", $text{'jail_gamin'} ],
[ "pyinotify", $text{'jail_pyinotify'} ] ]));
[ [ "auto", $text{'jail_auto'} ],
[ "gamin", $text{'jail_gamin'} ],
[ "polling", $text{'jail_polling'} ] ]));
# Email destination
my $destemail = &find_value("destemail", $jail);

View File

@@ -114,10 +114,8 @@ jail_efindtime=Delay between matches must be a number greater than zero
jail_ebantime=Time to ban an IP must be a number greater than zero
jail_backend=Check for log file updates using
jail_auto=Decide automatically
jail_systemd=systemd
jail_polling=polling
jail_gamin=gamin
jail_pyinotify=pyinotify
jail_gamin=Gamin file alteration monitor
jail_polling=Background polling
jail_destemail=Default notification email
jail_none=None set
jail_banaction=Default action to apply

View File

@@ -11,19 +11,7 @@ if(!$in{'arch'}) {
my $command;
if ($in{'method'} eq 'plain-tar') {
$full = "$cwd/$in{'arch'}.tar";
$command = "tar cf ".quotemeta($full)." -C ".quotemeta($cwd);
}
elsif ($in{'method'} eq 'xz-tar') {
$full = "$cwd/$in{'arch'}.tar.xz";
$command = "tar cJf ".quotemeta($full)." -C ".quotemeta($cwd);
}
elsif ($in{'method'} eq 'zstd-tar') {
$full = "$cwd/$in{'arch'}.zst";
$command = "ZSTD_CLEVEL=19 tar --zstd -cf ".quotemeta($full)." -C ".quotemeta($cwd);
}
elsif ($in{'method'} eq 'tar') {
if ($in{'method'} eq 'tar') {
$full = "$cwd/$in{'arch'}.tar.gz";
$command = "tar czf ".quotemeta($full)." -C ".quotemeta($cwd);
}

View File

@@ -41,8 +41,7 @@ print &ui_table_row($text{'config_columns_to_display'},
&ui_checkbox('columns', 'last_mod_time', $text{'last_mod_time'}, $config{'columns'} =~ /last_mod_time/)
);
print &ui_table_row($text{'config_per_page'}, ui_textbox("per_page", $config{'per_page'}, 80));
print &ui_table_row($text{'file_detect_encoding'}, &ui_yesno_radio('config_portable_module_filemanager_editor_detect_encoding', $config{'config_portable_module_filemanager_editor_detect_encoding'} ne 'false' ? 'true' : 'false', 'true', 'false'));
print &ui_table_row($text{'file_showhiddenfiles'}, &ui_yesno_radio('config_portable_module_filemanager_show_dot_files', $config{'config_portable_module_filemanager_show_dot_files'} ne 'false' ? 'true' : 'false', 'true', 'false'));
print &ui_table_row($text{'file_detect_encoding'}, &ui_yesno_radio('config_portable_module_filemanager_editor_detect_encoding', $config{'config_portable_module_filemanager_editor_detect_encoding'}, 'true', 'false'));
print &ui_table_row($text{'config_bookmarks'}, &ui_textarea("bookmarks", $bookmarks, 5, 40));
print &ui_table_end();

View File

@@ -1,3 +1,2 @@
max=Maximum size for uploaded files,3,Unlimited
config_portable_module_filemanager_editor_detect_encoding=Fix to prevent encoding detection if forbidden,1,true-Yes,false-No
config_portable_module_filemanager_show_dot_files=Show hidden files,1,true-Yes,false-No
config_portable_module_filemanager_editor_detect_encoding=Fix to prevent encoding detection if forbidden,1,true-Yes,false-No

View File

@@ -1,4 +1,3 @@
columns=size,owner_user,permissions,last_mod_time
per_page=50
config_portable_module_filemanager_editor_detect_encoding=true
config_portable_module_filemanager_show_dot_files=true
config_portable_module_filemanager_editor_detect_encoding=true

View File

@@ -12,7 +12,7 @@ if ($archive_type =~ /x-bzip/) {
$cmd = "tar xvjfp ".quotemeta("$cwd/$in{'file'}").
" -C ".quotemeta($cwd);
}
elsif ($archive_type =~ /x-tar|\/gzip|x-xz|zstd|x-compressed-tar/) {
elsif ($archive_type =~ /x-tar|\/gzip|x-xz|x-compressed-tar/) {
$cmd = "tar xfp ".quotemeta("$cwd/$in{'file'}").
" -C ".quotemeta($cwd);
}

View File

@@ -397,7 +397,6 @@ sub print_interface {
index($type, "-x-tar") != -1 ||
(index($type, "-x-bzip") != -1 && has_command('bzip2')) ||
(index($type, "-gzip") != -1 && has_command('gzip')) ||
(index($type, "zstd") != -1 && has_command('zstd')) ||
(index($type, "-x-xz") != -1 && has_command('xz'))
) &&
has_command('tar')))

Binary file not shown.

Before

Width:  |  Height:  |  Size: 764 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 764 B

View File

@@ -18,8 +18,7 @@ unless (opendir ( DIR, $cwd )) {
my %secontext;
# Push file names with full paths to array, filtering out "." and ".."
my $show_dot_files = $userconfig{'config_portable_module_filemanager_show_dot_files'} ne 'false';
@list = map { &simplify_path("$cwd/$_") } grep { $_ ne '.' && $_ ne '..' && ($show_dot_files || ($_ !~ /^\./ && $_ !~ /\/\./)) } readdir(DIR);
@list = map { &simplify_path("$cwd/$_") } grep { $_ ne '.' && $_ ne '..' } readdir(DIR);
closedir(DIR);
# Filter out not allowed paths

View File

@@ -173,7 +173,6 @@ acls_action=Action
acls_manual=Manual params
acls_error=<tt>setfacl</tt> command is not found on your system
file_detect_encoding=Automatically detect file encoding
file_showhiddenfiles=Show hidden files
index_return=file listing
upload_dirs=Directory Upload
extract_uploaded=Extract Compressed

View File

@@ -13,7 +13,6 @@ $columns =~ s/\0/,/g;
'columns' => $columns,
'per_page' => $in{'per_page'},
'config_portable_module_filemanager_editor_detect_encoding' => $in{'config_portable_module_filemanager_editor_detect_encoding'},
'config_portable_module_filemanager_show_dot_files' => $in{'config_portable_module_filemanager_show_dot_files'},
);
my $max_allowed = $in{'max_allowed'};
if($max_allowed) {

View File

@@ -102,10 +102,7 @@
<input name="filename" type="text" class="form-control" data-placement="right" data-content="$text{'provide_file_name'}" data-trigger="manual">
</div>
<select name="method">
<option value="plain-tar">.tar</option>
<option value="xz-tar">.tar.xz</option>
<option selected value="tar">.tar.gz</option>
<option value="zstd-tar">.zstd</option>
<option value="tar">.tar.gz</option>
<option value="zip">.zip</option>
</select>
</form>

View File

@@ -39,10 +39,7 @@
<label>$text{'archive_name'}</label>
<input name="filename" type="text">
<select name="method">
<option value="plain-tar">.tar</option>
<option value="xz-tar">.tar.xz</option>
<option selected value="tar">.tar.gz</option>
<option value="zstd-tar">.zstd</option>
<option value="tar">.tar.gz</option>
<option value="zip">.zip</option>
</select>
</div>

View File

@@ -120,7 +120,7 @@ if (@filters || &get_global_spamassassin()) {
# Work out nice condition and action descriptions
local $cond;
($cond, $lastalways) = &describe_condition($f);
$cond = &ui_link("edit.cgi?idx=$f->{'index'}", $cond);
$cond = &ui_link("edit.cgi?idx=$f->{'index'}", &html_escape($cond));
local $action = &describe_action($f, \@folders);
# Create mover links

View File

@@ -1,5 +1,5 @@
line0=Configurable global options,11
perpage=Number of rules to display per page,3,Default (50)
perpage=Number of rules to display per page,3,50
view_condition=Display condition in rules list?,1,1-Yes,0-No
view_comment=Display comment in rules list?,1,1-Yes,0-No
comment_mod=Store comments as,1,0-# comments in save file,1-&#45;&#45;comment option

View File

@@ -225,17 +225,25 @@ else {
print &ui_hidden("table", $in{'table'});
print &ui_hidden("chain", $c);
my $pp = $config{'perpage'};
if (@rules > $pp) {
if (@rules > $config{'perpage'}) {
# Need to show arrows
print "<center>\n";
$s = int($in{'start'});
$e = $in{'start'} + $pp - 1;
$e = $in{'start'} + $config{'perpage'} - 1;
$e = @rules-1 if ($e >= @rules);
print &ui_page_flipper(
&text('index_position', $s+1, $e+1, scalar(@rules)),
undef, undef,
$s ? "?start=".($s - $pp) : "",
$e < @rules-1 ? "?start=".($s + $pp) : "");
if ($s) {
print &ui_link("?start=".
($s - $config{'perpage'}),
"<img src=/images/left.gif border=0 align=middle>");
}
print "<font size=+1>",&text('index_position', $s+1, $e+1,
scalar(@rules)),"</font>\n";
if ($e < @rules-1) {
print &ui_link("?start=".
($s + $config{'perpage'}),
"<img src=/images/right.gif border=0 align=middle>");
}
print "</center>\n";
}
else {
# Can show them all

View File

@@ -1,7 +1,6 @@
index_title=Linux IPTables Firewall
index_title_v=IPv4 Firewall
index_title_v6=IPv6 Firewall
index_position=Showing rules $1 to $2 of $3
index_editing=rules file $1
index_ecommand=The command $1 was not found on your system. Webmin needs this command to configure IPtables.
index_ekernel=An error occured when checking your current IPtables configuration : $1 This may indicate that your kernel does not support IPtables.

View File

@@ -96,7 +96,6 @@ if ($current_lang_info->{'rtl'} || $current_lang eq "ar") {
# Page header
print "<html>\n";
print "<head>\n";
print &ui_switch_theme_javascript();
print "<title>$title</title>\n";
my $imgdir = "@{[&get_webprefix()]}/images";
my $prod = 'webmin';

View File

@@ -84,7 +84,7 @@ if (@has > 1) {
}
print "</div>";
}
print &ui_switch_theme_javascript();
print "<div class='wrapper leftmenu'>\n";
print "<table id='main' width='100%'><tbody><tr><td>\n";

File diff suppressed because one or more lines are too long

View File

@@ -22,23 +22,6 @@ our $ui_formcount;
$main::WRAPPER_OPEN = 0;
$main::COLUMNS_WRAPPER_OPEN = 0;
sub theme_ui_print_header
{
my ($text, @args) = @_;
&header(@args);
print <<EOL;
<script>
(function () {
const body = document.querySelector('body');
try {
body && body.classList.add('$module_name');
} catch (e) {}
})();
</script>
EOL
print &ui_post_header($text);
}
# theme_ui_post_header([subtext])
# Returns HTML to appear directly after a standard header() call
sub theme_ui_post_header

View File

@@ -697,16 +697,4 @@ body > .mode > b[data-mode="server-manager"] > a > .ff-cloudmin {
}
.ql-compose-container .ql-snow .ql-tooltip {
z-index: 99;
}
/* Shell module tweaks */
.shell pre {
overflow-x: auto;
overflow-y: hidden;
}
.shell input[name="cmd"] {
max-width: 64.5vw;
}
.shell select[name="pcmd"] {
max-width: 65vw;
}
}

View File

@@ -277,51 +277,24 @@ my $html_editor_init_script =
theme: 'snow'
});
// Google Mail like key bind for creating numbered list (Ctrl+Shift+7)
// Google Mail editor like keybind for quoting
editor.keyboard.addBinding({
key: '7',
shiftKey: true,
ctrlKey: !isMac,
metaKey: isMac,
key: '9',
shiftKey: true,
ctrlKey: !isMac,
metaKey: isMac,
format: ['blockquote'],
}, function(range, context) {
const currentFormat = this.quill.getFormat(range.index);
if (currentFormat.list === 'ordered') {
this.quill.format('list', false);
} else {
this.quill.format('list', 'ordered');
}
this.quill.format('blockquote', false);
});
// Google Mail like key bind for creating bullet list (Ctrl+Shift+8)
editor.keyboard.addBinding({
key: '8',
shiftKey: true,
ctrlKey: !isMac,
metaKey: isMac,
key: '9',
shiftKey: true,
ctrlKey: !isMac,
metaKey: isMac,
}, function(range, context) {
const currentFormat = this.quill.getFormat(range.index);
if (currentFormat.list === 'bullet') {
this.quill.format('list', false);
} else {
this.quill.format('list', 'bullet');
}
this.quill.format('blockquote', true);
});
// Google Mail like key bind for creating blockquote (Ctrl+Shift+9)
editor.keyboard.addBinding({
key: '9',
shiftKey: true,
ctrlKey: !isMac,
metaKey: isMac,
}, function(range, context) {
const currentFormat = this.quill.getFormat(range.index);
if (currentFormat.blockquote) {
this.quill.format('blockquote', false);
} else {
this.quill.format('blockquote', true);
}
});
editor.on('text-change', function() {
// This should most probably go to onSubmit event
targ.value = editor.root.innerHTML + "<br>";

View File

@@ -130,14 +130,13 @@ elsif ($init_mode eq "systemd") {
undef,
{ 'pidfile' => "$var_directory/miniserv.pid",
'opts' => {
'env' => '"PERLLIB=' . $root_directory . '"',
'stop' => "$kill \$MAINPID",
'reload' => "$kill -HUP \$MAINPID",
'type' => 'forking',
'restart' => 'always',
'restartsec' => '2s',
'timeout' => '15s',
'timeoutstopsec' => '300s',
'env' => '"PERLLIB=' . $root_directory . '"',
'stop' => "$kill \$MAINPID",
'reload' => "$kill -HUP \$MAINPID",
'type' => 'forking',
'restart' => 'always',
'restartsec' => '2s',
'timeout' => '15s',
}},
);
}

View File

@@ -2380,7 +2380,6 @@ if (ref($opts)) {
&print_tempfile(CFILE, "Restart=$opts->{'restart'}\n") if ($opts->{'restart'});
&print_tempfile(CFILE, "RestartSec=$opts->{'restartsec'}\n") if ($opts->{'restartsec'});
&print_tempfile(CFILE, "TimeoutSec=$opts->{'timeout'}\n") if ($opts->{'timeout'});
&print_tempfile(CFILE, "TimeoutStopSec=$opts->{'timeoutstopsec'}\n") if ($opts->{'timeoutstopsec'});
&print_tempfile(CFILE, "StandardOutput=file:$opts->{'logstd'}\n") if ($opts->{'logstd'});
&print_tempfile(CFILE, "StandardError=file:$opts->{'logerr'}\n") if ($opts->{'logerr'});
}
@@ -2460,8 +2459,10 @@ my $systemd_local_conf = "/etc/systemd/system";
my $systemd_unit_dir1 = "/usr/lib/systemd/system";
my $systemd_unit_dir2 = "/lib/systemd/system";
if ($name) {
foreach my $p ($systemd_local_conf, $systemd_unit_dir1,
$systemd_unit_dir2) {
foreach my $p (
$systemd_local_conf,
$systemd_unit_dir1,
$systemd_unit_dir2) {
if (-r "$p/$name.service" ||
-r "$p/$name" ||
-r "$p/$name.target" ||

View File

@@ -41,7 +41,7 @@ elsif ($init_mode eq "local") {
&close_tempfile(LOCAL);
print STDERR "Deleted from bootup script $config{'local_script'}\n";
}
elsif ($init_mode eq "init" || $init_mode eq "upstart") {
elsif ($init_mode eq "init") {
# Delete bootup action
foreach (&action_levels('S', $product)) {
/^(\S+)\s+(\S+)\s+(\S+)$/;

View File

@@ -31,9 +31,5 @@ if ($product) {
&flush_file_lines($temp);
copy_source_dest($temp, "$systemd_root/$product.service");
system("systemctl daemon-reload >/dev/null 2>&1");
}
elsif (-d "/etc/init.d") {
copy_source_dest("$root_directory/webmin-init", "/etc/init.d/$product");
system("chkconfig --add $product >/dev/null 2>&1");
}
};
}

View File

@@ -983,7 +983,7 @@ elsif ($mode == 3) {
{ 'headers' => [ [ 'Content-type', 'application/zip' ],
[ 'Content-Transfer-Encoding', 'base64' ] ],
'data' => $data } ] };
$main::error_must_die = 1;
$main::errors_must_die = 1;
if (&foreign_check("mailboxes")) {
&foreign_require("mailboxes", "mailboxes-lib.pl");
eval { &mailboxes::send_mail($mail); };

View File

@@ -111,7 +111,7 @@ elsif ($mode == 3) {
'data' => $body },
{ 'headers' => [ [ 'Content-type', 'text/plain' ] ],
'data' => $data } ] };
$main::error_must_die = 1;
$main::errors_must_die = 1;
if (&foreign_check("mailboxes")) {
&foreign_require("mailboxes", "mailboxes-lib.pl");
eval { &mailboxes::send_mail($mail); };

View File

@@ -392,6 +392,4 @@ file_truncated_message_tail=fetched ending $1 of data, truncated $2 out of $3
defcert_error=Default $1 bundled SSL certificate is being used. It is highly advised to update default <tt>$2</tt> certificate before proceeding with login.
main_error_details=Error details
__norefs=1

View File

@@ -3006,44 +3006,6 @@ if ($switched) {
return $rv;
}
# is_gzipped_file(file)
# Returns 1 if a file is gzip compressed
sub is_gzipped_file
{
my ($file) = @_;
my $fh;
my $rv = open($fh, "<", $file);
return 0 if (!$rv);
my $two;
read($fh, $two, 2);
close($fh);
return $two eq "\037\213" ? 1 : 0;
}
# gunzip_mail_file(file)
# Uncompress a mail file in place
sub gunzip_mail_file
{
my ($file) = @_;
my $switched = &switch_to_mail_user();
my $outfile = $file.".$$.uncompressed";
my @st = stat($file);
my $ex = system("gunzip -c ".quotemeta($file)."> ".quotemeta($outfile)." 2>/dev/null");
if ($ex) {
unlink($outfile);
}
else {
rename($outfile, $file);
&set_ownership_permissions($st[4], $st[5], $st[2], $file);
utime($st[8], $st[9], $file);
}
if ($switched) {
$) = 0;
$> = 0;
}
return !$ex;
}
# create_as_mail_user(fh, file)
# Creates a new file, but ensures that it does not yet exist first, and then
# sets the ownership to the mail user

View File

@@ -1543,33 +1543,6 @@ if ($src->{'sortable'}) {
}
}
# mailbox_uncompress_folder(&folder)
# If a folder or it's files are gzipped, uncompress them in place
sub mailbox_uncompress_folder
{
my ($folder) = @_;
if ($folder->{'type'} == 1 || $folder->{'type'} == 3) {
my @files = $folder->{'type'} == 1 ?
&get_maildir_files($folder->{'file'}) :
&get_mhdir_files($folder->{'file'});
if ($folder->{'type'} == 1) {
foreach my $sf (glob("$folder->{'file'}/.??*")) {
push(@files, &get_maildir_files($sf));
}
}
foreach my $f (@files) {
if (&is_gzipped_file($f)) {
&gunzip_mail_file($f);
}
}
}
elsif ($folder->{'type'} == 0) {
if (&is_gzipped_file($folder->{'file'})) {
&gunzip_mail_file($folder->{'file'});
}
}
}
# mailbox_copy_mail(&source, &dest, mail, ...)
# Copy mail from one folder to another
sub mailbox_copy_mail
@@ -3393,10 +3366,7 @@ local $dmail = {
[ 'Content-Transfer-Encoding' => '7bit' ] ],
'data' => $dsn }
] };
eval {
local $main::error_must_die = 1;
&send_mail($dmail);
};
eval { local $main::errors_must_die = 1; &send_mail($dmail); };
return $to;
}

View File

@@ -320,7 +320,7 @@ search_elatest=Ontbrekende of ongeldige aantal boodskappe om te soek
search_withstatus=, met status $1
folder_inbox=posbus
folder_sent=Gestuur
folder_sent=Gestuurde pos
folder_drafts=Drafts
folder_trash=asblik

View File

@@ -320,7 +320,7 @@ search_elatest=عدد الرسائل المفقودة أو غير الصحيحة
search_withstatus=, with status $1
folder_inbox=صندوق الوارد
folder_sent=مرسل
folder_sent=البريد المرسل
folder_drafts=المسودات
folder_trash=قمامة، يدمر، يهدم

View File

@@ -320,7 +320,7 @@ search_elatest=Адсутнічае альбо недапушчальная ко
search_withstatus=, са статусам $1
folder_inbox=Уваходныя
folder_sent=Адпраўлена
folder_sent=Даслана пошта
folder_drafts=Чарнавікі
folder_trash=Хлам

View File

@@ -320,7 +320,7 @@ search_elatest=Липсващ или невалиден брой съобщен
search_withstatus=, със статус $1
folder_inbox=Входящи
folder_sent=Изпратено
folder_sent=Изпратена поща
folder_drafts=дама
folder_trash=боклук

View File

@@ -319,6 +319,7 @@ search_elatest=Hi falta el nombre de missatges a buscar o bé és invàlid
search_withstatus=, amb estat $1
folder_inbox=Entrada
folder_sent=Enviat
folder_drafts=Drafts
folder_trash=Trash

View File

@@ -1,7 +1,5 @@
index_return=llista d'usuaris
folder_sent=Enviat
editor_heading=Encapçalament
editor_paragraph=Paràgraf
editor_fontfamily_default=Per defecte

View File

@@ -295,6 +295,7 @@ search_elatest=Chybějící nebo nevhodný počet zpráv k prohledání
search_withstatus=, se stavem $1
folder_inbox=Doručená pošta
folder_sent=Odesláné pošta
folder_drafts=Koncepty
folder_trash=Koš

View File

@@ -29,8 +29,6 @@ reply_html1=Vytvořte HTML
search_msg6=Výsledky hledání $1 v poli $2
search_attach=Musí mít přílohy?
folder_sent=Odesláno
left_mail=Pošta
left_search=Vyhledávání:
left_folders=Správa složek

View File

@@ -320,7 +320,7 @@ search_elatest=Manglende eller ugyldigt antal meddelelser til søgning
search_withstatus=, med status $1
folder_inbox=Indbakke
folder_sent=Sendt
folder_sent=Sendt post
folder_drafts=Kladder
folder_trash=Affald

View File

@@ -319,6 +319,7 @@ search_elatest=Fehlende oder ungültige Anzahl an Mails für die Suche
search_withstatus=, mit Status $1
folder_inbox=Posteingang
folder_sent=Versendete Mail
folder_drafts=Entwürfe
folder_trash=Papierkorb

View File

@@ -1,7 +1,5 @@
index_return=Benutzerliste
folder_sent=Gesendet
editor_heading=Überschrift
editor_paragraph=Absatz
editor_fontfamily_default=Standard

View File

@@ -268,6 +268,7 @@ search_elatest=Λείπει ή είναι άκυρος ο αριθμός των
search_withstatus=, με κατάσταση $1
folder_inbox=Εισερχόμενα
folder_sent=Απεσταλμένα
folder_drafts=Πρόχειρα
folder_trash=Απορρίματα

View File

@@ -60,8 +60,6 @@ confirm_warnallf=Είστε βέβαιοι ότι θέλετε να διαγρά
search_msg6=Αποτελέσματα αναζήτησης για $1 στο πεδίο $2
search_attach=Πρέπει να έχετε συνημμένα;
folder_sent=Απεσταλμένα
sform_header=Προηγμένες επιλογές αναζήτησης ηλεκτρονικού ταχυδρομείου
sform_andmode=Λειτουργία κριτηρίων
sform_folder2=Αναζήτηση σε φάκελο (-ες)

View File

@@ -320,7 +320,7 @@ search_elatest=Missing or invalid number of messages to search
search_withstatus=, with status $1
folder_inbox=Inbox
folder_sent=Sent
folder_sent=Sent mail
folder_drafts=Drafts
folder_trash=Trash

View File

@@ -238,7 +238,7 @@ search_elatest=Número de mensajes faltantes o no válidos para buscar
search_withstatus=, con estado $1
folder_inbox=Bandeja de entrada
folder_sent=Enviado
folder_sent=Correo enviado
folder_drafts=Borradores
folder_trash=Basura

View File

@@ -320,7 +320,7 @@ search_elatest=Bilatu beharreko mezu kopuru falta edo baliogabea
search_withstatus=, egoera $1 egoerarekin
folder_inbox=Sarrerako ontzia
folder_sent=Bidali
folder_sent=Bidalitako mezuak
folder_drafts=Turkiarrak
folder_trash=Trash

View File

@@ -320,7 +320,7 @@ search_elatest=تعداد پیام های نامعتبر یا نامعتبر ا
search_withstatus=, with status $1
folder_inbox=صندوق ورودی
folder_sent=ارسال شد
folder_sent=نامه ارسال شده
folder_drafts=پیش نویس
folder_trash=زباله ها

View File

@@ -205,6 +205,7 @@ search_nolatest=Kaikki kansiossa
search_latestnum=Vain viimeisimmät
search_elatest=Puuttuva tai virheellinen määrä etsittäviä viestejä
folder_sent=Lähetetyt
folder_drafts=Luonnokset
folder_trash=Roskakori

View File

@@ -125,7 +125,6 @@ search_onestatus=Vain tila
search_withstatus=, tila $1
folder_inbox=Saapuneet
folder_sent=Lähetetty
detach_err=Tiedoston irrottaminen epäonnistui
detach_edir=Ei tiedostoa tai hakemistoa tallennettavaksi syötettyyn

View File

@@ -320,6 +320,7 @@ search_elatest=nombre de messages à rechercher manquant ou invalide
search_withstatus=, avec statut $1
folder_inbox=Boite de Réception
folder_sent=Courriers Envoyés
folder_drafts=Brouillons
folder_trash=Corbeille

View File

@@ -1,5 +1,3 @@
folder_sent=Envoyé
editor_heading=Titre
editor_paragraph=Paragraphe
editor_fontfamily_default=Défaut

View File

@@ -320,7 +320,7 @@ search_elatest=מספר הודעות חסר או לא חוקי לחיפוש
search_withstatus=, with status $1
folder_inbox=תיבת הדואר הנכנס
folder_sent=נשלח
folder_sent=שלח מייל
folder_drafts=טיוטות
folder_trash=זבל

View File

@@ -320,7 +320,7 @@ search_elatest=Nedostaje ili nevažeći broj poruka za pretraživanje
search_withstatus=, sa statusom $1
folder_inbox=Ulazni spremnik
folder_sent=Poslano
folder_sent=Poslana pošta
folder_drafts=nacrti
folder_trash=Otpad

View File

@@ -147,6 +147,7 @@ search_attach=Szeretne csatolmányokat?
search_allstatus=Minden
folder_inbox=Bejövő levelek
folder_sent=Elküldött levelek
folder_drafts=Piszkozatok
folder_trash=Kuka

View File

@@ -181,8 +181,6 @@ search_latestnum=Csak a legújabb
search_elatest=Hiányzik vagy érvénytelen a keresett üzenetek száma
search_withstatus=, állapotával $1
folder_sent=Küldött
detach_err=A fájl leválasztása nem sikerült
detach_edir=Nincs fájl vagy könyvtár, amelyet menteni kellene a megadott fájlba
detach_eopen=A $1 megnyitása nem sikerült : $2

View File

@@ -316,6 +316,7 @@ search_elatest=Numero di messaggi da cercare mancante o non valido
search_withstatus=, con stato $1
folder_inbox=Posta in arrivo
folder_sent=Posta inviata
folder_drafts=Bozze
folder_trash=Cestino

View File

@@ -6,8 +6,6 @@ view_nobody=Questo messaggio non ha contenuti del corpo.
search_msg6=Risultati della ricerca per $1 nel campo $2
folder_sent=Inviato
left_mail=posta
left_search=Ricerca:
left_folders=Gestisci cartelle

View File

@@ -295,6 +295,7 @@ search_elatest=Missing or invalid number of messages to search
search_withstatus=, with status $1
folder_inbox=Inbox
folder_sent=Sent mail
folder_drafts=Drafts
folder_trash=Trash

View File

@@ -29,8 +29,6 @@ reply_html1=HTMLを作成
search_msg6=$2フィールドの$1の検索結果
search_attach=添付ファイルが必要ですか?
folder_sent=送信済み
left_mail=郵便物
left_search=探す:
left_folders=フォルダーを管理する

View File

@@ -285,6 +285,7 @@ search_elatest=검색 메시지수가 지정되지 않았거나 유효하지 않
search_withstatus=, 상태 $1로
folder_inbox=인박스
folder_sent=메일 보내기
folder_drafts=초안
folder_trash=휴지통

View File

@@ -40,8 +40,6 @@ search_ewhat=입력 된 행과 일치하는 텍스트가 없습니다 $1
search_msg6=$2 필드에서 $1에 대한 검색 결과
search_attach=첨부 파일이 있어야합니까?
folder_sent=전송된
sform_andmode=기준 모드
left_mail=우편

View File

@@ -320,7 +320,7 @@ search_elatest=Trūksta arba netinkamas ieškomų pranešimų skaičius
search_withstatus=, su būsena $1
folder_inbox=Pašto dėžutę
folder_sent=Išsiųsta
folder_sent=Išsiųsti laiškai
folder_drafts=Juodraščiai
folder_trash=Šiukšlių dėžė

View File

@@ -320,7 +320,7 @@ search_elatest=Trūkst vai nav derīgs meklējamo ziņojumu skaits
search_withstatus=, ar statusu $1
folder_inbox=Iesūtne
folder_sent=Nosūtīts
folder_sent=Nosūtītais pasts
folder_drafts=Melnraksti
folder_trash=Atkritumi

View File

@@ -320,7 +320,7 @@ search_elatest=Bilangan mesej yang hilang atau tidak sah untuk dicari
search_withstatus=, dengan status $1
folder_inbox=Peti masuk
folder_sent=Dihantar
folder_sent=Menghantar surat
folder_drafts=Draf
folder_trash=Sampah

View File

@@ -320,7 +320,7 @@ search_elatest=Numru ta 'messaġġi nieqsa jew invalidi biex tfittex
search_withstatus=, bi status $1
folder_inbox=Inbox
folder_sent=Mibgħuta
folder_sent=Intbagħat il-posta
folder_drafts=Abbozzi
folder_trash=Trash

View File

@@ -317,6 +317,7 @@ search_elatest=Ontbrekende of ongeldige aantal berichten om te zoeken
search_withstatus=, met status $1
folder_inbox=Inbox
folder_sent=Verstuur email
folder_drafts=Ontwerpen
folder_trash=Vuilnis

View File

@@ -4,8 +4,6 @@ mail_specialsync=Synchronisatie speciaal
search_msg6=Zoekresultaten voor $1 in het veld $2
folder_sent=Verstuurd
left_mail=Mail
left_search=Zoeken:
left_folders=Beheer mappen

View File

@@ -320,6 +320,7 @@ search_elatest=Manglende eller ugyldig antall meldinger å søke gjennom
search_withstatus=, med status $1
folder_inbox=Innboks
folder_sent=Sendt e-post
folder_drafts=Kladd
folder_trash=Papirkurv

View File

@@ -1,5 +1,3 @@
folder_sent=Sendt
editor_heading=Overskrift
editor_paragraph=Avsnitt
editor_fontfamily_default=Misligholde

View File

@@ -179,7 +179,7 @@ search_elatest=Brakująca lub niepoprawna liczba wiadomości do przeszukania
search_withstatus=, ze statusem $1
folder_inbox=W pudełku
folder_sent=Wysłano
folder_sent=Wysłany mail
folder_drafts=Warcaby
folder_trash=Śmieci

View File

@@ -287,7 +287,7 @@ search_elatest=Número de mensagens ausente ou inválido para pesquisa
search_withstatus=, com status $1
folder_inbox=Caixa de entrada
folder_sent=Enviado
folder_sent=Correspondência enviada
folder_drafts=Rascunhos
folder_trash=Lixo

View File

@@ -1,2 +1,3 @@
folder_inbox=Caixa de Entrada
folder_sent=E-mais Enviados
folder_trash=Lixo

View File

@@ -319,7 +319,6 @@ search_latestnum=Apenas os mais recentes
search_elatest=Número de mensagens ausente ou inválido para pesquisa
search_withstatus=, com status $1
folder_sent=Enviado
folder_drafts=Rascunhos
detach_err=Falha ao desanexar arquivo

View File

@@ -320,7 +320,7 @@ search_elatest=Număr de mesaje lipsă sau nevalide de căutat
search_withstatus=, cu statut $1
folder_inbox=Inbox
folder_sent=Trimis
folder_sent=E-mail trimis
folder_drafts=Schițe
folder_trash=Gunoi

View File

@@ -320,7 +320,7 @@ search_elatest=Отсутствует или неверное количеств
search_withstatus=со статусом $1
folder_inbox=входящие
folder_sent=Отправил
folder_sent=Отправленные письма
folder_drafts=Черновики
folder_trash=дрянь

View File

@@ -320,7 +320,7 @@ search_elatest=Chýba alebo je neplatný počet správ na vyhľadávanie
search_withstatus=, so stavom $1
folder_inbox=Doručená pošta
folder_sent=Odoslané
folder_sent=Odoslaná pošta
folder_drafts=dáma
folder_trash=Smeti

View File

@@ -320,7 +320,7 @@ search_elatest=Manjkajoče ali neveljavno število sporočil za iskanje
search_withstatus=, s statusom $1
folder_inbox=Prejeto
folder_sent=Poslano
folder_sent=Poslana pošta
folder_drafts=Osnutki
folder_trash=Smeti

View File

@@ -260,7 +260,7 @@ search_elatest=Det saknas eller ogiltigt antal meddelanden att söka efter
search_withstatus=, med status $1
folder_inbox=Inkorg
folder_sent=Skickat
folder_sent=Skickade post
folder_drafts=utkast
folder_trash=Skräp

View File

@@ -320,7 +320,7 @@ search_elatest=จำนวนข้อความที่ขาดหาย
search_withstatus=ด้วยสถานะ $1
folder_inbox=กล่องขาเข้า
folder_sent=ส่งแล้ว
folder_sent=ส่งอีเมล
folder_drafts=ร่าง
folder_trash=ขยะ

View File

@@ -275,6 +275,7 @@ search_elatest=Arama için hatalı veya gecersiz sayıda mesaj
search_withstatus=, durum kodu $1 olan
folder_inbox=Gelen Kutusu
folder_sent=Gönderilen postalar
folder_drafts=Taslaklar
folder_trash=Çop Kutusu

View File

@@ -52,8 +52,6 @@ send_title2=Posta Kaydedildi
search_msg6=$2 alanında $1 için arama sonuçları
search_attach=Ekleri olmalı mı?
folder_sent=Gönderilmiş
sform_header=Gelişmiş e-posta arama seçenekleri
sform_andmode=Ölçüt modu
sform_folder2=Klasörlerde ara

View File

@@ -320,7 +320,7 @@ search_elatest=Відсутня або недійсна кількість по
search_withstatus=, зі статусом $1
folder_inbox=Вхідні
folder_sent=Надісланий
folder_sent=Надіслати пошту
folder_drafts=Чернетки
folder_trash=Сміття

View File

@@ -320,7 +320,7 @@ search_elatest=تلاش کرنے کیلئے پیغامات کی گمشدہ یا
search_withstatus=, with status $1
folder_inbox=ان باکس
folder_sent=بھیجا
folder_sent=میل بھیجا
folder_drafts=ڈرافٹس
folder_trash=کوڑے دان

View File

@@ -320,7 +320,7 @@ search_elatest=Thiếu hoặc không hợp lệ số lượng tin nhắn để t
search_withstatus=, với trạng thái $1
folder_inbox=Hộp thư đến
folder_sent=Đã gửi
folder_sent=Gửi mail
folder_drafts=Dự thảo
folder_trash=Rác

View File

@@ -234,7 +234,7 @@ search_elatest=要搜索的消息丢失或数量无效
search_withstatus=,状态为$1
folder_inbox=收件箱
folder_sent=发送
folder_sent=发送邮件
folder_drafts=草稿
folder_trash=垃圾

View File

@@ -213,6 +213,7 @@ search_local=在本地資料夾
search_all=在所有資料夾
folder_inbox=收件夾
folder_sent=傳送郵件
folder_drafts=草稿
folder_trash=垃圾桶

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