mirror of
https://github.com/webmin/webmin.git
synced 2026-02-05 15:12:15 +00:00
Compare commits
26 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d333f1fe16 | ||
|
|
286c5c6c51 | ||
|
|
06d212ddfc | ||
|
|
35a259eabc | ||
|
|
40bf45ae42 | ||
|
|
a875b8e7eb | ||
|
|
faa7b57970 | ||
|
|
7bf010f9f8 | ||
|
|
8ced702aa1 | ||
|
|
ed042f3a53 | ||
|
|
67a0eca90c | ||
|
|
ff5119da7c | ||
|
|
4bf1a38288 | ||
|
|
eee5331b28 | ||
|
|
beed9af645 | ||
|
|
087f1e7776 | ||
|
|
c80eb8b6ae | ||
|
|
e43fbfdaa5 | ||
|
|
55553c43a1 | ||
|
|
a035e2f6c5 | ||
|
|
cee528f46c | ||
|
|
2406f19084 | ||
|
|
3bdc75bb15 | ||
|
|
4fcb99b89a | ||
|
|
335136be14 | ||
|
|
e88ae050a9 |
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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'");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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"
|
||||
|
||||
1
setup.pl
1
setup.pl
@@ -908,6 +908,7 @@ else {
|
||||
if (!$ENV{'nopostinstall'}) {
|
||||
print "Running postinstall scripts ..\n";
|
||||
chdir($wadir);
|
||||
$ENV{'WEBMIN_UPGRADING'} = $upgrading;
|
||||
system("$perl "."e_path("$wadir/run-postinstalls.pl"));
|
||||
print ".. done\n";
|
||||
print "\n";
|
||||
|
||||
2
setup.sh
2
setup.sh
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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("/");
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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?
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
xterm=Set <tt>TERM</tt> environmental variable to,4,xterm+256color-xterm-256color,xterm+16color-xterm-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-8</tt>,Custom
|
||||
rcfile=Execute initialization commands from file,10,0-Shell default,1-Module default,Custom
|
||||
|
||||
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user