mirror of
https://github.com/webmin/webmin.git
synced 2026-02-05 23:22:15 +00:00
Compare commits
20 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
fd819d83e8 | ||
|
|
8c5fcef916 | ||
|
|
c15bbca109 | ||
|
|
c47c4b7ffd | ||
|
|
8efa25eabf | ||
|
|
190bd58b1b | ||
|
|
d645dc9345 | ||
|
|
963bb60c02 | ||
|
|
fa4e39ec9a | ||
|
|
c1b45ff210 | ||
|
|
5cb103bde3 | ||
|
|
7282348b7d | ||
|
|
e3a1fd849b | ||
|
|
1fb01aa46e | ||
|
|
779ebb4a63 | ||
|
|
c391830670 | ||
|
|
c8c6c3e40f | ||
|
|
c1f45d6d61 | ||
|
|
8804ba6529 | ||
|
|
11ae39081c |
@@ -1,5 +1,9 @@
|
||||
## Changelog
|
||||
|
||||
#### 2.201 (July 24, 2024)
|
||||
* Fix real-time monitoring not updating graphs in the Dashboard [#2222](https://github.com/webmin/webmin/issues/2222)
|
||||
* Fix Terminal module to work correctly with _sudo_-capable users [#2223](https://github.com/webmin/webmin/issues/2223)
|
||||
|
||||
#### 2.200 (July 21, 2024)
|
||||
* Add support for blocking a given IP temporarily or permanently in the FirewallD module
|
||||
* Add support for parsing iCalendar event files in the Mailbox module
|
||||
@@ -12,7 +16,6 @@
|
||||
* Add improved support for displaying last logins in the Users and Groups module
|
||||
* Fix to prevent duplicate `also-notify` and `allow-transfer` IPs in the BIND DNS module
|
||||
* Fix issues with Terminal module to correct text display problems in editor mode
|
||||
* Fix to allow disabling the newly introduced enforcement of _sudo_-capable logins in the Terminal module
|
||||
* Fix to store Terminal module logs in the `/var/webmin` directory
|
||||
* Fix to display the Spam folder nicely in the Mailbox module
|
||||
* Fix how modules are loaded in ProFTPd module
|
||||
@@ -22,6 +25,7 @@
|
||||
* Fix to change default monitor name based on database used MariaDB vs MySQL [#2139](https://github.com/virtualmin/virtualmin-gpl/issues/798)
|
||||
* Fix to disable manual upgrades for systems installed from the repository
|
||||
* Fix to preserve Webmin service state during package upgrades [#2133](https://github.com/webmin/webmin/issues/2133)
|
||||
* Change to enforce _sudo_-capable logins as themselves in the Terminal module [docs/modules/terminal](https://webmin.com/docs/modules/terminal/#about)
|
||||
* Rename "System Logs" module to "System Logs RS" and "System Logs Viewer" to "System Logs" for clarity
|
||||
|
||||
#### 2.111 (April 16, 2024)
|
||||
|
||||
33
bin/patch
33
bin/patch
@@ -37,14 +37,16 @@ init_config();
|
||||
|
||||
# Check if curl is installed
|
||||
if (!has_command('curl')) {
|
||||
print "curl is not installed\n";
|
||||
print "\"curl\" command is not installed\n";
|
||||
exit 1;
|
||||
}
|
||||
|
||||
# Check if git is installed
|
||||
if (!has_command('git')) {
|
||||
print "git is not installed\n";
|
||||
exit 1;
|
||||
if (!has_command('patch')) {
|
||||
if (!has_command('git')) {
|
||||
print "Neither \"patch\" nor \"git\" commands are installed\n";
|
||||
exit 1;
|
||||
}
|
||||
}
|
||||
|
||||
# Get patch URL or file
|
||||
@@ -96,14 +98,23 @@ else {
|
||||
$cmd = "cat @{[quotemeta($patch)]}";
|
||||
}
|
||||
|
||||
# Apply patch using Git
|
||||
my $output = `$cmd 2>&1 | git apply --reject --verbose --whitespace=fix 2>&1`;
|
||||
if ($output !~ /applied patch.*?cleanly/i) {
|
||||
print "Patch failed: $output\n";
|
||||
exit 1;
|
||||
}
|
||||
# Apply patch using Patch or Git command
|
||||
my $output;
|
||||
if (has_command('patch')) {
|
||||
$output = `$cmd 2>&1 | patch -p1 --verbose 2>&1`;
|
||||
if ($output !~ /succeeded/i) {
|
||||
print "Patch failed: $output\n";
|
||||
exit 1;
|
||||
}
|
||||
} else {
|
||||
$output = `$cmd 2>&1 | git apply --reject --verbose --whitespace=fix 2>&1`;
|
||||
if ($output !~ /applied patch.*?cleanly/i) {
|
||||
print "Patch failed: $output\n";
|
||||
exit 1;
|
||||
}
|
||||
}
|
||||
print "Patch applied successfully to:\n";
|
||||
print " $1\n" while $output =~ /^Applied patch\s+(\S+)/mg;
|
||||
print " $1\n" while $output =~ /^(?|Applied patch\s+(\S+)|patching file\s+(\S+))/mg;
|
||||
system("$config_dir/restart");
|
||||
|
||||
=pod
|
||||
|
||||
@@ -597,7 +597,13 @@ sub host_table
|
||||
{
|
||||
local ($i, $h, $parent);
|
||||
local @tds = ( "width=5" );
|
||||
print &ui_columns_start([ "", $text{'index_hostgroup'},
|
||||
my $hascmt;
|
||||
for ($i = $_[1]; $i < $_[2]; $i++) {
|
||||
$hascmt++ if ($_[4]->[$i] =~ /\(.*\)/);
|
||||
}
|
||||
print &ui_columns_start([ "",
|
||||
$text{'index_hostgroup'},
|
||||
$hascmt ? ( $text{'index_comment'} ) : ( ),
|
||||
$text{'index_parent'}, $text{'index_hardware'},
|
||||
$text{'index_nameip'} ], 100, 0, \@tds);
|
||||
for ($i = $_[1]; $i < $_[2]; $i++) {
|
||||
@@ -613,6 +619,10 @@ for ($i = $_[1]; $i < $_[2]; $i++) {
|
||||
$firstcol .= $text{'index_group'}." ";
|
||||
$sp = "\ \ ";
|
||||
}
|
||||
my $cmt;
|
||||
if ($_[4]->[$i] =~ s/\s+\((.*)\)//) {
|
||||
$cmt = $1;
|
||||
}
|
||||
if ($_[3]->[$i]) {
|
||||
$firstcol .= &ui_link($_[3]->[$i], $_[4]->[$i]);
|
||||
}
|
||||
@@ -620,6 +630,7 @@ for ($i = $_[1]; $i < $_[2]; $i++) {
|
||||
$firstcol .= $_[4]->[$i];
|
||||
}
|
||||
push(@cols, $firstcol);
|
||||
push(@cols, $cmt) if ($hascmt);
|
||||
|
||||
if ($par{$h}->{'name'} eq "group") {
|
||||
$par_type = $text{'index_togroup'};
|
||||
@@ -648,7 +659,14 @@ sub net_table
|
||||
{
|
||||
local ($i, $n);
|
||||
local @tds = ( "width=5" );
|
||||
print &ui_columns_start([ "", $text{'index_net'}, $text{'index_netmask'},
|
||||
my $hascmt;
|
||||
for ($i = $_[1]; $i < $_[2]; $i++) {
|
||||
$hascmt++ if ($_[4]->[$i] =~ /\(.*\)/);
|
||||
}
|
||||
print &ui_columns_start([ "",
|
||||
$text{'index_net'},
|
||||
$hascmt ? ( $text{'index_comment'} ) : ( ),
|
||||
$text{'index_netmask'},
|
||||
$text{'index_desc'}, $text{'index_parent'} ], 100,
|
||||
0, \@tds);
|
||||
for ($i = $_[1]; $i < $_[2]; $i++) {
|
||||
@@ -661,6 +679,10 @@ for ($i = $_[1]; $i < $_[2]; $i++) {
|
||||
else {
|
||||
$sp = "\ \ ";
|
||||
}
|
||||
my $cmt;
|
||||
if ($_[4]->[$i] =~ s/\s+\((.*)\)//) {
|
||||
$cmt = $1;
|
||||
}
|
||||
if ($_[3]->[$i]) {
|
||||
$first .= &ui_link($_[3]->[$i],$_[4]->[$i]);
|
||||
}
|
||||
@@ -668,6 +690,7 @@ for ($i = $_[1]; $i < $_[2]; $i++) {
|
||||
$first .= $_[4]->[$i];
|
||||
}
|
||||
push(@cols, $first);
|
||||
push(@cols, $cmt) if ($hascmt);
|
||||
push(@cols, $_[3]->[$i] ? &netmask($n) : "");
|
||||
push(@cols, $n->{'comment'});
|
||||
push(@cols, $par{$n} ?
|
||||
|
||||
@@ -14,6 +14,7 @@ index_memb=$1 members
|
||||
index_hst=Hosts and Host Groups
|
||||
index_nohst=No hosts or groups have been defined.
|
||||
index_hostgroup=Host/Group
|
||||
index_comment=Description
|
||||
index_parent=Parent
|
||||
index_hardware=Hardware Address
|
||||
index_group=Group:
|
||||
|
||||
0
firewalld/block_ip.cgi
Normal file → Executable file
0
firewalld/block_ip.cgi
Normal file → Executable file
@@ -3,3 +3,4 @@ lines=100
|
||||
others=1
|
||||
reverse=1
|
||||
log_any=0
|
||||
compressed=1
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
skip_index=Open log view on module load,1,1-Yes,0-No
|
||||
skip_index=Open log view on module load?,1,1-Yes,0-No
|
||||
lines=Default number of lines to display,0,6
|
||||
compressed=Include compressed logs in searches?,1,1-Yes,0-No
|
||||
refresh=Seconds between log view refreshes,3,Never
|
||||
others=Show logs from other modules,1,1-Yes,0-No
|
||||
others=Show logs from other modules?,1,1-Yes,0-No
|
||||
extras=Extra log files to show,9,50,4,\t
|
||||
reverse=Log display order,1,1-Newest lines at top,0-Newest lines at bottom
|
||||
log_any=Can view any file as a log,1,1-Yes,0-No
|
||||
log_any=Can view any file as a log?,1,1-Yes,0-No
|
||||
|
||||
@@ -143,11 +143,9 @@ if (!@acols) {
|
||||
}
|
||||
|
||||
# If we jump directly to logs just redirect
|
||||
if ($config{'skip_index'} == 1) {
|
||||
if ($lnks[0]) {
|
||||
&redirect($lnks[0]);
|
||||
exit;
|
||||
}
|
||||
if ($config{'skip_index'} == 1 && $lnks[0]) {
|
||||
&redirect($lnks[0]);
|
||||
return;
|
||||
}
|
||||
|
||||
# Print the header
|
||||
|
||||
@@ -251,5 +251,29 @@ sub config_post_save
|
||||
&clear_systemctl_cache();
|
||||
}
|
||||
|
||||
# catter_command(file)
|
||||
# Given a file that may be compressed, returns the command to output it in
|
||||
# plain text, or undef if impossible
|
||||
sub catter_command
|
||||
{
|
||||
local ($l) = @_;
|
||||
local $q = quotemeta($l);
|
||||
if ($l =~ /\.gz$/i) {
|
||||
return &has_command("gunzip") ? "gunzip -c $q" : undef;
|
||||
}
|
||||
elsif ($l =~ /\.Z$/i) {
|
||||
return &has_command("uncompress") ? "uncompress -c $q" : undef;
|
||||
}
|
||||
elsif ($l =~ /\.bz2$/i) {
|
||||
return &has_command("bunzip2") ? "bunzip2 -c $q" : undef;
|
||||
}
|
||||
elsif ($l =~ /\.xz$/i) {
|
||||
return &has_command("xz") ? "xz -d -c $q" : undef;
|
||||
}
|
||||
else {
|
||||
return "cat $q";
|
||||
}
|
||||
}
|
||||
|
||||
1;
|
||||
|
||||
|
||||
0
logviewer/view_log_progress.cgi
Normal file → Executable file
0
logviewer/view_log_progress.cgi
Normal file → Executable file
@@ -103,7 +103,7 @@ sched_yes=Scheduled checking for updates is now active.
|
||||
sched_no=Scheduled checking for updates has been disabled.
|
||||
|
||||
log_update=Installed $1 updated packages
|
||||
log_sched=Background installed $1 updated packages
|
||||
log_schedup=Background installed $1 updated packages
|
||||
log_sched=Enabled scheduled updates
|
||||
log_unsched=Disabled scheduled updates
|
||||
log_refresh=Refreshed available packages
|
||||
|
||||
@@ -18,8 +18,8 @@ elsif ($type eq 'repo') {
|
||||
elsif ($action eq 'update') {
|
||||
return &text('log_update', $object);
|
||||
}
|
||||
elsif ($action eq 'sched') {
|
||||
return &text('log_sched', $object);
|
||||
elsif ($action eq 'schedup') {
|
||||
return &text('log_schedup', $object);
|
||||
}
|
||||
elsif ($action eq 'sched') {
|
||||
return $text{$object ? 'log_sched' : 'log_unsched'};
|
||||
|
||||
@@ -74,5 +74,5 @@ if ($config{'sched_email'} && $body) {
|
||||
|
||||
# Log the update, if anything was installed
|
||||
if ($icount) {
|
||||
&webmin_log("sched", "packages", $icount);
|
||||
&webmin_log("schedup", "packages", $icount);
|
||||
}
|
||||
|
||||
@@ -156,14 +156,14 @@ else {
|
||||
close(OUTr); close(INw);
|
||||
|
||||
if ($_[1]) {
|
||||
local @u = getpwuid($_[1]);
|
||||
if (defined($_[2])) {
|
||||
# switch to given UID and GID
|
||||
&switch_to_unix_user(
|
||||
[ undef, undef, $_[1], $_[2] ]);
|
||||
[ $u[0], undef, $_[1], $_[2] ]);
|
||||
}
|
||||
else {
|
||||
# switch to UID and all GIDs
|
||||
local @u = getpwuid($_[1]);
|
||||
&switch_to_unix_user(\@u);
|
||||
}
|
||||
}
|
||||
@@ -286,8 +286,9 @@ if (!$@) {
|
||||
|
||||
close(STDIN); close(STDOUT); close(STDERR);
|
||||
untie(*STDIN); untie(*STDOUT); untie(*STDERR);
|
||||
if ($_[1]) {
|
||||
&switch_to_unix_user([ undef, undef, $_[1], $_[2] ]);
|
||||
if ($uid) {
|
||||
my $username = getpwuid($uid);
|
||||
&switch_to_unix_user([ $username, undef, $uid, $gid ]);
|
||||
}
|
||||
|
||||
close($ptyfh); # Used by other side only
|
||||
@@ -345,8 +346,9 @@ else {
|
||||
close(STDIN); close(STDOUT); close(STDERR);
|
||||
untie(*STDIN); untie(*STDOUT); untie(*STDERR);
|
||||
#setpgrp(0, $$);
|
||||
if ($_[1]) {
|
||||
&switch_to_unix_user([ undef, undef, $_[1], $_[2] ]);
|
||||
if ($uid) {
|
||||
my $username = getpwuid($uid);
|
||||
&switch_to_unix_user([ $username, undef, $uid, $gid ]);
|
||||
}
|
||||
|
||||
open(STDIN, "<$tty");
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
webmin_host="download.webmin.com"
|
||||
webmin_download="https://$webmin_host"
|
||||
webmin_download_nightly="https://builds.webmin.dev"
|
||||
webmin_download_nightly="https://download.webmin.dev"
|
||||
webmin_key="developers-key.asc"
|
||||
webmin_key_download="$webmin_download/$webmin_key"
|
||||
webmin_key_suffix="webmin-developers"
|
||||
|
||||
Reference in New Issue
Block a user