Compare commits

..

26 Commits
2.011 ... 2.012

Author SHA1 Message Date
iliajie
d333f1fe16 Update CHANGELOG.md (2.012) 2023-01-19 01:39:18 +02:00
iliajie
286c5c6c51 Fix to revert incorrect fix beed9af645 (commitcomment-97277268) 2023-01-19 01:10:05 +02:00
Jamie Cameron
06d212ddfc New version bump 2023-01-18 14:24:39 -08:00
Jamie Cameron
35a259eabc Merge branch 'master' of github.com:webmin/webmin 2023-01-18 13:38:33 -08:00
Jamie Cameron
40bf45ae42 Fix variable name 2023-01-18 13:38:28 -08:00
iliajie
a875b8e7eb Fix a bug in routing_config_files sub 2023-01-18 23:37:31 +02:00
iliajie
faa7b57970 Fix to remove ignore errors 2023-01-18 21:57:52 +02:00
Jamie Cameron
7bf010f9f8 Make sure domains are unique 2023-01-17 22:21:10 -08:00
Jamie Cameron
8ced702aa1 Support Debian 12 2023-01-17 20:29:49 -08:00
Jamie Cameron
ed042f3a53 Include all debian config files in backups 2023-01-17 20:10:46 -08:00
iliajie
67a0eca90c Fix not to enable warnings blindly on all code 2023-01-17 16:22:55 +02:00
iliajie
ff5119da7c Add support for defining hostname for WebSocket connection
https://forum.virtualmin.com/t/using-new-command-line-not-working-behind-reverse-proxy/118673/2
2023-01-17 16:09:46 +02:00
Jamie Cameron
4bf1a38288 Merge branch 'master' of github.com:webmin/webmin 2023-01-16 18:38:56 -08:00
Jamie Cameron
eee5331b28 Use correct args to modify_interface_def https://github.com/webmin/webmin/issues/1818 2023-01-16 18:38:20 -08:00
iliajie
beed9af645 Fix to make sure that interface file is read only once 2023-01-16 22:42:43 +02:00
iliajie
087f1e7776 Fix to stop reading file on error 2023-01-16 22:07:00 +02:00
Jamie Cameron
c80eb8b6ae Limit files in source-directory to same pattern debian uses 2023-01-16 11:01:20 -08:00
Jamie Cameron
e43fbfdaa5 Stop doing expensive package re-fetch on upgrade https://forum.virtualmin.com/t/updates-webmin-virtualmin-hangs-for-a-long-time/118662 2023-01-16 10:56:12 -08:00
Jamie Cameron
55553c43a1 Merge branch 'master' of github.com:webmin/webmin 2023-01-16 10:54:03 -08:00
Jamie Cameron
a035e2f6c5 Allow postinstall scripts to know when webmin is being upgraded 2023-01-16 10:53:54 -08:00
iliajie
cee528f46c Fix missing module reference as requesting Let's Encrypt certificate 2023-01-16 20:51:44 +02:00
Jamie Cameron
2406f19084 Everything is really on webmin.com 2023-01-16 10:38:58 -08:00
Jamie Cameron
3bdc75bb15 Track files already included to avoid include loops 2023-01-15 16:48:56 -08:00
Jamie Cameron
4fcb99b89a source-directory may refer to a directory, not a pattern 2023-01-15 16:45:02 -08:00
iliajie
335136be14 Fix the loop bug when sourcing other configs ; remove stderr print 2023-01-16 00:22:22 +02:00
iliajie
e88ae050a9 Fix to remove unnecessary copyright from the header 2023-01-12 20:36:38 +02:00
19 changed files with 67 additions and 46 deletions

View File

