rpms/awstats/EL-4 awstats-6.7-xmlhistory.patch, NONE, 1.1 awstats.README.SELinux, NONE, 1.1 awstats.spec, 1.8, 1.9 sources, 1.8, 1.9 awstats-6.5-CVE-2006-1945.patch, 1.1, NONE

Tim Jackson timj at fedoraproject.org
Sat May 30 18:53:50 UTC 2009


Author: timj

Update of /cvs/extras/rpms/awstats/EL-4
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv1512

Modified Files:
	awstats.spec sources 
Added Files:
	awstats-6.7-xmlhistory.patch awstats.README.SELinux 
Removed Files:
	awstats-6.5-CVE-2006-1945.patch 
Log Message:
Initial import for EL-4, consisting of believed-working AWStats 6.7


awstats-6.7-xmlhistory.patch:

--- NEW FILE awstats-6.7-xmlhistory.patch ---
--- wwwroot/cgi-bin/awstats.pl	2007/07/07 11:00:05	1.892
+++ wwwroot/cgi-bin/awstats.pl	2007/07/12 21:38:20	1.894
@@ -2211,7 +2211,7 @@
 			}
 
 			# Analyze fields
-			@field=split(/\s+/,($readxml?CleanFromTags($_):$_));
+			@field=split(/\s+/,($readxml?XMLDecodeFromHisto($_):$_));
 			if (! $field[0]) { next; }
 
 			# Here version MUST be defined
@@ -2282,7 +2282,7 @@
 					}
 					$_=<HISTORY>;
 					chomp $_; s/\r//;
-					@field=split(/\s+/,($readxml?CleanFromTags($_):$_)); $countlines++;
+					@field=split(/\s+/,($readxml?XMLDecodeFromHisto($_):$_)); $countlines++;
 				}
 				until ($field[0] eq 'END_MISC' || $field[0] eq "${xmleb}END_MISC" || ! $_);
 				if ($field[0] ne 'END_MISC' && $field[0] ne "${xmleb}END_MISC") { error("History file \"$filetoread\" is corrupted (End of section MISC not found).\nRestore a recent backup of this file (data for this month will be restored to backup date), remove it (data for month will be lost), or remove the corrupted section in file (data for at least this section will be lost).","","",1); }
@@ -2313,7 +2313,7 @@
 					}
 					$_=<HISTORY>;
 					chomp $_; s/\r//;
-					@field=split(/\s+/,($readxml?CleanFromTags($_):$_)); $countlines++;
+					@field=split(/\s+/,($readxml?XMLDecodeFromHisto($_):$_)); $countlines++;
 				}
 				until ($field[0] eq 'END_CLUSTER' || $field[0] eq "${xmleb}END_CLUSTER" || ! $_);
 				if ($field[0] ne 'END_CLUSTER' && $field[0] ne "${xmleb}END_CLUSTER") { error("History file \"$filetoread\" is corrupted (End of section CLUSTER not found).\nRestore a recent backup of this file (data for this month will be restored to backup date), remove it (data for month will be lost), or remove the corrupted section in file (data for at least this section will be lost).","","",1); }
@@ -2357,7 +2357,7 @@
 					}
 					$_=<HISTORY>;
 					chomp $_; s/\r//;
-					@field=split(/\s+/,($readxml?CleanFromTags($_):$_)); $countlines++;
+					@field=split(/\s+/,($readxml?XMLDecodeFromHisto($_):$_)); $countlines++;
 				}
 				until ($field[0] eq 'END_TIME' || $field[0] eq "${xmleb}END_TIME" || ! $_);
 				if ($field[0] ne 'END_TIME' && $field[0] ne "${xmleb}END_TIME") { error("History file \"$filetoread\" is corrupted (End of section TIME not found).\nRestore a recent backup of this file (data for this month will be restored to backup date), remove it (data for month will be lost), or remove the corrupted section in file (data for at least this section will be lost).","","",1); }
@@ -2396,7 +2396,7 @@
 					}
 					$_=<HISTORY>;
 					chomp $_; s/\r//;
-					@field=split(/\s+/,($readxml?CleanFromTags($_):$_)); $countlines++;
+					@field=split(/\s+/,($readxml?XMLDecodeFromHisto($_):$_)); $countlines++;
 				}
 				until ($field[0] eq 'END_ORIGIN' || $field[0] eq "${xmleb}END_ORIGIN" || ! $_);
 				if ($field[0] ne 'END_ORIGIN' && $field[0] ne "${xmleb}END_ORIGIN") { error("History file \"$filetoread\" is corrupted (End of section ORIGIN not found).\nRestore a recent backup of this file (data for this month will be restored to backup date), remove it (data for month will be lost), or remove the corrupted section in file (data for at least this section will be lost).","","",1); }
@@ -2427,7 +2427,7 @@
 					}
 					$_=<HISTORY>;
 					chomp $_; s/\r//;
-					@field=split(/\s+/,($readxml?CleanFromTags($_):$_)); $countlines++;
+					@field=split(/\s+/,($readxml?XMLDecodeFromHisto($_):$_)); $countlines++;
 				}
 				until ($field[0] eq 'END_DAY' || $field[0] eq "${xmleb}END_DAY" || ! $_);
 				if ($field[0] ne 'END_DAY' && $field[0] ne "${xmleb}END_DAY") { error("History file \"$filetoread\" is corrupted (End of section DAY not found).\nRestore a recent backup of this file (data for this month will be restored to backup date), remove it (data for month will be lost), or remove the corrupted section in file (data for at least this section will be lost).","","",1); }
@@ -2534,7 +2534,7 @@
 					}
 					$_=<HISTORY>;
 					chomp $_; s/\r//;
