From 27c428e613c6b01b34119ddb607210004e23033d Mon Sep 17 00:00:00 2001 From: Amish Date: Thu, 29 Jun 2017 07:39:37 +0530 Subject: [PATCH 001/122] Log if no_pam and pam_only both are set Some old config has no_pam set to 1. Now if administrator enables pam_only too then both are conflicting. Which makes webmin to exit with PAM error. But administrator can not figure out why? This logs additional line so that administrator know the reason. --- miniserv.pl | 1 + 1 file changed, 1 insertion(+) diff --git a/miniserv.pl b/miniserv.pl index 833ce6c26..544a01f64 100755 --- a/miniserv.pl +++ b/miniserv.pl @@ -161,6 +161,7 @@ elsif (!$config{'no_pam'}) { if ($config{'pam_only'} && !$use_pam) { print STDERR $startup_msg[0],"\n"; print STDERR "PAM use is mandatory, but could not be enabled!\n"; + print STDERR "no_pam and pam_only both are set!\n" if ($config{no_pam}); exit(1); } elsif ($pam_msg && !$use_pam) { From 2ab4bbbb022b5c31521d03d728dd6f21e6b3a21a Mon Sep 17 00:00:00 2001 From: Amish Date: Thu, 29 Jun 2017 14:29:01 +0530 Subject: [PATCH 002/122] Dont log just first message, log everything. Say administrator does not want IPv6 support and hence does not have Socket6 module installed. But wants PAM support but forgot to install Authen::PAM. Since currently webmin prints just $startup_msg[0] (first message) - it will never print that "Perl module Authen::PAM needed for PAM". It will keep printing that "IPv6 support cannot be enabled". So administrator would never know what is the real error (that he needs to install "Authen::PAM") This patch logs everything instead of just first line. --- miniserv.pl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/miniserv.pl b/miniserv.pl index 544a01f64..bd55d3cd2 100755 --- a/miniserv.pl +++ b/miniserv.pl @@ -159,7 +159,9 @@ elsif (!$config{'no_pam'}) { } } if ($config{'pam_only'} && !$use_pam) { - print STDERR $startup_msg[0],"\n"; + foreach $msg (@startup_msg) { + print STDERR $msg,"\n"; + } print STDERR "PAM use is mandatory, but could not be enabled!\n"; print STDERR "no_pam and pam_only both are set!\n" if ($config{no_pam}); exit(1); From 1f838a72576c6dc31abdfb5f13d81e036adcdcc7 Mon Sep 17 00:00:00 2001 From: Jamie Cameron Date: Fri, 30 Jun 2017 13:46:01 -0700 Subject: [PATCH 003/122] Fix typo --- net/lang/en | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/lang/en b/net/lang/en index 4c499c175..1e528cd15 100644 --- a/net/lang/en +++ b/net/lang/en @@ -26,7 +26,7 @@ ifcs_add=Add a new interface. ifcs_radd=Add a new address range. ifcs_badd=Add a new bridge. ifcs_boot=Activated at Boot -ifcs_act=Activate +ifcs_act=Active ifcs_bootp=From BOOTP ifcs_dhcp=From DHCP ifcs_auto6=From IPv6 discovery From 1f77afd259b792074f28e07e10ccac39934b1b0c Mon Sep 17 00:00:00 2001 From: Jamie Cameron Date: Fri, 30 Jun 2017 14:28:34 -0700 Subject: [PATCH 004/122] Put back correct translation https://sourceforge.net/p/webadmin/bugs/4983/ --- cron/module.info | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cron/module.info b/cron/module.info index 0b4f45765..e36cfb5c5 100644 --- a/cron/module.info +++ b/cron/module.info @@ -19,7 +19,7 @@ desc_sv=Schemalagda cronjobb desc_fr=Tâches Cron desc_ja_JP.euc=ͽÄêºÑ¤ß Cron ºî¶È desc_hu=Idõzitett futtatások (Cron) -desc_ru_RU= Cron +desc_ru_RU=Ðàñïèñàíèå çàäàíèé Cron desc_ca=Treballs Planificats Cron desc_zh_TW.UTF-8=定時執行工作 (Cron) desc_zh_CN.UTF-8=Cron 任务调度 From 5d9efa9a3a2040221d2f06ee4f658b9ca09fa890 Mon Sep 17 00:00:00 2001 From: Jamie Cameron Date: Fri, 30 Jun 2017 14:33:45 -0700 Subject: [PATCH 005/122] File might contain CR characters --- mount/linux-lib.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mount/linux-lib.pl b/mount/linux-lib.pl index 68bdac395..66af65b3f 100755 --- a/mount/linux-lib.pl +++ b/mount/linux-lib.pl @@ -4,7 +4,7 @@ if (!$no_check_support) { my %suppport; my $fsfile = &read_file_contents("/proc/filesystems"); - foreach my $l (split(/\n/, $fsfile)) { + foreach my $l (split(/\r?\n/, $fsfile)) { my @w = split(/\s+/, $l); my $fs = pop(@w); $support{$fs} = 1; From bb963419d8e8e6814d7dfbcd5d73532af2da2352 Mon Sep 17 00:00:00 2001 From: Jamie Cameron Date: Fri, 30 Jun 2017 14:39:31 -0700 Subject: [PATCH 006/122] Default IPs to ignore can also be hostnames https://sourceforge.net/p/webadmin/bugs/4893/ --- fail2ban/save_jaildef.cgi | 1 + 1 file changed, 1 insertion(+) diff --git a/fail2ban/save_jaildef.cgi b/fail2ban/save_jaildef.cgi index 85fc25218..635984852 100755 --- a/fail2ban/save_jaildef.cgi +++ b/fail2ban/save_jaildef.cgi @@ -24,6 +24,7 @@ my @ignoreips = $in{'ignoreip_def'} ? ( ) : split(/\s+/, $in{'ignoreip'}); foreach my $ip (@ignoreips) { &check_ipaddress($ip) || &check_ip6address($ip) || ($ip =~ /^([0-9\.]+)\/(\d+)/ && &check_ipaddress("$1")) || + &to_ipaddress($ip) || &error($text{'jail_eignoreip'}); } From 5a18602bf09139c9440da6bb95c0b68140e39e1e Mon Sep 17 00:00:00 2001 From: Jamie Cameron Date: Fri, 30 Jun 2017 14:42:20 -0700 Subject: [PATCH 007/122] Fix stupid typo https://sourceforge.net/p/webadmin/bugs/4972/ --- mount/linux-lib.pl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/mount/linux-lib.pl b/mount/linux-lib.pl index 66af65b3f..417a9a0d4 100755 --- a/mount/linux-lib.pl +++ b/mount/linux-lib.pl @@ -2,7 +2,7 @@ # Mount table functions for linux if (!$no_check_support) { - my %suppport; + my %support; my $fsfile = &read_file_contents("/proc/filesystems"); foreach my $l (split(/\r?\n/, $fsfile)) { my @w = split(/\s+/, $l); @@ -37,13 +37,13 @@ if (!$no_check_support) { if ($support{'ext4'}) { $ext4_support = 1; } - if ($suppport{'xfs'} || &has_command("mkfs.xfs")) { + if ($support{'xfs'} || &has_command("mkfs.xfs")) { $xfs_support = 1; } - if ($suppport{'jfs'} || &has_command("mkfs.jfs")) { + if ($support{'jfs'} || &has_command("mkfs.jfs")) { $jfs_support = 1; } - if ($suppport{'btrfs'} || &has_command("mkfs.btrfs")) { + if ($support{'btrfs'} || &has_command("mkfs.btrfs")) { $btrfs_support = 1; } } From e7d086442c91c2c47cc856ad7b6fe0243b3e2501 Mon Sep 17 00:00:00 2001 From: Jamie Cameron Date: Fri, 30 Jun 2017 23:18:49 -0700 Subject: [PATCH 008/122] Fix incorrect quotes https://sourceforge.net/p/webadmin/bugs/4982/ --- ui-lib.pl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ui-lib.pl b/ui-lib.pl index 532dbedc3..e2f757eb4 100755 --- a/ui-lib.pl +++ b/ui-lib.pl @@ -1712,11 +1712,11 @@ var divobj = document.getElementById(divid); var openerobj = document.getElementById(openerid); if (divobj.className == 'opener_shown') { divobj.className = 'opener_hidden'; - openerobj.innerHTML = ''; + openerobj.innerHTML = ''; } else { divobj.className = 'opener_shown'; - openerobj.innerHTML = ''; + openerobj.innerHTML = ''; } } From fe35d13cd7d53235e03833b8a73d29400ac4db78 Mon Sep 17 00:00:00 2001 From: Jamie Cameron Date: Sat, 1 Jul 2017 16:43:31 -0700 Subject: [PATCH 009/122] Postfix ignores trailing whitespaces, so we should too --- postfix/postfix-lib.pl | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/postfix/postfix-lib.pl b/postfix/postfix-lib.pl index 419b9ef01..8a05fc557 100755 --- a/postfix/postfix-lib.pl +++ b/postfix/postfix-lib.pl @@ -131,6 +131,10 @@ if (!defined($out)) { } chop($out); } +else { + # Trim trailing whitespace + $out =~ s/\s+$//; + } if ($key) { # If the value asked for was like foo:bar, extract from the value # the parts after bar From 064faff22711fbd530f422d734aa05d055f87b63 Mon Sep 17 00:00:00 2001 From: Jamie Cameron Date: Sat, 1 Jul 2017 17:35:53 -0700 Subject: [PATCH 010/122] Text areas should always be monospace --- gray-theme/theme.pl | 1 + 1 file changed, 1 insertion(+) diff --git a/gray-theme/theme.pl b/gray-theme/theme.pl index 44955650a..cb985fb26 100755 --- a/gray-theme/theme.pl +++ b/gray-theme/theme.pl @@ -259,6 +259,7 @@ print "", ""; -