Package: squid3
Version: 3.4.8-6+deb8u4
Severity: normal
Tags: patch

Dear Maintainer,

When writing tests for Test-Kitchen (which is a framework to test 
infrastructure), I discovered that 
/etc/init.d/squid3 does not return the correct code with a wrong configuration 
file (/etc/squid3/squid.conf).

I have a wrong configuration file which makes squid3 not start, as you can see 
in the following lines:

# service squid3 start
# tail /var/log/syslog
Mar  8 11:03:51 jessie squid3: Bungled /etc/squid3/squid.conf line 63: acl 
port_aclname port port1
Mar  8 11:03:51 jessie squid3: Bungled /etc/squid3/squid.conf line 63: acl 
port_aclname port port1
Mar  8 11:03:51 jessie squid3: Bungled /etc/squid3/squid.conf line 63: acl 
port_aclname port port1
Mar  8 11:03:51 jessie squid3[11256]: Starting Squid HTTP Proxy 3.x: 
squid3FATAL: Bungled /etc/squid3/squid.conf line 63: acl port_aclname port port1
Mar  8 11:03:51 jessie squid3[11256]: Squid Cache (Version 3.4.8): Terminated 
abnormally.
Mar  8 11:03:51 jessie squid3[11256]: CPU Usage: 0.004 seconds = 0.004 user + 
0.000 sys
Mar  8 11:03:51 jessie squid3[11256]: Maximum Resident Size: 37184 KB
Mar  8 11:03:51 jessie squid3[11256]: Page faults with physical i/o: 0
Mar  8 11:03:51 jessie squid3[11256]: failed!
Mar  8 11:03:51 jessie systemd[1]: Started LSB: Squid HTTP Proxy version 3.x.

If I verify with service or systemctl, they report squid as active/running:

# service squid3 status|grep Active
   Active: active (exited) since Wed 2017-03-08 11:03:51 GMT; 1min 43s ago
# systemctl is-active squid3
active

It seems that the error comes from the regex used in /etc/init.d/squid3 to 
verify if it can run.
The attached patch should resolve the problem.

I hope this problem could be solved in the next release of Stable/Jessie.


-- System Information:
Debian Release: 8.6
  APT prefers stable
  APT policy: (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 3.16.0-4-amd64 (SMP w/1 CPU core)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages squid3 depends on:
ii  adduser                  3.113+nmu3
ii  libc6                    2.19-18+deb8u6
ii  libcap2                  1:2.24-8
ii  libcomerr2               1.42.12-2
ii  libdb5.3                 5.3.28-9
ii  libecap2                 0.2.0-3
ii  libexpat1                2.1.0-6+deb8u3
ii  libgcc1                  1:4.9.2-10
ii  libgssapi-krb5-2         1.12.1+dfsg-19+deb8u2
ii  libk5crypto3             1.12.1+dfsg-19+deb8u2
ii  libkrb5-3                1.12.1+dfsg-19+deb8u2
ii  libldap-2.4-2            2.4.40+dfsg-1+deb8u2
ii  libltdl7                 2.4.2-1.11+b1
ii  libnetfilter-conntrack3  1.0.4-1
ii  libnettle4               2.7.1-5+deb8u1
ii  libpam0g                 1.1.8-3.1+deb8u1+b1
ii  libsasl2-2               2.1.26.dfsg1-13+deb8u1
ii  libstdc++6               4.9.2-10
ii  libxml2                  2.9.1+dfsg1-5+deb8u3
ii  logrotate                3.8.7-1+b1
ii  lsb-base                 4.1+Debian13+nmu1
ii  netbase                  5.3
ii  squid3-common            3.4.8-6+deb8u4

squid3 recommends no packages.

Versions of packages squid3 suggests:
pn  resolvconf   <none>
pn  smbclient    <none>
pn  squid-cgi    <none>
pn  squid-purge  <none>
pn  squidclient  <none>
pn  ufw          <none>
pn  winbindd     <none>

-- Configuration Files:
/etc/init.d/squid3 changed [not included]
/etc/squid3/squid.conf changed [not included]

-- no debconf information
--- debian/squid3.rc	2016-12-18 10:47:19.000000000 +0000
+++ /etc/init.d/squid3	2017-03-08 11:07:52.200000000 +0000
@@ -130,7 +130,7 @@
 
 case "$1" in
     start)
-	res=`$DAEMON -k parse -f $CONFIG 2>&1 | grep -o "FATAL .*"`
+	res=`$DAEMON -k parse -f $CONFIG 2>&1 | grep -o "FATAL: .*"`
 	if test -n "$res";
 	then
 		log_failure_msg "$res"
@@ -153,7 +153,7 @@
 	fi
 	;;
     reload|force-reload)
-	res=`$DAEMON -k parse -f $CONFIG 2>&1 | grep -o "FATAL .*"`
+	res=`$DAEMON -k parse -f $CONFIG 2>&1 | grep -o "FATAL: .*"`
 	if test -n "$res";
 	then
 		log_failure_msg "$res"
@@ -166,7 +166,7 @@
 	fi
 	;;
     restart)
-	res=`$DAEMON -k parse -f $CONFIG 2>&1 | grep -o "FATAL .*"`
+	res=`$DAEMON -k parse -f $CONFIG 2>&1 | grep -o "FATAL: .*"`
 	if test -n "$res";
 	then
 		log_failure_msg "$res"

Reply via email to