-					@field=split(/\s+/,($readxml?CleanFromTags($_):$_)); $countlines++;
+					@field=split(/\s+/,($readxml?XMLDecodeFromHisto($_):$_)); $countlines++;
 				}
 				until ($field[0] eq 'END_VISITOR' || $field[0] eq "${xmleb}END_VISITOR" || ! $_);
 				if ($field[0] ne 'END_VISITOR' && $field[0] ne "${xmleb}END_VISITOR") { error("History file \"$filetoread\" is corrupted (End of section VISITOR not found).\nRestore a recent backup of this file (data for this month will be restored to backup date), remove it (data for month will be lost), or remove the corrupted section in file (data for at least this section will be lost).","","",1); }
@@ -2564,7 +2564,7 @@
 					}
 					$_=<HISTORY>;
 					chomp $_; s/\r//;
-					@field=split(/\s+/,($readxml?CleanFromTags($_):$_)); $countlines++;
+					@field=split(/\s+/,($readxml?XMLDecodeFromHisto($_):$_)); $countlines++;
 				}
 				until ($field[0] eq 'END_UNKNOWNIP' || $field[0] eq "${xmleb}END_UNKNOWNIP" || ! $_);
 				if ($field[0] ne 'END_UNKNOWNIP' && $field[0] ne "${xmleb}END_UNKNOWNIP") { error("History file \"$filetoread\" is corrupted (End of section UNKOWNIP not found).\nRestore a recent backup of this file (data for this month will be restored to backup date), remove it (data for month will be lost), or remove the corrupted section in file (data for at least this section will be lost).","","",1); }
@@ -2602,7 +2602,7 @@
 					}
 					$_=<HISTORY>;
 					chomp $_; s/\r//;
-					@field=split(/\s+/,($readxml?CleanFromTags($_):$_)); $countlines++;
+					@field=split(/\s+/,($readxml?XMLDecodeFromHisto($_):$_)); $countlines++;
 				}
 				until ($field[0] eq 'END_LOGIN' || $field[0] eq "${xmleb}END_LOGIN" || ! $_);
 				if ($field[0] ne 'END_LOGIN' && $field[0] ne "${xmleb}END_LOGIN") { error("History file \"$filetoread\" is corrupted (End of section LOGIN not found).\nRestore a recent backup of this file (data for this month will be restored to backup date), remove it (data for month will be lost), or remove the corrupted section in file (data for at least this section will be lost).","","",1); }
@@ -2632,7 +2632,7 @@
 					}
 					$_=<HISTORY>;
 					chomp $_; s/\r//;
-					@field=split(/\s+/,($readxml?CleanFromTags($_):$_)); $countlines++;
+					@field=split(/\s+/,($readxml?XMLDecodeFromHisto($_):$_)); $countlines++;
 				}
 				until ($field[0] eq 'END_DOMAIN' || $field[0] eq "${xmleb}END_DOMAIN" || ! $_);
 				if ($field[0] ne 'END_DOMAIN' && $field[0] ne "${xmleb}END_DOMAIN") { error("History file \"$filetoread\" is corrupted (End of section DOMAIN not found).\nRestore a recent backup of this file (data for this month will be restored to backup date), remove it (data for month will be lost), or remove the corrupted section in file (data for at least this section will be lost).","","",1); }
@@ -2660,7 +2660,7 @@
 					}
 					$_=<HISTORY>;
 					chomp $_; s/\r//;
-					@field=split(/\s+/,($readxml?CleanFromTags($_):$_)); $countlines++;
+					@field=split(/\s+/,($readxml?XMLDecodeFromHisto($_):$_)); $countlines++;
 				}
 				until ($field[0] eq 'END_SESSION' || $field[0] eq "${xmleb}END_SESSION" || ! $_);
 				if ($field[0] ne 'END_SESSION' && $field[0] ne "${xmleb}END_SESSION") { error("History file \"$filetoread\" is corrupted (End of section SESSION not found).\nRestore a recent backup of this file (data for this month will be restored to backup date), remove it (data for month will be lost), or remove the corrupted section in file (data for at least this section will be lost).","","",1); }
@@ -2689,7 +2689,7 @@
 					}
 					$_=<HISTORY>;
 					chomp $_; s/\r//;
-					@field=split(/\s+/,($readxml?CleanFromTags($_):$_)); $countlines++;
+					@field=split(/\s+/,($readxml?XMLDecodeFromHisto($_):$_)); $countlines++;
 				}
 				until ($field[0] eq 'END_OS' || $field[0] eq "${xmleb}END_OS" || ! $_);
 				if ($field[0] ne 'END_OS' && $field[0] ne "${xmleb}END_OS") { error("History file \"$filetoread\" is corrupted (End of section OS not found).\nRestore a recent backup of this file (data for this month will be restored to backup date), remove it (data for month will be lost), or remove the corrupted section in file (data for at least this section will be lost).","","",1); }
@@ -2717,7 +2717,7 @@
 					}
 					$_=<HISTORY>;
 					chomp $_; s/\r//;
-					@field=split(/\s+/,($readxml?CleanFromTags($_):$_)); $countlines++;
+					@field=split(/\s+/,($readxml?XMLDecodeFromHisto($_):$_)); $countlines++;
 				}
 				until ($field[0] eq 'END_BROWSER' || $field[0] eq "${xmleb}END_BROWSER" || ! $_);
 				if ($field[0] ne 'END_BROWSER' && $field[0] ne "${xmleb}END_BROWSER") { error("History file \"$filetoread\" is corrupted (End of section BROWSER not found).\nRestore a recent backup of this file (data for this month will be restored to backup date), remove it (data for month will be lost), or remove the corrupted section in file (data for at least this section will be lost).","","",1); }
