From 846a6c9606c180815f40e5b91fdb7135ae3f81fe Mon Sep 17 00:00:00 2001 From: Ken Neighbors Date: Thu, 29 Apr 2010 14:12:49 -0700 Subject: Add patch to report error when config file exists but cannot be read. Closes: #572353, thanks to Ken Neighbors. --- debian/patches/1015_config_read_error.patch | 26 ++++++++++++++++++++++++++ debian/patches/series | 1 + 2 files changed, 27 insertions(+), 0 deletions(-) create mode 100644 debian/patches/1015_config_read_error.patch diff --git a/debian/patches/1015_config_read_error.patch b/debian/patches/1015_config_read_error.patch new file mode 100644 index 0000000..be08c20 --- /dev/null +++ b/debian/patches/1015_config_read_error.patch @@ -0,0 +1,26 @@ +Description: Report error when config file exists but cannot be read. +Author: Ken Neighbors +Bug-Debian: http://bugs.debian.org/572353 + +Index: awstats/wwwroot/cgi-bin/awstats.pl +=================================================================== +--- awstats.orig/wwwroot/cgi-bin/awstats.pl 2007-07-07 11:00:06.000000000 +0000 ++++ awstats/wwwroot/cgi-bin/awstats.pl 2010-04-29 20:34:08.000000000 +0000 +@@ -1742,11 +1742,17 @@ + $FileSuffix = ".$SiteConfig"; + last; + } ++ elsif ( -e "$searchdir$PROG.$SiteConfig.conf" ) { ++ error("Couldn't open config file \"$searchdir$PROG.$SiteConfig.conf\": $!" ); ++ } + if ( open( CONFIG, "$searchdir$PROG.conf" ) ) { + $FileConfig = "$searchdir$PROG.conf"; + $FileSuffix = ''; + last; + } ++ elsif ( -e "$searchdir$PROG.conf" ) { ++ error("Couldn't open config file \"$searchdir$PROG.conf\": $!" ); ++ } + } + if ( !$FileConfig ) { + error( diff --git a/debian/patches/series b/debian/patches/series index 88bb06f..ec29f1c 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -10,4 +10,5 @@ 1012_ipv6_strip_trailing_dot.patch 1013_yahoo_search.patch 1014_websec_robot.patch +1015_config_read_error.patch 2001_awstatsprog_path.patch -- 1.5.6.5