Compare commits

...

20 Commits
2.200 ... 2.201

Author SHA1 Message Date
Jamie Cameron
fd819d83e8 New version bump 2024-07-23 21:58:01 -07:00
Jamie Cameron
8c5fcef916 Fix string for update logging 2024-07-23 21:57:32 -07:00
Jamie Cameron
c15bbca109 Separate comment column https://github.com/webmin/webmin/issues/2221 2024-07-23 21:52:24 -07:00
Jamie Cameron
c47c4b7ffd Merge branch 'master' of github.com:webmin/webmin 2024-07-23 20:12:17 -07:00
Jamie Cameron
8efa25eabf Add missing function 2024-07-23 20:12:06 -07:00
Ilia Ross
190bd58b1b Fix to clarify option name 2024-07-24 03:50:01 +03:00
Ilia Ross
d645dc9345 Update changelog for Webmin 2.201 2024-07-24 03:25:43 +03:00
Ilia Ross
963bb60c02 Fix to go directly to viewing logs on module load 2024-07-24 03:18:31 +03:00
Jamie Cameron
fa4e39ec9a Merge branch 'master' of github.com:webmin/webmin 2024-07-23 17:00:41 -07:00
Jamie Cameron
c1b45ff210 Add option to include compressed rotated logs in searches, and enable it by default, to maintain parity with the old sylog module 2024-07-23 17:00:34 -07:00
Ilia Ross
5cb103bde3 Revert "Fix to call exit after redirect"
This reverts commit e3a1fd849b.
2024-07-24 02:02:14 +03:00
Ilia Ross
7282348b7d Fix to use consistent download page 2024-07-24 00:20:58 +03:00
Ilia Ross
e3a1fd849b Fix to call exit after redirect 2024-07-24 00:20:47 +03:00
Jamie Cameron
1fb01aa46e Fix permissions 2024-07-23 13:50:19 -07:00
Jamie Cameron
779ebb4a63 Fix redirection to first log 2024-07-23 13:50:02 -07:00
Jamie Cameron
c391830670 Fix more cases where switch_to_unix_user isn't being passed the username 2024-07-22 16:48:28 -07:00
Jamie Cameron
c8c6c3e40f Merge branch 'master' of github.com:webmin/webmin 2024-07-22 16:11:41 -07:00
Jamie Cameron
c1f45d6d61 When running a command as a different user, the username needs to be passed to switch_to_unix_user so that all the secondary groups can be populated https://github.com/webmin/webmin/issues/2223 2024-07-22 16:11:37 -07:00
Ilia Ross
8804ba6529 Update CHANGELOG.md 2024-07-22 16:00:56 +03:00
Ilia Ross
11ae39081c Fix to try more simple patch command at first 2024-07-22 14:18:51 +03:00
16 changed files with 99 additions and 34 deletions

View File

@@ -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)

View File

@@ -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

View File

@@ -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 = "\&nbsp;\&nbsp;";
}
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 = "\&nbsp;\&nbsp;";
}
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} ?

View File

@@ -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
View File

View File

@@ -3,3 +3,4 @@ lines=100
others=1
reverse=1
log_any=0
compressed=1

View File

@@ -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

View File

@@ -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

View File

@@ -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
View File

View 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

View File

@@ -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'};

View File

@@ -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);
}

View File

@@ -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");

View File

@@ -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"

View File

@@ -1 +1 @@
2.200
2.201