@@ -2745,7 +2745,7 @@
 					}
 					$_=<HISTORY>;
 					chomp $_; s/\r//;
-					@field=split(/\s+/,($readxml?CleanFromTags($_):$_)); $countlines++;
+					@field=split(/\s+/,($readxml?XMLDecodeFromHisto($_):$_)); $countlines++;
 				}
 				until ($field[0] eq 'END_UNKNOWNREFERER' || $field[0] eq "${xmleb}END_UNKNOWNREFERER" || ! $_);
 				if ($field[0] ne 'END_UNKNOWNREFERER' && $field[0] ne "${xmleb}END_UNKNOWNREFERER") { error("History file \"$filetoread\" is corrupted (End of section UNKNOWNREFERER not found).\nRestore a recent backup of this file (data for this month will be restored to backup date), remove it (data for month will be lost), or remove the corrupted section in file (data for at least this section will be lost).","","",1); }
@@ -2773,7 +2773,7 @@
 					}
 					$_=<HISTORY>;
 					chomp $_; s/\r//;
-					@field=split(/\s+/,($readxml?CleanFromTags($_):$_)); $countlines++;
+					@field=split(/\s+/,($readxml?XMLDecodeFromHisto($_):$_)); $countlines++;
 				}
 				until ($field[0] eq 'END_UNKNOWNREFERERBROWSER' || $field[0] eq "${xmleb}END_UNKNOWNREFERERBROWSER" || ! $_);
 				if ($field[0] ne 'END_UNKNOWNREFERERBROWSER' && $field[0] ne "${xmleb}END_UNKNOWNREFERERBROWSER") { error("History file \"$filetoread\" is corrupted (End of section UNKNOWNREFERERBROWSER not found).\nRestore a recent backup of this file (data for this month will be restored to backup date), remove it (data for month will be lost), or remove the corrupted section in file (data for at least this section will be lost).","","",1); }
@@ -2801,7 +2801,7 @@
 					}
 					$_=<HISTORY>;
 					chomp $_; s/\r//;
-					@field=split(/\s+/,($readxml?CleanFromTags($_):$_)); $countlines++;
+					@field=split(/\s+/,($readxml?XMLDecodeFromHisto($_):$_)); $countlines++;
 				}
 				until ($field[0] eq 'END_SCREENSIZE' || $field[0] eq "${xmleb}END_SCREENSIZE" || ! $_);
 				if ($field[0] ne 'END_SCREENSIZE' && $field[0] ne "${xmleb}END_SCREENSIZE") { error("History file \"$filetoread\" is corrupted (End of section SCREENSIZE not found).\nRestore a recent backup of this file (data for this month will be restored to backup date), remove it (data for month will be lost), or remove the corrupted section in file (data for at least this section will be lost).","","",1); }
@@ -2832,7 +2832,7 @@
 					}
 					$_=<HISTORY>;
 					chomp $_; s/\r//;
-					@field=split(/\s+/,($readxml?CleanFromTags($_):$_)); $countlines++;
+					@field=split(/\s+/,($readxml?XMLDecodeFromHisto($_):$_)); $countlines++;
 				}
 				until ($field[0] eq 'END_ROBOT' || $field[0] eq "${xmleb}END_ROBOT" || ! $_);
 				if ($field[0] ne 'END_ROBOT' && $field[0] ne "${xmleb}END_ROBOT") { error("History file \"$filetoread\" is corrupted (End of section ROBOT not found).\nRestore a recent backup of this file (data for this month will be restored to backup date), remove it (data for month will be lost), or remove the corrupted section in file (data for at least this section will be lost).","","",1); }
@@ -2862,7 +2862,7 @@
 					}
 					$_=<HISTORY>;
 					chomp $_; s/\r//;
-					@field=split(/\s+/,($readxml?CleanFromTags($_):$_)); $countlines++;
+					@field=split(/\s+/,($readxml?XMLDecodeFromHisto($_):$_)); $countlines++;
 				}
 				until ($field[0] eq 'END_WORMS' || $field[0] eq "${xmleb}END_WORMS" || ! $_);
 				if ($field[0] ne 'END_WORMS' && $field[0] ne "${xmleb}END_WORMS") { error("History file \"$filetoread\" is corrupted (End of section WORMS not found).\nRestore a recent backup of this file (data for this month will be restored to backup date), remove it (data for month will be lost), or remove the corrupted section in file (data for at least this section will be lost).","","",1); }
@@ -2892,7 +2892,7 @@
 					}
 					$_=<HISTORY>;
 					chomp $_; s/\r//;
-					@field=split(/\s+/,($readxml?CleanFromTags($_):$_)); $countlines++;
+					@field=split(/\s+/,($readxml?XMLDecodeFromHisto($_):$_)); $countlines++;
 				}
 				until ($field[0] eq 'END_EMAILSENDER' || $field[0] eq "${xmleb}END_EMAILSENDER" || ! $_);
 				if ($field[0] ne 'END_EMAILSENDER' && $field[0] ne "${xmleb}END_EMAILSENDER") { error("History file \"$filetoread\" is corrupted (End of section EMAILSENDER not found).\nRestore a recent backup of this file (data for this month will be restored to backup date), remove it (data for month will be lost), or remove the corrupted section in file (data for at least this section will be lost).","","",1); }
@@ -2922,7 +2922,7 @@
 					}
 					$_=<HISTORY>;
 					chomp $_; s/\r//;
