Bug#228537: apache-common: listconffiles doesn't handle " characters very well
Package: apache-common
Version: 1.3.29.0.1-3
Severity: normal
Tags: sid patch
Hello All,
While upgrading to apache 1.3.29.0.1-3 from 1.3.27 I ran into a bug in
listconffiles. It seems it breaks when Include directives are written like so:
Include "/etc/apache/local.conf"
The Include gets detected as "/etc/apache/local.conf", not
/etc/apache/local.conf, without the quotes. The same applies to ServerRoot
directives.
The result is listconffiles trying to open:
"/etc/apache/"/"/etc/apache/local.conf"
The following patch fixes the problem:
__________________________________________________
--- /usr/share/apache/listconffiles.old 2004-01-19 16:56:22.000000000 +0100
+++ /usr/share/apache/listconffiles 2004-01-19 16:58:23.000000000 +0100
@@ -52,6 +52,7 @@
s/^\s*(.*)/$1/;
(undef,$serverroot) = split;
($serverroot .= "/") unless ($serverroot =~ m|/$|);
+ $serverroot =~ s/"//g;
# print "DEBUG: Found ServerRoot to be $serverroot\n";
}
@@ -59,6 +60,8 @@
s/^\s*(.*)/$1/;
my (undef,$file) = split;
+ $file =~ s/"//g;
+
if ($file !~ m|^/| ) {
$file = $serverroot . $file;
}
--------------------------------------------------
Simple, but effective. This now works on my system.
Regards,
Allard Hoeve
-- System Information:
Debian Release: testing/unstable
Architecture: sparc
Kernel: Linux baco 2.4.21 #4 Fri Aug 1 13:36:07 CEST 2003 sparc64
Locale: LANG=C, LC_CTYPE=C
Versions of packages apache-common depends on:
ii apache-utils 1.3.29.0.1-3 Utility programs for webservers
ii debconf 1.3.22 Debian configuration management sy
ii libc6 2.3.2.ds1-10 GNU C Library: Shared libraries an
ii libdb4.1 4.1.25-16 Berkeley v4.1 Database Libraries [
ii libexpat1 1.95.6-6 XML parsing C library - runtime li
ii mime-support 3.23-1 MIME files 'mime.types' & 'mailcap
ii perl [perl5] 5.8.2-2 Larry Wall's Practical Extraction
ii sed 4.0.7-3.0.1 The GNU sed stream editor
-- debconf information:
* apache-common/confignotes:
apache-common/old-logrotate-exists:
apache-common/logs:
apache-shared/debconf-modules: mod_userdir, mod_status, mod_ssl, mod_setenvif, mod_rewrite, mod_negotiation, mod_mime_magic, mod_mime, mod_log_config, mod_env, mod_dir, mod_cgi, mod_autoindex, mod_auth, mod_alias, mod_actions, mod_access, mod_php4
apache-shared/restart: false
Reply to: