Package: squidguard
Version: 1.5-4
Severity: important

Dear Maintainer,

I've installed and configured squidguard, adding some loca custom lists and
some lists from common repository.

But squidguard does not run, and squid3 ''crash'' because of repeated
failures of the redirector.

After fiddling a bit, i've found that database get not built, because the
script /usr/sbin/update-squidguard cannot run the update process:

 root@brucaliffo:~# bash -x /usr/sbin/update-squidguard 
 + set -e
 + '[' 0 -gt 0 ']'
 + CONFDIR=/etc/squidguard
 + CONFOLD=/etc/squid
 + CONFFILE=squidGuard.conf
 + DATADIR=
 + DBVFILE=
 + DB_ACT=
 + DB_OLD=
 + REBUILD=y
 + INITRUN=
 + test '!' -e /etc/squidguard/squidGuard.conf
 + '[' '!' -z ']'
 + test -d /etc/squidguard
 + test '!' -e /etc/squidguard/squidGuard.conf
 + chown proxy:proxy /etc/squidguard/squidGuard.conf
 + chmod 0640 /etc/squidguard/squidGuard.conf
 ++ grep '^dbhome' /etc/squidguard/squidGuard.conf
 ++ cut '-d ' -f2
 + DATADIR=/var/lib/squidguard/db
 + DBVFILE=/var/lib/squidguard/db/../dbversion
 + '[' '!' -z ']'
 + test -d /var/lib/squidguard/db
 ++ ls -1 /var/lib/squidguard/db
 ++ wc -l
 + '[' 4 -eq 0 ']'
 + chown -R proxy:proxy /var/lib/squidguard/db
 + find /var/lib/squidguard/db -type d
 + xargs chmod 2750
 + '[' '!' -z ']'
 ++ squidGuard -v
 ++ sed 's/.*DB\ \(.*\):.*/\1/'
 + DB_ACT=5.3.28
 + '[' '!' -z ']'
 + '[' y = y ']'
 + echo 'Rebuild SquidGuard database - this can take a while.'
 Rebuild SquidGuard database - this can take a while.
 + su - proxy -c 'squidGuard  -C all'
 This account is currently not available.

After fiddling a bit, i've found the culprit: now the shell of the 'proxy'
user is invalid:

 root@brucaliffo:~# getent passwd proxy
 proxy:x:13:13:proxy:/bin:/usr/sbin/nologin

A simple patch solves the trouble. Attached.

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

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

Versions of packages squidguard depends on:
ii  debconf [debconf-2.0]  1.5.56
ii  libc6                  2.19-18
ii  libdb5.3               5.3.28-9
ii  libldap-2.4-2          2.4.40+dfsg-1

Versions of packages squidguard recommends:
ii  liburi-perl  1.64-1
ii  libwww-perl  6.08-1
ii  squid3       3.4.8-6

Versions of packages squidguard suggests:
ii  ldap-utils      2.4.40+dfsg-1
pn  squidguard-doc  <none>

-- Configuration Files:
/etc/squidguard/squidGuard.conf.default [Errno 13] Permesso negato: 
u'/etc/squidguard/squidGuard.conf.default'

-- debconf information:
  squidguard/dbreload: true
--- /usr/sbin/update-squidguard.orig	2015-07-22 11:59:24.239042429 +0200
+++ /usr/sbin/update-squidguard	2015-07-22 12:00:19.403036392 +0200
@@ -91,7 +91,7 @@
 # rebuild database if needed
 if [ $REBUILD = "y" ]; then
   echo "Rebuild SquidGuard database - this can take a while."  >&2
-  su - proxy -c "squidGuard ${VBPAR} -C all"
+  su -s /bin/sh -c 'squidGuard ${VBPAR} -C all' - proxy
   # update info file with Berkeley DB version
   echo ${DB_ACT}  >${DBVFILE}
   [ ! -z $VERBOSE ] && echo "Rebuild done."  >&2

Reply via email to