-					@field=split(/\s+/,($readxml?CleanFromTags($_):$_)); $countlines++;
+					@field=split(/\s+/,($readxml?XMLDecodeFromHisto($_):$_)); $countlines++;
 				}
 				until ($field[0] eq 'END_EMAILRECEIVER' || $field[0] eq "${xmleb}END_EMAILRECEIVER" || ! $_);
 				if ($field[0] ne 'END_EMAILRECEIVER' && $field[0] ne "${xmleb}END_EMAILRECEIVER") { error("History file \"$filetoread\" is corrupted (End of section EMAILRECEIVER not found).\nRestore a recent backup of this file (data for this month will be restored to backup date), remove it (data for month will be lost), or remove the corrupted section in file (data for at least this section will be lost).","","",1); }
@@ -2984,7 +2984,7 @@
 					}
 					$_=<HISTORY>;
 					chomp $_; s/\r//;
-					@field=split(/\s+/,($readxml?CleanFromTags($_):$_)); $countlines++;
+					@field=split(/\s+/,($readxml?XMLDecodeFromHisto($_):$_)); $countlines++;
 				}
 				until ($field[0] eq 'END_SIDER' || $field[0] eq "${xmleb}END_SIDER" || ! $_);
 				if ($field[0] ne 'END_SIDER' && $field[0] ne "${xmleb}END_SIDER") { error("History file \"$filetoread\" is corrupted (End of section SIDER not found).\nRestore a recent backup of this file (data for this month will be restored to backup date), remove it (data for month will be lost), or remove the corrupted section in file (data for at least this section will be lost).","","",1); }
@@ -3016,7 +3016,7 @@
 					}
 					$_=<HISTORY>;
 					chomp $_; s/\r//;
-					@field=split(/\s+/,($readxml?CleanFromTags($_):$_)); $countlines++;
+					@field=split(/\s+/,($readxml?XMLDecodeFromHisto($_):$_)); $countlines++;
 				}
 				until ($field[0] eq 'END_FILETYPES' || $field[0] eq "${xmleb}END_FILETYPES" || ! $_);
 				if ($field[0] ne 'END_FILETYPES' && $field[0] ne "${xmleb}END_FILETYPES") { error("History file \"$filetoread\" is corrupted (End of section FILETYPES not found).\nRestore a recent backup of this file (data for this month will be restored to backup date), remove it (data for month will be lost), or remove the corrupted section in file (data for at least this section will be lost).","","",1); }
@@ -3066,7 +3066,7 @@
 					}
 					$_=<HISTORY>;
 					chomp $_; s/\r//;
-					@field=split(/\s+/,($readxml?CleanFromTags($_):$_)); $countlines++;
+					@field=split(/\s+/,($readxml?XMLDecodeFromHisto($_):$_)); $countlines++;
 				}
 				until ($field[0] eq 'END_SEREFERRALS' || $field[0] eq "${xmleb}END_SEREFERRALS" || ! $_);
 				if ($field[0] ne 'END_SEREFERRALS' && $field[0] ne "${xmleb}END_SEREFERRALS") { error("History file \"$filetoread\" is corrupted (End of section SEREFERRALS not found).\nRestore a recent backup of this file (data for this month will be restored to backup date), remove it (data for month will be lost), or remove the corrupted section in file (data for at least this section will be lost).","","",1); }
@@ -3109,7 +3109,7 @@
 					}
 					$_=<HISTORY>;
 					chomp $_; s/\r//;
-					@field=split(/\s+/,($readxml?CleanFromTags($_):$_)); $countlines++;
+					@field=split(/\s+/,($readxml?XMLDecodeFromHisto($_):$_)); $countlines++;
 				}
 				until ($field[0] eq 'END_PAGEREFS' || $field[0] eq "${xmleb}END_PAGEREFS" || ! $_);
 				if ($field[0] ne 'END_PAGEREFS' && $field[0] ne "${xmleb}END_PAGEREFS") { error("History file \"$filetoread\" is corrupted (End of section PAGEREFS not found).\nRestore a recent backup of this file (data for this month will be restored to backup date), remove it (data for month will be lost), or remove the corrupted section in file (data for at least this section will be lost).","","",1); }
@@ -3173,7 +3173,7 @@
 					}
 					$_=<HISTORY>;
 					chomp $_; s/\r//;
-					@field=split(/\s+/,($readxml?CleanFromTags($_):$_)); $countlines++;
+					@field=split(/\s+/,($readxml?XMLDecodeFromHisto($_):$_)); $countlines++;
 				}
 				until ($field[0] eq 'END_SEARCHWORDS' || $field[0] eq "${xmleb}END_SEARCHWORDS" || ! $_);
 				if ($field[0] ne 'END_SEARCHWORDS' && $field[0] ne "${xmleb}END_SEARCHWORDS") { error("History file \"$filetoread\" is corrupted (End of section SEARCHWORDS not found).\nRestore a recent backup of this file (data for this month will be restored to backup date), remove it (data for month will be lost), or remove the corrupted section in file (data for at least this section will be lost).","","",1); }
@@ -3210,7 +3210,7 @@
 					}
 					$_=<HISTORY>;
 					chomp $_; s/\r//;
-					@field=split(/\s+/,($readxml?CleanFromTags($_):$_)); $countlines++;
+					@field=split(/\s+/,($readxml?XMLDecodeFromHisto($_):$_)); $countlines++;
 				}
 				until ($field[0] eq 'END_KEYWORDS' || $field[0] eq "${xmleb}END_KEYWORDS" || ! $_);
 				if ($field[0] ne 'END_KEYWORDS' && $field[0] ne "${xmleb}END_KEYWORDS") { error("History file \"$filetoread\" is corrupted (End of section KEYWORDS not found).\nRestore a recent backup of this file (data for this month will be restored to backup date), remove it (data for month will be lost), or remove the corrupted section in file (data for at least this section will be lost).","","",1); }