@@ -1,5 +1,13 @@
## Changelog
#### 2.012 (January 18, 2023)
* Fix to set the correct algorithm when setting up RNDC #1817
* Fix the loop bug when sourcing other network configs in Debian
* Fix to include all Debian network config files in backups
* Fix to stop doing expensive package re-fetch on upgrades
* Add support for defining hostname for WebSocket connection
* Add Debian 12 support
#### 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

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.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.
2. By downloading, extracting [source file](https://prdownloads.sourceforge.net/webadmin/webmin-2.012.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

View File

@@ -109,9 +109,11 @@ elsif ($has_new_debian_iptables) {
local ($debpri) = grep { $_->[0] eq $pri->{'fullname'} }
&net::get_interface_defs();
if ($debpri && !&started_at_boot()) {
push(@{$debpri->[3]},
my ($name, $addrfam, $method, $options, $file,$line) = @$debpri;
push(@$options,
[ "post-up", "ip${ipvx}tables-restore < $ipvx_save" ]);
&net::modify_interface_def(@$debpri);
&net::modify_interface_def($name, $addrfam, $method, $options,
0, $file);
}
}
else {

View File

@@ -2,6 +2,8 @@
# Show the left-side menu of Virtualmin domains, plus modules
use strict;
use warnings;
no warnings 'redefine';
no warnings 'uninitialized';
# Globals
our %in;

View File

@@ -3,6 +3,8 @@
use strict;
use warnings;
no warnings 'redefine';
no warnings 'uninitialized';
require "gray-theme/gray-theme-lib.pl";
require "gray-theme/theme.pl";
&ReadParse();

View File

@@ -4,7 +4,6 @@
#
# Rene Mayrhofer, July 2000
# Some code has been taken from redhat-linux-lib.pl
$network_interfaces_config = '/etc/network/interfaces';
$modules_config = '/etc/modprobe.d/arch/i386';
if (!-d $modules_config) {
@@ -604,7 +603,9 @@ my ($domain) = @_;
sub routing_config_files
{
return ( $network_interfaces_config, $sysctl_config );
my @defs = &get_interface_defs();
my @files = &unique(map { $_->[4] } @defs);
return ( @files, $sysctl_config );
}
sub network_config_files
@@ -791,16 +792,19 @@ $sysctl{'net.ipv4.ip_forward'} = $in{'forward'};
# line the line number in the file
sub get_interface_defs
{
my ($file) = @_;
my ($file, $done) = @_;
$file ||= $network_interfaces_config;
$done ||= { };
return ( ) if ($done->{$file}++);
my $fh;
my @ret;
open($fh, $file) || return ();
# read the file line by line
my $line = <$fh>;
my $lnum = 0;
my $err;
while (defined $line) {
print STDERR "file=$file line=$line\n";
last if ($err);
chomp($line);
# skip comments
if ($line =~ /^\s*#/ || $line =~ /^\s*$/) {
@@ -828,15 +832,22 @@ while (defined $line) {
next;
}
}
elsif ($line =~ /^\s*source\s+(\S+)/) {
elsif ($line =~ /^\s*(source|source-directory)\s+(\S+)/) {
# Expand includes
$line = <$fh>;
$lnum++;
my $src = $1;
my @srcs = glob($src);
my ($dir, $src) = ($1, $2);
my @srcs;
if ($dir eq "source-directory") {
opendir(SRCDIR, $src);
@srcs = grep { /^[a-zA-Z0-9_-]+$/ } readdir(SRCDIR);
closedir(SRCDIR);
}
else {
@srcs = glob($src);
}
foreach $src (@srcs) {
print STDERR "including $src\n";
my @inc = &get_interface_defs($src);
my @inc = &get_interface_defs($src, $done);
push(@ret, @inc);
}
}
@@ -875,6 +886,7 @@ while (defined $line) {
$file, $lnum]);
}
else {
$err++;
error("Error reading file $network_interfaces_config: unexpected line '$line'");
}
}

View File

@@ -175,6 +175,7 @@ Debian Linux 10.0 debian-linux 10.0 `cat /etc/debian_version 2>/dev/null` =~ /
Debian Linux 10.0 debian-linux 10.0 `cat /etc/debian_version 2>/dev/null` =~ /^(sid)/i
Debian Linux 10.0 debian-linux 10.0 `cat /etc/debian_version 2>/dev/null` =~ /^(buster)/i
Debian Linux 11.0 debian-linux 11.0 `cat /etc/debian_version 2>/dev/null` =~ /^(bullseye)/i
Debian Linux 12.0 debian-linux 12.0 `cat /etc/debian_version 2>/dev/null` =~ /^(bookworm)/i
# SuSE enterprise versions
SuSE OpenExchange Linux $1 suse-linux 8.2 `cat /etc/SLOX-release 2>/dev/null` =~ /VERSION\s+=\s+(\S+)/i

View File

@@ -1,15 +0,0 @@
do 'package-updates-lib.pl';
sub module_install
{
# Force clear all caches, as collected information may have changed
&flush_package_caches();
if ($software::update_system ne 'yum' &&
!&foreign_check("security-updates")) {
# Re-generate cache of possible packages
&list_possible_updates();
}
}

View File

@@ -1,7 +1,6 @@
#!/bin/sh
# shellcheck disable=SC1090 disable=SC2059 disable=SC2164 disable=SC2181
# setup-repos.sh
# Copyright Ilia Rostovtsev <ilia@virtualmin.com>
# Configures Webmin repository for RHEL and Debian systems (derivatives)
webmin_download="https://download.webmin.com"

View File

@@ -908,6 +908,7 @@ else {
if (!$ENV{'nopostinstall'}) {
print "Running postinstall scripts ..\n";
chdir($wadir);
$ENV{'WEBMIN_UPGRADING'} = $upgrading;
system("$perl ".&quote_path("$wadir/run-postinstalls.pl"));
print ".. done\n";
print "\n";

View File

@@ -983,7 +983,7 @@ fi
if [ "$nopostinstall" = "" ]; then
echo "Running postinstall scripts .."
(cd "$wadir" ; WEBMIN_CONFIG=$config_dir WEBMIN_VAR=$var_dir "$wadir/run-postinstalls.pl")
(cd "$wadir" ; WEBMIN_CONFIG=$config_dir WEBMIN_VAR=$var_dir WEBMIN_UPGRADING="$upgrading" "$wadir/run-postinstalls.pl")
echo ".. done"
echo ""
fi

View File

@@ -253,18 +253,18 @@ ui_tabs=Categorize modules?
upgrade_title=Upgrade Usermin
upgrade_title2=Install Usermin
upgrade_desc=This form allows you to upgrade your entire Usermin installation to a new version. You can install from a local file, an uploaded file or from the latest version at <a href=http://www.usermin.com/>www.usermin.com</a>. Just as with a manual upgrade, all your config settings and third-party modules will be kept.
upgrade_descrpm=This form allows you to upgrade your entire Usermin installation to a new version using RPM's upgrade option. You can install from a local RPM file, an uploaded file or from the latest version at <a href=http://www.usermin.com/>www.usermin.com</a>. Just as with a manual upgrade, all your config settings and third-party modules will be kept.
upgrade_descdeb=This form allows you to upgrade your entire Usermin installation to a new version by upgrading its Debian package. You can install from a local .deb file, an uploaded file or from the latest version at <a href=http://www.usermin.com/>www.usermin.com</a>. Just as with a manual upgrade, all your config settings and third-party modules will be kept.
upgrade_desc=This form allows you to upgrade your entire Usermin installation to a new version. You can install from a local file, an uploaded file or from the latest version at <a href=http://www.webmin.com/>www.webmin.com</a>. Just as with a manual upgrade, all your config settings and third-party modules will be kept.
upgrade_descrpm=This form allows you to upgrade your entire Usermin installation to a new version using RPM's upgrade option. You can install from a local RPM file, an uploaded file or from the latest version at <a href=http://www.webmin.com/>www.webmin.com</a>. Just as with a manual upgrade, all your config settings and third-party modules will be kept.
upgrade_descdeb=This form allows you to upgrade your entire Usermin installation to a new version by upgrading its Debian package. You can install from a local .deb file, an uploaded file or from the latest version at <a href=http://www.webmin.com/>www.webmin.com</a>. Just as with a manual upgrade, all your config settings and third-party modules will be kept.
upgrade_local=From local file
upgrade_uploaded=From uploaded file
upgrade_url=From ftp or http URL
upgrade_ftp=Latest version from www.usermin.com
upgrade_ftp=Latest version from www.webmin.com
upgrade_delete=Delete old version's directory after upgrade?
upgrade_ok=Upgrade Usermin
upgrade_err1=Failed to upgrade from $1
upgrade_err2=Failed to upgrade from uploaded file
upgrade_err3=Failed to upgrade from www.usermin.com
upgrade_err3=Failed to upgrade from www.webmin.com
upgrade_err5=Failed to upgrade from URL $1
upgrade_eurl=Missing or invalid URL
upgrade_efile=File does not exist
@@ -285,10 +285,10 @@ upgrade_failed=.. upgrade failed!
upgrade_updates=There are $1 updates for this new version of Usermin. <a href='$2'>Click here</a> to automatically download and install them now.
upgrade_eupdates=Failed to download list of updates : $1
update_desc1=This form allows you to upgrade Usermin modules that have been found to contain bugs or security holes from the <a href=http://www.usermin.com/uupdates.html>Usermin Updates</a> page or from another source. This will compare the currently installed modules with those available for update, and optionally automatically download and install any modules that are out of date.
update_desc1=This form allows you to upgrade Usermin modules that have been found to contain bugs or security holes from the <a href=http://www.webmin.com/uupdates.html>Usermin Updates</a> page or from another source. This will compare the currently installed modules with those available for update, and optionally automatically download and install any modules that are out of date.
update_header1=Update modules now
update_header2=Update modules on schedule
update_webmin=Update from www.usermin.com
update_webmin=Update from www.webmin.com
update_other=Update from another source
update_show=Only show which modules would be updated
update_missing=Install modules that are not currently installed
@@ -300,7 +300,7 @@ update_apply=Save and Apply
update_sched=Update modules at $1:00 every $2 days
update_none=No Usermin updates for this version.
update_failed=Failed to install module : $1
update_desc2=This form is for scheduling the automatic update of Usermin modules containing bugs or security holes from the <a href=http://www.usermin.com/uupdates.html>Usermin Updates</a> page or from another source. While this service is useful, you should be careful using it as it may allow attackers to take over your system if the update server was ever compromised.
update_desc2=This form is for scheduling the automatic update of Usermin modules containing bugs or security holes from the <a href=http://www.webmin.com/uupdates.html>Usermin Updates</a> page or from another source. While this service is useful, you should be careful using it as it may allow attackers to take over your system if the update server was ever compromised.
assignment_title=Reassign Modules
assignment_header=Module category assignments

View File

@@ -1 +1 @@
2.011
2.012

View File

@@ -1652,8 +1652,6 @@ by the message setup using that function.
sub error
{
$main::no_miniserv_userdb = 1;
&setvar('error-fatal-ignored', 1);
return if $main::ignore_errors;
&setvar('error-fatal', 1);
my $msg = join("", @_);
$msg =~ s/<[^>]*>//g;
@@ -5312,9 +5310,10 @@ if ($ENV{'HTTP_X_REQUESTED_WITH'} ne "XMLHttpRequest" &&
$url_to_filename = substr($url_to_filename, 0, 128);
# Write URL for the theme to read and open
$main::ignore_errors = 1;
&write_file(&tempname('.theme_' . $salt . '_' . $url_to_filename . '_' . get_product_name() . '_' . $key . '_' . $remote_user), \%var);
$main::ignore_errors = 0;
eval {
$main::error_must_die = 1;
&write_file(&tempname('.theme_' . $salt . '_' . $url_to_filename . '_' . get_product_name() . '_' . $key . '_' . $remote_user), \%var);
};
}
&redirect("/");
}

View File

@@ -35,7 +35,7 @@ if ($zone) {
elsif ($d) {
# Use Virtualmin API calls
&virtual_server::obtain_lock_dns($d);
&pre_records_change($d);
&virtual_server::pre_records_change($d);
($recs, $file) = &virtual_server::get_domain_dns_records_and_file($d);
$wapi = 1;
}

View File

@@ -37,7 +37,7 @@ if ($zone) {
elsif ($d) {
# Use Virtualmin API calls
&virtual_server::obtain_lock_dns($d);
&pre_records_change($d);
&virtual_server::pre_records_change($d);
($recs, $file) = &virtual_server::get_domain_dns_records_and_file($d);
$wapi = 1;
}

View File

@@ -67,6 +67,7 @@ my ($dom, $webroot, $email, $size, $mode, $staging, $account_email) = @_;
my @doms = ref($dom) ? @$dom : ($dom);
$email ||= "root\@$doms[0]";
$mode ||= "web";
@doms = &unique(@doms);
my ($challenge, $wellknown, $challenge_new, $wellknown_new, $wildcard);
# Wildcard mode?

View File

@@ -1,5 +1,6 @@
xterm=Set <tt>TERM</tt> environmental variable to,4,xterm+256color-xterm&#45;256color,xterm+16color-xterm&#45;16color,xterm-xterm,vt102-vt102,vt100-vt100,vt52-vt52,rxvt-rxvt,nsterm-nsterm,dtterm-dtterm,ansi-ansi
base_port=Base port number for WebSockets connections,0,5
host=Hostname for WebSocket connections,3,Automatic,32,,,Manual
size=Terminal width and height in characters,3,Automatic,5,,,Static (80x24)
locale=Set shell character encoding,10,0-Shell default,1-<tt>en_US.UTF&#45;8</tt>,Custom
rcfile=Execute initialization commands from file,10,0-Shell default,1-Module default,Custom

View File

@@ -185,7 +185,15 @@ $ENV{'SESSION_ID'} = $main::session_id;
# Open the terminal
my $ws_proto = lc($ENV{'HTTPS'}) eq 'on' ? 'wss' : 'ws';
my $url = "$ws_proto://$ENV{'HTTP_HOST'}/$module_name/ws-$port";
my $http_host_conf = &trim($config{'host'});
if ($http_host_conf) {
if ($http_host_conf !~ /^wss?:\/\//) {
$http_host_conf = "$ws_proto://$http_host_conf";
}
$http_host_conf =~ s/[\/]+$//g;
}
my $http_host = $http_host_conf || "$ws_proto://$ENV{'HTTP_HOST'}";
my $url = "$http_host/$module_name/ws-$port";
my $term_script = <<EOF;
(function() {