@@ -3239,7 +3239,7 @@
 					}
 					$_=<HISTORY>;
 					chomp $_; s/\r//;
-					@field=split(/\s+/,($readxml?CleanFromTags($_):$_)); $countlines++;
+					@field=split(/\s+/,($readxml?XMLDecodeFromHisto($_):$_)); $countlines++;
 				}
 				until ($field[0] eq 'END_ERRORS' || $field[0] eq "${xmleb}END_ERRORS" || ! $_);
 				if ($field[0] ne 'END_ERRORS' && $field[0] ne "${xmleb}END_ERRORS") { error("History file \"$filetoread\" is corrupted (End of section ERRORS not found).\nRestore a recent backup of this file (data for this month will be restored to backup date), remove it (data for month will be lost), or remove the corrupted section in file (data for at least this section will be lost).","","",1); }
@@ -3271,7 +3271,7 @@
 						}
 						$_=<HISTORY>;
 						chomp $_; s/\r//;
-						@field=split(/\s+/,($readxml?CleanFromTags($_):$_)); $countlines++;
+						@field=split(/\s+/,($readxml?XMLDecodeFromHisto($_):$_)); $countlines++;
 					}
 					until ($field[0] eq "END_SIDER_$code" || $field[0] eq "${xmleb}END_SIDER_$code" || ! $_);
 					if ($field[0] ne "END_SIDER_$code" && $field[0] ne "${xmleb}END_SIDER_$code") { error("History file \"$filetoread\" is corrupted (End of section SIDER_$code not found).\nRestore a recent backup of this file (data for this month will be restored to backup date), remove it (data for month will be lost), or remove the corrupted section in file (data for at least this section will be lost).","","",1); }
@@ -3304,7 +3304,7 @@
 						}
 						$_=<HISTORY>;
 						chomp $_; s/\r//;
-						@field=split(/\s+/,($readxml?CleanFromTags($_):$_)); $countlines++;
+						@field=split(/\s+/,($readxml?XMLDecodeFromHisto($_):$_)); $countlines++;
 					}
 					until ($field[0] eq "END_EXTRA_$extranum" || $field[0] eq "${xmleb}END_EXTRA_$extranum" || ! $_);
 					if ($field[0] ne "END_EXTRA_$extranum" && $field[0] ne "${xmleb}END_EXTRA_$extranum") { error("History file \"$filetoread\" is corrupted (End of section EXTRA_$extranum not found).\nRestore a recent backup of this file (data for this month will be restored to backup date), remove it (data for month will be lost), or remove the corrupted section in file (data for at least this section will be lost).","","",1); }
@@ -3352,7 +3352,7 @@
 					do {
 						$_=<HISTORY>;
 						chomp $_; s/\r//;
-						@field=split(/\s+/,($readxml?CleanFromTags($_):$_)); $countlines++;
+						@field=split(/\s+/,($readxml?XMLDecodeFromHisto($_):$_)); $countlines++;
 					}
 					until ($field[0] eq "END_PLUGIN_$pluginname" || $field[0] eq "${xmleb}END_PLUGIN_$pluginname" || ! $_);
    				}
@@ -3811,13 +3811,13 @@
 			$keysinkeylist{$_}=1;
 			my $newkey=$_;
 			$newkey =~ s/([^:])\/\//$1\//g;		# Because some targeted url were taped with 2 / (Ex: //rep//file.htm). We must keep http://rep/file.htm
-			print HISTORYTMP "${xmlrb}$newkey${xmlrs}".int($_url_p{$_}||0)."${xmlrs}".int($_url_k{$_}||0)."${xmlrs}".int($_url_e{$_}||0)."${xmlrs}".int($_url_x{$_}||0)."${xmlre}\n";
+			print HISTORYTMP "${xmlrb}".XMLEncodeForHisto($newkey)."${xmlrs}".int($_url_p{$_}||0)."${xmlrs}".int($_url_k{$_}||0)."${xmlrs}".int($_url_e{$_}||0)."${xmlrs}".int($_url_x{$_}||0)."${xmlre}\n";
 		}
 		foreach (keys %_url_p) {
 			if ($keysinkeylist{$_}) { next; }
 			my $newkey=$_;
 			$newkey =~ s/([^:])\/\//$1\//g;		# Because some targeted url were taped with 2 / (Ex: //rep//file.htm). We must keep http://rep/file.htm
-			print HISTORYTMP "${xmlrb}$newkey ".int($_url_p{$_}||0)."${xmlrs}".int($_url_k{$_}||0)."${xmlrs}".int($_url_e{$_}||0)."${xmlrs}".int($_url_x{$_}||0)."${xmlre}\n";
+			print HISTORYTMP "${xmlrb}".XMLEncodeForHisto($newkey)."${xmlrs}".int($_url_p{$_}||0)."${xmlrs}".int($_url_k{$_}||0)."${xmlrs}".int($_url_e{$_}||0)."${xmlrs}".int($_url_x{$_}||0)."${xmlre}\n";
 		}
 		print HISTORYTMP "${xmleb}END_SIDER${xmlee}\n";
 	}
@@ -4340,7 +4340,8 @@
 }
 
 #------------------------------------------------------------------------------
-# Function:		Transforms spaces into %20 and special chars by entities as needed in XML/XHTML
+# Function:		Transforms spaces into %20 and special chars by HTML entities as needed in XML/XHTML
+#				Decoding is done by XMLDecodeFromHisto
 # Parameters:	stringtoencode
 # Return:		encodedstring
 #------------------------------------------------------------------------------
@@ -4348,6 +4349,7 @@
 	my $string = shift;
     $string =~ s/\s/%20/g;
 	if ($BuildHistoryFormat ne 'xml') { return $string; }
+	$string =~ s/=/%3d/g;
 	$string =~ s/&/&/g;
 	$string =~ s/</</g;
 	$string =~ s/>/>/g;
@@ -4445,10 +4447,16 @@
 # Output:       None
 # Return:		decodedstring
 #------------------------------------------------------------------------------
-sub CleanFromTags {
+sub XMLDecodeFromHisto {
 	my $stringtoclean=shift;
 	$stringtoclean =~ s/$regclean1/ /g;	# Replace <recnb> or </td> with space
-	$stringtoclean =~ s/$regclean2//g;	# Remove <xxx>
+	$stringtoclean =~ s/$regclean2//g;	# Remove others <xxx>
+	$stringtoclean =~ s/%3d/=/g;
+	$stringtoclean =~ s/&/&/g;
+	$stringtoclean =~ s/</</g;
+	$stringtoclean =~ s/>/>/g;
+    $stringtoclean =~ s/"/\"/g;
+    $stringtoclean =~ s/'/\'/g;
 	return $stringtoclean;
 }
 


--- NEW FILE awstats.README.SELinux ---
==========================
SELinux support in AWStats
==========================


What is the problem ?
---------------------

AWStats is a CGI script, and needs to be labelled correctly to be called
from Apache.
The files in ``/usr/share/awstats/wwwroot/cgi-bin`` need to have the 
``httpd_sys_script_exec_t`` type, and the databases files in 
``/var/lib/awstats`` need to have the ``httpd_sys_script_rw_t`` type.


How do we solve it ?
--------------------

You can change the type with the ``chcon`` command::

    chcon -R -t httpd_sys_script_exec_t /usr/share/awstats/wwwroot/cgi-bin
    chcon -R -t httpd_sys_script_rw_t /var/lib/awstats

But these modifications will be lost if the system is relabeled (you can
request a relabel with the system-config-security tool).

If you relabel the filesystem, you will need to re-run the above commands.


Index: awstats.spec
===================================================================
RCS file: /cvs/extras/rpms/awstats/EL-4/awstats.spec,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -p -r1.8 -r1.9
--- awstats.spec	22 May 2006 01:08:50 -0000	1.8
+++ awstats.spec	30 May 2009 18:53:20 -0000	1.9
@@ -1,16 +1,21 @@
 Name:       awstats
-Version:    6.5
-Release:    3%{?dist}
+Version:    6.7
+Release:    4%{?dist}
 Summary:    Advanced Web Statistics
-License:    GPL
+License:    GPLv2
 Group:      Applications/Internet
 URL:        http://awstats.sourceforge.net
-Source0:    http://dl.sf.net/awstats/awstats-6.5.tar.gz
-#Source0:   http://awstats.sourceforge.net/files/awstats-6.5.tar.gz
-Patch0:     awstats-6.5-CVE-2006-1945.patch
+Source0:    http://dl.sf.net/awstats/awstats-%{version}.tar.gz
+Source1:    awstats.README.SELinux
+
+# Fix XML output for history files
+# http://awstats.cvs.sourceforge.net/awstats/awstats/wwwroot/cgi-bin/awstats.pl?r1=1.892&r2=1.894&view=patch
+Patch0:     awstats-6.7-xmlhistory.patch
+
+Patch1:     awstats-6.7-CVE-2008-3714.patch
+
 BuildArch:  noarch
 BuildRoot:  %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
-Requires:   httpd
 Requires:   perl
 Requires(post): perl
 Requires(postun): /sbin/service
@@ -31,33 +36,35 @@ The program also supports virtual server
 With the default configuration, the statistics are available:
 http://localhost/awstats/awstats.pl
 
+
 %prep
 %setup -q
-# no backup or the orig file will be installed
 %patch0 -p0
+%patch1 -p1
+
+# patch creates backups even though it shouldn't
+rm wwwroot/cgi-bin/awstats.pl.orig
 
 # Fix style sheets.
 perl -pi -e 's,/icon,/awstatsicons,g' wwwroot/css/*
-
 # Fix some bad file permissions here for convenience.
 chmod -x tools/httpd_conf
 find tools/xslt -type f | xargs chmod -x
+# Remove \r in various files
+perl -pi -e 's/\r//g' docs/COPYING.TXT docs/LICENSE.TXT docs/pad_awstats.xml docs/awstats_changelog.txt docs/styles.css tools/httpd_conf tools/logresolvemerge.pl tools/awstats_exportlib.pl tools/awstats_buildstaticpages.pl tools/maillogconvert.pl tools/urlaliasbuilder.pl wwwroot/cgi-bin/awredir.pl
+# SELinux README
+cp -a %{SOURCE1} README.SELinux
 
-# Remove \r in conf file (file written on MS Windows)
-perl -pi -e 's/\r//g' tools/httpd_conf
 
 %install
 rm -rf $RPM_BUILD_ROOT
 
 ### Create cron job
-%{__cat} <<EOF >awstats.cron
+cat <<EOF >awstats.cron
 #!/bin/bash
-
-if [ -f %{_localstatedir}/log/httpd/access_log ] ; then
-        exec perl %{_datadir}/awstats/tools/awstats_updateall.pl now \
-                -confdir="%{_sysconfdir}/awstats" \
-                -awstatsprog="%{_datadir}/awstats/wwwroot/cgi-bin/awstats.pl" >/dev/null
-fi
+exec %{_datadir}/awstats/tools/awstats_updateall.pl now \
+        -configdir="%{_sysconfdir}/awstats" \
+        -awstatsprog="%{_datadir}/awstats/wwwroot/cgi-bin/awstats.pl" >/dev/null
 exit 0
 EOF
 
@@ -82,7 +89,7 @@ rm -f $RPM_BUILD_ROOT%{_datadir}/%{name}
 ### Commit permanent changes to default configuration
 install -p -m 644 wwwroot/cgi-bin/awstats.model.conf \
     $RPM_BUILD_ROOT/%{_sysconfdir}/%{name}/%{name}.model.conf
-%{__perl} -pi -e '
+perl -pi -e '
                 s|^LogFile=.*$|LogFile="%{_localstatedir}/log/httpd/access_log"|;
                 s|^DirData=.*$|DirData="%{_localstatedir}/lib/awstats"|;
                 s|^DirCgi=.*$|DirCgi="/awstats"|;
@@ -93,16 +100,25 @@ install -p -m 644 wwwroot/cgi-bin/awstat
                 s|^SaveDatabaseFilesWithPermissionsForEveryone=.*$|SaveDatabaseFilesWithPermissionsForEveryone=0|;
                 s|^SkipHosts=.*$|SkipHosts="127.0.0.1"|;
                 s|^Expires=.*$|Expires=3600|;
-        ' $RPM_BUILD_ROOT/%{_sysconfdir}/%{name}/%{name}.model.conf
+            ' $RPM_BUILD_ROOT/%{_sysconfdir}/%{name}/%{name}.model.conf
 install -p -m 644 $RPM_BUILD_ROOT/%{_sysconfdir}/%{name}/%{name}.{model,localhost.localdomain}.conf 
 
 # Fix scripts
-%{__perl} -pi -e 's|/usr/local/awstats|%{_datadir}/awstats|g' \
+perl -pi -e 's|/usr/local/awstats|%{_datadir}/awstats|g' \
              $RPM_BUILD_ROOT%{_datadir}/%{name}/tools/{*.pl,httpd_conf}
 
+# Remove some upstream version control files
+find $RPM_BUILD_ROOT%{_datadir} -name .cvsignore | xargs rm -f
+find docs/ -name .cvsignore | xargs rm -f
+
+# Fix encoding of changelog
+iconv -f iso-8859-1 -t utf-8 < docs/awstats_changelog.txt > docs/awstats_changelog.txt.utf8
+mv docs/awstats_changelog.txt.utf8 docs/awstats_changelog.txt
+
 # Apache configuration
 install -p -m 644 tools/httpd_conf $RPM_BUILD_ROOT/%{_sysconfdir}/httpd/conf.d/%{name}.conf
-%{__perl} -pi -e 's|/usr/local|%{_datadir}|g' $RPM_BUILD_ROOT/%{_sysconfdir}/httpd/conf.d/%{name}.conf
+perl -pi -e 's|/usr/local|%{_datadir}|g;s|Allow from all|Allow from 127.0.0.1|g' \
+             $RPM_BUILD_ROOT/%{_sysconfdir}/httpd/conf.d/%{name}.conf
 echo "# Additional Perl modules
 <IfModule mod_env.c>
     SetEnv PERL5LIB %{_datadir}/awstats/lib:%{_datadir}/awstats/plugins
@@ -115,6 +131,7 @@ install -m 0755 awstats.cron $RPM_BUILD_
 %clean
 rm -rf $RPM_BUILD_ROOT
 
+
 %post
 if [ $1 -eq 1 ]; then
   if [ ! -f %{_sysconfdir}/%{name}/%{name}.`hostname`.conf ]; then
@@ -125,6 +142,13 @@ if [ $1 -eq 1 ]; then
   fi
 fi
 
+# SELinux support
+# Change the file context
+chcon -R -t httpd_sys_script_exec_t %{_datadir}/awstats/wwwroot/cgi-bin || :
+chcon -R -t var_log_t /usr/share/awstats/wwwroot/cgi-bin/awstats.pl
+chcon -R -t httpd_sys_script_rw_t %{_localstatedir}/lib/awstats || :
+
+
 %postun
 if [ $1 -ne 0 ]; then
   /sbin/service httpd condrestart >/dev/null 2>&1
@@ -134,7 +158,7 @@ fi
 %files
 %defattr(-,root,root,755)
 # Apache configuration file
-%config %{_sysconfdir}/httpd/conf.d/%{name}.conf
+%config(noreplace) %{_sysconfdir}/httpd/conf.d/%{name}.conf
 %config(noreplace) %attr(755,root,root) %{_sysconfdir}/cron.hourly/%{name}
 %config(noreplace) %{_sysconfdir}/%{name}/
 %{_localstatedir}/lib/%{name}
@@ -144,7 +168,7 @@ fi
 %{_datadir}/%{name}/wwwroot/cgi-bin
 # Different defattr to fix lots of files which should not be +x.
 %defattr(644,root,root,755)
-%doc README.TXT docs/*
+%doc README.TXT docs/* README.SELinux
 %{_datadir}/%{name}/lang
 %{_datadir}/%{name}/lib
 %{_datadir}/%{name}/plugins
@@ -153,94 +177,22 @@ fi
 %{_datadir}/%{name}/wwwroot/icon
 %{_datadir}/%{name}/wwwroot/js
 
+
+
 %changelog
-* Tue May 09 2006 Aurelien Bompard <gauret[AT]free.fr> 6.5-3
-- really fix CVE-2006-1945...
+* Sat Dec 06 2008 Tim Jackson <rpm at timj.co.uk> 6.7-4
+- Use Debian's patch for CVE-2008-3714 (#474396)
 
-* Mon May 08 2006 Aurelien Bompard <gauret[AT]free.fr> 6.5-2
-- add patch to fix CVE-2006-1945 (bugs 190921, 190922 and 190923)
+* Fri Aug 29 2008 Tim Jackson <rpm at timj.co.uk> 6.7-3
+- Fix CVE-2008-3714: cross-site scripting security issue (#459605)
 
-* Wed Jan 11 2006 Aurelien Bompard <gauret[AT]free.fr> 6.5-1
-- version 6.5 final
+* Tue May 13 2008 Tim Jackson <rpm at timj.co.uk> 6.7-2
+- awstats does not actually require httpd (#406901)
+- Fix cron script to be compatible with SELinux (#435101)
+- Mark httpd config as noreplace
+- Fix encoding of awstats_changelog.txt
+- Remove some stray upstream temp files
+- Fix EOL encoding of documentation to be consistent
 
-* Mon Aug 22 2005 Aurelien Bompard <gauret[AT]free.fr> 6.5-1
-- version 6.5 (beta), fixes CAN-2005-1527
-
-* Mon Mar 21 2005 Aurelien Bompard <gauret[AT]free.fr> 6.4-1
-- version 6.4 final
-- change release tag (following Owen's scheme)
-- convert tabs into spaces
-
-* Tue Feb 15 2005 Aurelien Bompard <gauret[AT]free.fr> 6.4-0.1.pre
-- update to 6.4pre to fix a vulnerability
-
-* Thu Feb 10 2005 Aurelien Bompard <gauret[AT]free.fr> 6.3-1
-- version 6.3 final
-
-* Thu Jan 27 2005 Aurelien Bompard <gauret[AT]free.fr> 6.3-0.1.20050122
-- update to 6.3pre to fix vulnerability
-
-* Sun Nov 28 2004 Aurelien Bompard <gauret[AT]free.fr> 6.2-0.fdr.1
-- version 6.2
-
-* Thu May 20 2004 Aurelien Bompard <gauret[AT]free.fr> 6.1-0.fdr.6
-- remove redundant substitution
-
-* Thu May 20 2004 Aurelien Bompard <gauret[AT]free.fr> 6.1-0.fdr.5
-- be closer to upstream default configuration
-- use the included apache conf file
-- merge changes from Michael Schwendt (bug 1608)
-
-* Wed May 19 2004 Aurelien Bompard <gauret[AT]free.fr> 6.1-0.fdr.4
-- fix cron job for relocated tools
-
-* Wed May 19 2004 Aurelien Bompard <gauret[AT]free.fr> 6.1-0.fdr.3
-- keep the tools in the tools subdirectory
-
-* Wed May 19 2004 Aurelien Bompard <gauret[AT]free.fr> 6.1-0.fdr.2
-- fix scripts in /usr/bin
-- rename configure.pl to awstats_configure.pl
-
-* Sun May 16 2004 Aurelien Bompard <gauret[AT]free.fr> 6.1-0.fdr.1
-- version 6.1
-
-* Wed Mar 03 2004 Aurelien Bompard <gauret[AT]free.fr> 6.0.0.fdr.2
-- requires perl without version to fix build on rh9
-
-* Tue Feb 19 2004 Aurelien Bompard <gauret[AT]free.fr> 6.0-0.fdr.1
-- version 6.0
-
-* Mon Dec 22 2003 Aurelien Bompard <gauret[AT]free.fr> 5.9-0.fdr.5
-- solve stupid bug in %%install
-- only create the preconfigured config file on install, not on upgrade
-
-* Mon Dec 22 2003 Aurelien Bompard <gauret[AT]free.fr> 5.9-0.fdr.4
-- post scriptlet doesn't overwrite user configuration now
-  be careful if you upgrade from 5.9-0.fdr.3
-- replace _DATADIR in apache configuration in the install stage
-  (was in the post scriptlet before)
-- remove 'noreplace' tag from the apache config file
-- various cleanups in the %%install stage
-- Thanks to Mickael Schwendt.
-
-* Sun Dec 07 2003 Aurelien Bompard <gauret[AT]free.fr> 5.9-0.fdr.3
-- %%post et %%postun now use condrestart instead of restart
-- only restart apache if we are upgrading
-- install and cp use the "-p" switch
-- use %%_datadir in /etc/httpd/conf.d/awstats.conf
-- improve cron job 
-- don't brutally recode HTML pages
-- the scan is now done hourly instead of daily
-- *.pm files are not executable any more
-- tools are in %%bindir
-- various other improvements
-- many thanks to Michael Schwendt and Dag Wieers.
-
-* Sat Nov 29 2003 Aurelien Bompard <gauret[AT]free.fr> 5.9-0.fdr.2
-- Set the hostname in %%post (thanks to Michael Koziarski)
-- Improved customization in %%post
-
-* Sun Nov 16 2003 Aurelien Bompard <gauret[AT]free.fr> 5.9-0.fdr.1
-- fix /etc/cron.daily/awstats permissions
-- fix log name in conf file
-- port to fedora (from Mandrake)
+* Tue Sep 18 2007 Tim Jackson <rpm at timj.co.uk> 6.7-1
+- initial import to EPEL-4, from Fedora


Index: sources
===================================================================
RCS file: /cvs/extras/rpms/awstats/EL-4/sources,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -p -r1.8 -r1.9
--- sources	22 May 2006 01:08:50 -0000	1.8
+++ sources	30 May 2009 18:53:20 -0000	1.9
@@ -1 +1 @@
-aef00b2ff5c5413bd2a868299cabd69a  awstats-6.5.tar.gz
+512cd146247eb178ef023c924f7bb766  awstats-6.7.tar.gz


--- awstats-6.5-CVE-2006-1945.patch DELETED ---




More information about the fedora-extras-commits mailing list