--- dansguardian-2.10.1.1.orig/debian/contentregexplist
+++ dansguardian-2.10.1.1/debian/contentregexplist
@@ -0,0 +1,12 @@
+#Content modifying Regular Expressions
+#
+# The format is: "extended regular expression"->"replacement straight string"
+# E.g. "shit"->"censored" would replace all occurances of shit in any case.
+# Far more complicated matches are possible.  See other sources for examples
+# of extended regular expressions.
+
+# These are just some weak examples.  If you write any, for example, to
+# remove popups etc, please send them to author at dansguardian.org.
+
+#"<script language.*open\(.*script>"->"<!-- its gone -->"
+#"fuck|cunt|shit|arse"->"**censored**"
--- dansguardian-2.10.1.1.orig/debian/dansguardian.logrotate
+++ dansguardian-2.10.1.1/debian/dansguardian.logrotate
@@ -0,0 +1,10 @@
+/var/log/dansguardian/access.log {
+	rotate 5
+	daily
+	prerotate
+		/etc/init.d/dansguardian stop > /dev/null 2>&1 || true
+	endscript
+	postrotate
+		/etc/init.d/dansguardian start > /dev/null 2>&1
+	endscript
+}
--- dansguardian-2.10.1.1.orig/debian/rules
+++ dansguardian-2.10.1.1/debian/rules
@@ -0,0 +1,36 @@
+#!/usr/bin/make -f
+
+# Include dpatch stuff.
+include /usr/share/dpatch/dpatch.make
+
+%:
+	dh $@ --with dpatch,autotools_dev,autoreconf
+
+override_dh_auto_configure:
+	./configure \
+		--prefix=/usr \
+		--enable-clamav=yes \
+		--enable-clamd=yes \
+		--enable-kavd=yes \
+		--with-proxyuser=dansguardian \
+		--with-proxygroup=dansguardian \
+		--sysconfdir=/etc \
+		--localstatedir=/var \
+		--enable-icap=yes \
+		--enable-commandline=yes \
+		--enable-email=yes \
+		--enable-ntlm=yes \
+		--enable-trickledm=yes \
+		--mandir=\$${prefix}/share/man \
+		--infodir=\$${prefix}/share/info
+
+override_dh_auto_install:
+	dh_auto_install
+	mv debian/dansguardian/usr/share/dansguardian/languages/ debian/dansguardian/etc/dansguardian/
+	mv debian/dansguardian/usr/share/dansguardian/dansguardian.pl debian/dansguardian/usr/lib/cgi-bin/
+	chmod 755 debian/dansguardian/usr/lib/cgi-bin/dansguardian.pl
+	rm -rf debian/dansguardian/usr/share/dansguardian/scripts/
+	rm -f debian/dansguardian/etc/dansguardian/logrotation
+
+override_dh_installinit:
+	dh_installinit --error-handler=init_failed
--- dansguardian-2.10.1.1.orig/debian/dansguardian.install
+++ dansguardian-2.10.1.1/debian/dansguardian.install
@@ -0,0 +1,2 @@
+debian/detailedinstallation2.html usr/share/doc/dansguardian
+debian/installation2.html usr/share/doc/dansguardian
--- dansguardian-2.10.1.1.orig/debian/watch
+++ dansguardian-2.10.1.1/debian/watch
@@ -0,0 +1,3 @@
+version=3
+
+http://dansguardian.org/downloads/2/Stable/dansguardian-(.*)\.tar\.gz
--- dansguardian-2.10.1.1.orig/debian/NEWS
+++ dansguardian-2.10.1.1/debian/NEWS
@@ -0,0 +1,50 @@
+dansguardian (2.9.9.3-1) unstable; urgency=low
+
+  This is the first upload of the new dansguardian 2.9 tree. It changes
+  several things: 
+
+  - there is no loger a patch needed for antivirussupport. Unfortunatly 
+    that means that the old configuration syntax is not valid any more. 
+    On the other hand this version has support for icap and
+    commandlinescanners. For configuration details see
+    /etc/dansguardian/contentscanners. 
+
+  - Nearly all configuration files were moved to /etc/dansguardian/lists. 
+    I did my beѕt to made the migration as painless as possible. But if you 
+    renamed filterfiles or had custom ones they could not get moved
+    automatically. Please look into /etc/dansguardian/lists and
+    /etc/dansguardian⁄dansgardianf1.conf how to integrate them into
+    Dansguardian 2.9. 
+
+  - Since there were so many changes and new features its recommended to
+    start with a new config (this means dansguardian.conf and
+    dansguardianf1.conf, not your filter files). An automatic migration is
+    unfortunatly not possible. 
+
+ -- Alexander Wirt <formorer@debian.org>  Mon, 24 Mar 2008 15:55:54 +0100
+
+dansguardian (2.8.0.6-antivirus-6.4.4-1) unstable; urgency=low
+
+   The option tricklescanlength has been renamed to forkscanlength. 
+   Please change this in your configuration file. 
+
+ -- Alexander Wirt <formorer@debian.org>  Sun, 22 Oct 2006 17:49:05 +0200
+
+dansguardian (2.8.0.6-antivirus-6.3.8-1) unstable; urgency=low
+
+  I included Aecio F. Neto antiviruspatch for dansguardian, this makes it
+  possible to scan websites and file for viruses using the clamav engine. 
+  You will have to adapt your config with the new antivirus options. See
+  /usr/share/doc/README.AV for more informations. 
+  Its not possible to use clamd or kapersky antivirus with the debian package,
+  because the code has to be patched to get another engine working. 
+
+ -- Alexander Wirt <formorer@debian.org>  Thu, 18 Aug 2005 09:11:10 +0200
+dansguardian (2.9.9.3-1) unstable; urgency=low
+
+   The option tricklescanlength has been renamed to forkscanlength. 
+   Please change this in your configuration file. 
+
+  
+
+ -- Alexander Wirt <formorer@debian.org>  Mon, 24 Mar 2008 15:55:54 +0100
--- dansguardian-2.10.1.1.orig/debian/postrm
+++ dansguardian-2.10.1.1/debian/postrm
@@ -0,0 +1,9 @@
+#!/bin/sh -e
+
+if [ "$1" = "purge" ]; then
+	deluser dansguardian > /dev/null || true
+	rm -rf /var/log/dansguardian
+	rm -rf /etc/dansguardian
+fi
+
+#DEBHELPER#
--- dansguardian-2.10.1.1.orig/debian/compat
+++ dansguardian-2.10.1.1/debian/compat
@@ -0,0 +1 @@
+9
--- dansguardian-2.10.1.1.orig/debian/postinst
+++ dansguardian-2.10.1.1/debian/postinst
@@ -0,0 +1,35 @@
+#! /bin/sh -e
+
+if ! id -u dansguardian > /dev/null 2>&1 ; then
+    adduser --system --group \
+	--disabled-login \
+	--gecos "DansGuardian User" \
+	--home /var/log/dansguardian \
+	--shell /bin/sh \
+	dansguardian
+fi
+
+dguser=`grep daemonuser /etc/dansguardian/dansguardian.conf|grep -v '^\ *#' \
+	|awk -F = '{print $2}'|tr -d \ \'`
+
+dggroup=`grep daemongroup /etc/dansguardian/dansguardian.conf|grep -v '^\ *#' \
+	|awk -F = '{print $2}'|tr -d \ \'`
+
+logdir=`grep loglocation /etc/dansguardian/dansguardian.conf|grep -v '^\ *#' \
+	|awk -F = '{print $2}'|tr -d \ \'|xargs -r dirname 2>/dev/null`
+
+echo "$logdir"
+test -z "$dguser" && dguser=dansguardian
+test -z "$dggroup" && dggroup=dansguardian
+test -z "$logdir" && logdir=/var/log/dansguardian
+
+chown -R $dguser:$dggroup $logdir
+chmod -R u+wr $logdir
+chmod u+wrx $logdir
+
+init_failed ()
+{
+	echo "WARNING: Starting dansguardian failed. Please check your configuration."
+}
+
+#DEBHELPER#
--- dansguardian-2.10.1.1.orig/debian/control
+++ dansguardian-2.10.1.1/debian/control
@@ -0,0 +1,34 @@
+Source: dansguardian
+Section: web
+Priority: optional
+Maintainer: Alexander Wirt <formorer@debian.org>
+Build-Depends: autotools-dev,
+               debhelper (>= 9),
+               dh-autoreconf,
+               dpatch (>= 2.0.32~),
+               libclamav-dev (>= 0.90),
+               libpcre3-dev,
+               zlib1g-dev
+Standards-Version: 3.9.2
+Vcs-Browser: https://github.com/formorer/pkg-dansguardian
+Vcs-Git: git://github.com/formorer/pkg-dansguardian.git
+
+Package: dansguardian
+Architecture: any
+Depends: adduser, clamav (>= 0.80), perl, ${misc:Depends}, ${shlibs:Depends}
+Suggests: clamav-freshclam, squid
+Description: Web content filtering
+ DansGuardian filters the content of pages based on many methods
+ including phrase matching, PICS filtering and URL filtering. It does
+ not purely filter based on a banned list of sites.
+ .
+ It provides real-time virus scanning capabilities for content access.
+ .
+ DansGuardian is designed to be completely flexible and allows you to tailor
+ the filtering to your exact needs. It can be as draconian or as
+ unobstructive as you want. The default settings are geared towards what a
+ primary school might want but DansGuardian puts you in control of what you
+ want to block.
+ .
+ DansGuardian requires squid or another similar caching proxy server
+ on your local network.
--- dansguardian-2.10.1.1.orig/debian/dansguardian.lintian-overrides
+++ dansguardian-2.10.1.1/debian/dansguardian.lintian-overrides
@@ -0,0 +1,2 @@
+dansguardian: non-standard-executable-perm usr/lib/cgi-bin/dansguardian.pl 0655 != 0755
+dansguardian: dir-or-file-in-var-lock var/lock/subsys/
--- dansguardian-2.10.1.1.orig/debian/prerm
+++ dansguardian-2.10.1.1/debian/prerm
@@ -0,0 +1,8 @@
+#! /bin/sh -e
+
+init_failed ()
+{
+        echo "WARNING: Stopping dansguardian failed! Upgrade or removal may be incomplete!" 
+}
+
+#DEBHELPER#
--- dansguardian-2.10.1.1.orig/debian/README.source
+++ dansguardian-2.10.1.1/debian/README.source
@@ -0,0 +1,2 @@
+I use dpatch for patch handling inside the dansguardian package.  Please see
+/usr/share/doc/dpatch/README.source.gz (if you have installed dpatch) for documentation about dpatch.  
--- dansguardian-2.10.1.1.orig/debian/detailedinstallation2.html
+++ dansguardian-2.10.1.1/debian/detailedinstallation2.html
@@ -0,0 +1,477 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<!-- saved from url=(0059)http://dansguardian.org/downloads/detailedinstallation.html -->
+<HTML><HEAD><TITLE>DansGuardian Detailed Installation Guide</TITLE>
+<META http-equiv=Content-Type content="text/html; charset=windows-1252">
+<META http-equiv=PICS-Label 
+content='(PICS-1.1 "http://www.icra.org/ratingsv02.html" l gen true for "http://dansguardian.org/" r (cz 1 lz 1 nz 1 oz 1 vz 1) "http://www.rsac.org/ratingsv01.html" l gen true for "http://dansguardian.org/" r (n 0 s 0 v 0 l 0))'>
+<META content="Microsoft FrontPage 4.0" name=GENERATOR></HEAD>
+<BODY text=#000000 link=#0000ff bgColor=#ffffff>
+<H1 align=center>DansGuardian 2.2.x Detailed Installation Guide</H1>
+<P align=center><strong>Tue 26th March 2002 - Draft 4a</strong> 
+<P align=center><strong>Originally by Daniel Barron, modified by GB</strong> 
+<H2>Contents</H2>
+<UL>
+  <LI><a href="#overview">Overview</a> 
+
+  <LI><a href="#prerequisites">Prerequisites</a> 
+
+  <LI><a href="#collecting">Collecting 
+  what you need</a> 
+  <LI><a href="#installation">Installation 
+  and compilation</a> 
+  <LI><a href="#further">Further 
+  customisation - configuration options</a> 
+  <LI><a href="#squid">Squid 
+  configuration</a> 
+  <LI><a href="#client">Client 
+  Configuration</a> 
+  <LI><a href="#support">Support</a> 
+  </LI></UL>
+<H2>&nbsp;</H2>
+<H2><A name=overview>Overview</A></H2>This is not a HOWTO. This document is an attempt at detailed installation instructions for
+DansGuardian 2.2.x. If you just want 
+to get DansGuardian up and running as quickly as possible, you might want to 
+read the <A href="http://dansguardian.org/?page=documentation">brief 
+installation guide</A>.
+<H2>&nbsp;</H2>
+<H2><A name=prerequisites>Prerequisites</A></H2>You must already be running a fairly recent
+distribution of Linux, FreeBSD, OpenBSD, Solaris or SuSE. You 
+also need to have <STRONG>squid</STRONG> running and configured on port 3128. 
+<P>DansGuardian is a filtering pass-through that sits between the client browser 
+and the Squid proxy. It listens on port 8080 and connects to squid on port 3128.
+So you must have no other daemon running already using port 8080. 
+<P>You will need a web server. Apache (httpd) that comes with RedHat 6.2 is 
+absolutely perfect and you would be hard pushed to find a better web server. The 
+server is used to display a cgi perl script that gives the user notification of 
+an 'Access Denied'. 
+<P>You will need the standard development tools installed such as 
+<STRONG>glibc</STRONG>, 
+<STRONG> autoconf</STRONG>, 
+<STRONG> gcc</STRONG> and <STRONG>make</STRONG>. Debian users will also require <b>zlib1g-dev</b>.
+The default Redhat 6.2 
+installation and most others come with these installed so you don't need to 
+worry about them. 
+<P>Most of the time during this work you will need to be logged on as <b>root</b>. A 
+more experienced user will be able to determine when, however for most people - 
+stay logged on as root for the entirety. 
+<P>Make sure you have all of the above installed and working before you 
+continue. 
+<H2>&nbsp;</H2> 
+<H2><A name=collecting>Collecting what you need</A></H2> 
+<P>Obviously, you need DansGuardian. You can download it from here: <a href="http://dansguardian.org/?page=download">DansGuardian</a>,
+or from the <a href="http://backup.dansguardian.org/?page=download">US mirror</a> site. 
+<p>It is recommended that you download and install from the source as this
+is always the most up to date.&nbsp; However, packages are available for some
+distributions. For the purpose of these instructions, we shall be installing
+from the source.</p>
+<H2>&nbsp;</H2>
+<H2><A name=installation>Installation and compilation</A></H2>
+<P>If you just want to quickly get on with the installation and avoid all this 
+detail, don't forget you can simply follow the <A 
+href="http://dansguardian.org/?page=documentation">brief installation guide</A>. 
+
+<p>1. Download DansGuardian-2.2.*.source.tar.gz into a temporary area, and
+untar with a <b>tar -zxpf</b>.&nbsp; This will create the subdirectory
+DansGuardian-2.2.*.</p><p>DansGuardian uses gnu autoconf, auto-generating the
+Makefile with the "configure" script.</p><p>2. <b>cd</b> into this new directory. Run the configure
+script with the help option (<b>./configure --help</b>) to see the user
+selectable settings (see table below).</p>
+<table border="0" width="439" height="421">
+  <tr>
+    <td width="62">
+      <h4>option</h4>
+    </td>
+    <td width="258" height="42">
+      <h4>description</h4>
+    </td>
+    <td width="97" height="42">
+      <h4>default value</h4>
+    </td>
+  </tr>
+  <tr>
+    <td width="62"><p>bindir</p></td>
+    <td width="258" height="42">where the binary gets placed</td>
+    <td width="97" height="42">/usr/sbin/</td>
+  </tr>
+  <tr>
+    <td width="62"><p>sysconfdir</p></td>
+    <td width="258" height="42">where the config and data files gets placed</td>
+    <td width="97" height="42">/etc/dansguardian/</td>
+  </tr>
+  <tr>
+    <td width="62"><p>sysvdir</p></td>
+    <td width="258" height="42">where the startup script gets placed</td>
+    <td width="97" height="42">/etc/rc.d/init.d/</td>
+  </tr>
+  <tr>
+    <td width="62"><p>cgidir</p></td>
+    <td width="258" height="42">where the cgi-bin dir is located</td>
+    <td width="97" height="42">/home/httpd/cgi-bin/</td>
+  </tr>
+  <tr>
+    <td width="62"><p>mandir</p></td>
+    <td width="258" height="42">where the man docs get placed</td>
+    <td width="97" height="42">/usr/man/</td>
+  </tr>
+  <tr>
+    <td width="62"><p>logdir</p></td>
+    <td width="258" height="42">&nbsp;where the logs get place</td>
+    <td width="97" height="42">/var/log/dansguardian/</td>
+  </tr>
+  <tr>
+    <td width="62"><p>runas_usr</p></td>
+    <td width="258" height="42">the system user the daemon runs as</td>
+    <td width="97" height="42">nobody</td>
+  </tr>
+  <tr>
+    <td width="62"><p>runas_grp</p></td>
+    <td width="258" height="42">the system group the daemon runs as</td>
+    <td width="97" height="42">nobody</td>
+  </tr>
+  <tr>
+    <td width="62"><p>piddir</p></td>
+    <td width="258" height="43">where the pid file gets placed</td>
+    <td width="97" height="43">/var/run/</td>
+  </tr>
+</table>
+<p>3. Run configure with the appropriate options. For examples, see
+section&nbsp; <a href="http://dansguardian.org/downloads/detailedinstallation2.html#ConfigureScripts">Example
+Configure Scripts</a> below.</p>
+<p>RedHat 6.2 and 7.0 users can run
+configure with the default
+settings.	RedHat 7.1 and 7.2 will have to change their cgidir option. Solaris,
+OpenBSD and FreeBSD will have to set just about all settings.<br>
+</p><p>4. Edit the Makefile and verify that all the settings are correct. If not, re-run the configure script.
+If you don't understand Makefiles, skip this step.<br>
+<br>
+5. Run <b>make</b>  to build DansGuardian (<b>gmake</b> for Solaris).<br>
+<br>
+6. Run <b>make install</b>  to create the directory structure, install all the files in the chosen
+paths and set permissions as appropriate.<br>
+<br>
+7. Doing a <b>make clean </b> will remove the now un-needed binaries etc.<br>
+<br>
+8. When a page is denied, DansGuardian redirects to a cgi perl script on your web server to report to the user. This makes it easy to customise the message. This server does not need to be the same machine as the DansGuardian filter server, however if it is not local you will need to amend or comment out the perl script copying line in the Makefile.</p><p>
+To configure the address of your web server that will display the access denied perl
+script, edit the accessdeniedaddress within dansguardian.conf (see sysconfdir
+above).&nbsp; For further
+configuration options, see the&nbsp;<A 
+href="http://dansguardian.org/downloads/detailedinstallation.html#further">Options</A> 
+section.
+</p> 
+<P>9. The last thing that we need to do is configure the log rotation. Log rotation
+ensures that the filesystem does not fill up with a huge log file. Most daemons that log such as httpd and squid rotate their 
+logs once a week. With DansGuardian, there are five log files: access.log, access.log.1,
+access.log.2 ... and so on up to 4.&nbsp; Once a week,
+the oldest of the five log files is deleted, and the remaining logs' names are
+incremented by one, and a new access.log is created. The 
+Makefile copies a log rotation script to the configuration directory. We need to
+schedule this script to run once a week, so (as root) do a <b> <CODE>crontab -e</CODE>  </b> and enter the 
+following: <PRE>59 23 * * sat /etc/dansguardian/logrotation
+</PRE>
+ <p>Then save. This will schedule it for 23:59 every Saturday. Of course you can
+ schedule the log rotation differently or edit the script to your own liking.
+</p>
+<P>DansGuardian is now ready to go. You can start it by just running the binary
+(ie just type <b>dansguardian</b> and hit return).  You can stop it with a <b>dansguardian
+-q</b>.  Or you can use the SysV(-like) script provided. Run a <b>dansguardian
+-h</b> to see other command line options available.<br>
+<br>
+<h2><b><a name="ConfigureScripts">Example Configure Scripts</a></b></h2>
+<p>Here
+are some examples of options for the configure script for different
+distributions:</p><p><b>FreeBSD</b><br>
+A standard configure script that should work, provided you have installed FreeBSD and the associated programs in their default locations.<br>
+<br>
+    ./configure --cgidir=/usr/local/www/cgi-bin/ \<br>
+--sysconfdir=/usr/local/etc/dansguardian/ \<br>
+--sysvdir=/usr/local/etc/rc.d/ \<br>
+--bindir=/usr/local/sbin/ \<br>
+--mandir=/usr/local/man/<br>
+<br>
+<b>OpenBSD</b><br>
+A standard configure script that should work, provided you have installed OpenBSD and the associated programs in their default locations.<br>
+<br>
+    ./configure --cgidir=/var/www/cgi-bin/ \<br>
+	--sysconfdir=/usr/local/etc/dansguardian/ \<br>
+	--sysvdir=/usr/local/etc/rc.d/ \<br>
+	--bindir=/usr/sbin/ \<br>
+	--mandir=/usr/share/man/</p><p><b>RedHat 6.2/7.0<br>
+</b>It is safe to run the configure (./configure) script with the defaults.<br>
+<br>
+<b>RedHat 7.1/7.2<br>
+</b>    ./configure --sysconfdir=/usr/local/etc/dansguardian/ \<br>
+	--sysvdir=/etc/rc.d/init.d/ \<br>
+	--cgidir=/var/www/cgi-bin/<br>
+<br>
+<b>Mandrake 7.2</b><br>
+    ./configure --mandir=/usr/share/man/<br>
+<br>
+<b>Mandrake 8/8.1<br>
+</b>    ./configure --mandir=/usr/share/man/ \<br>
+        --cgidir=/var/www/cgi-bin/<br>
+<br>
+The system user 'squid' might be also appropriate rather than 'nobody' when configuring your
+system's
+"runas" option.</p><p><b>SuSE 7.2<br>
+</b>    ./configure --runas_grp=nogroup \<br>
+        --cgidir=/usr/local/httpd/cgi-bin/<br>
+<br>
+<b>SuSE 7.3</b><br>
+    ./configure --runas_grp=nogroup \<br>
+        --cgidir=/usr/local/httpd/cgi-bin/ \<br>
+        --sysvdir=/etc/init.d/<br>
+</p><p><b>Solaris</b><br>
+Only Solaris 8 (7/01) has been tested.  DansGuardian requires the GNU version of make (gmake), and GCC version 2.95.3 (3.01
+may work but is as yet untested and not recommended).<br>
+<br>
+Both gmake and GCC 2.95.3 are included with the OS on the "Companion CD", and are usually installed in
+/opt/sfw/bin.  To ensure these are in your path, simply do (in csh; bash syntax is different):<br>
+<br>
+    setenv PATH /opt/sfw/bin\:$PATH<br>
+<br>
+To configure and compile, do:<br>
+    ./configure --bindir=/opt/dansguardian/sbin/ \<br>
+        --sysconfdir=/opt/dansguardian/etc/ \<br>
+        --sysvdir=/etc/init.d/ \<br>
+        --cgidir=/var/apache/cgi-bin/ \<br>
+        --mandir=/opt/dansguardian/man/ \<br>
+--logdir=/opt/dansguardian/log/<br>
+<br>
+<br>
+</p>
+<H2><A name=further>Further customisation - configuration 
+options</A></H2>DansGuardian is highly configurable. The source code is provided 
+so you have the ultimate in configurability, although most people will be content with 
+modifying the configuration files. If you do modify the source code 
+please send what you've done to Daniel. 
+<P>After you have modified any configuration file, to apply the changes you will 
+need to restart DansGuardian. To do this run the sysv script with the restart
+option.&nbsp; For example, for RedHat type the following in a terminal: 
+<P><TT>/etc/rc.d/init.d/dansguardian restart</TT> 
+<P><tt>or for OpenBSD:</tt><P><tt>/usr/local/etc/rc.d/dansguardian.sh restart</tt> 
+<P>Alternatively, run a <b>dansguardian -q </b>followed by a <b>dansguardian</b>. 
+<P>There is one main configuration file, several banned lists and an exception 
+list. These are all explained below: 
+<H3>exceptionsitelist</H3>This contains a list of domain endings that if found
+in the requested URL, DansGuardian will not filter the page. Note that you
+should not put the <b>httpd:// </b>or the <b>www.</b> at the beginning of the
+entries.
+<H3>exceptioniplist</H3>This contains a list of client IPs who you want to 
+bypass the filtering. For example, the network administrator's computer's IP. 
+<h3>
+exceptionuserlist</h3>
+<P>Usernames who will not be filtered (basic authentication or ident must be enabled).
+<H3>bannedphraselist</H3>This contains a list of banned phrases. The phrases 
+must be enclosed between &lt; and &gt;. DansGuardian is supplied with an example 
+list. You can not use phrases such as &lt;sex&gt; as this will block sites such 
+as Middlesex University. The phrases can contain spaces. Use them to your 
+advantage. This is the most useful part of DansGuardian and will catch more 
+pages than PICS and URL filtering put together.
+<P>Combinations of phrases can also be used, 
+which if they are all found in a page, it is blocked.
+<H3>bannedmimetypelist</H3>This contains a list of banned MIME-types. If a URL 
+request returns a MIME-type that is in this list, DansGuardian will block it. 
+DansGuardian comes with some example MIME-types to deny. This is a good way of 
+blocking inappropriate movies for example. It is obviously unwise to ban the 
+MIME-types text/html or image/*.
+<H3>bannedextensionlist</H3>This contains a list of banned file extensions. If a 
+URL ends in an extension that is in this list, DansGuardian will block it. 
+DansGuardian comes with some example file extensions to deny. This is a good way 
+of blocking kiddies from downloading those lovely screen savers and hacking 
+tools. You are a fool if you ban the file extension .html, or .jpg etc. 
+<h3>
+bannedregexpurllist</h3>
+<P>
+This contains a list of banned regular expression URLs.&nbsp; For more
+information on regular expressions, click <a href="http://www.opengroup.org/onlinepubs/7908799/xbd/re.html">here</a>. 
+<h3>
+bannedsitelist</h3>
+<P>This file contains a list of banned sites.&nbsp; Entering a domain name here
+bans the entire site.&nbsp; For banning specific parts of a site, see
+bannedurllist. Also, you can have a blanket ban all sites except those
+specifically excluded in exceptionsitelist. You can also block sites specified
+only as an IP address, and include a stock squidGuard blacklists collection. To
+enable these blacklists, download them from the extras section <a href="http://dansguardian.org/?page=extras">here</a>.
+Simply put them somewhere appropriate, un-comment the squidGuard blacklists collection
+lines at the bottom of the bannedsitelist file, and check the paths are correct.
+For URL blacklists, edit the <b>bannedurllist </b>in a similar way. 
+<h3>
+bannedurllist</h3>
+<P>This allows you to block specific parts of a site rather than the whole
+site.&nbsp; To block an entire site, see bannedsitelist. To enable squidGuard
+blacklists for URLs, you will need to download the blacklists and edit the squidGuard blacklists collection
+section at the bottom (as for <b>bannedsitelist</b> above).
+<h3>pics</h3>This file allows you to finely tune the PICS filtering. Each 
+PICS section comes with a description of the allowed settings and what they 
+represent. The default settings with DansGuardian are set for youngish children,
+for example mild profanities and artistic nudity are allowed.
+<p>For more detailed information on PICS ratings, click <a href="http://www.w3.org/PICS/">here</a>.</p>
+<h4>ICRA</h4>
+<p>The ICRA section is fairly self-explanatory.&nbsp; A value of 0 means nothing
+of that category is allowed, whereas a value of 1 allows it. For example,</p>
+<p>ICRAnudityartistic = 1</p>
+<p>allows nude art. For more in-depth information see <a href="http://www.rsac.org/">here</a>.</p>
+<h4> RSAC&nbsp;</h4>
+<p>RSAC is an older version of ICRA. The values here range from 0 meaning none
+allowed, through 2 (the default value), to 4, which allows wanton and gratuitous
+amounts of the given category. For more in-depth information see <a href="http://www.rsac.org/">here</a>.</p>
+<h4>evaluWEB</h4>
+<p>evaluWEB rating uses a system similar to the British Film classification
+system:</p>
+<p>0 = U (<b>U</b>niversal, ie. suitable for even the youngest viewer)</p>
+<p>1 = PG (<b>P</b>arental <b>G</b>uidance recommended)</p>
+<p>2 = 18 (Only suitable for viewers aged <b>18 </b>and over)<br>
+</p>
+<h4>SafeSurf</h4>
+<p>Similar to RSAC, but containing a larger range of categories with the range
+from 0 = full filtering to 9 = wanton and gratuitous. For more in-depth
+information, see <a href="http://www.safesurf.com/">here</a>.</p>
+<h4><br>
+Weburbia</h4>
+<p>See evaluWEB. For more in-depth information, see <a href="http://www.weburbia.com/safe/index.shtml">here</a>.</p>
+<h4><br>
+Vancouver Webpages</h4>
+<p>This is yet another ratings scheme.&nbsp; See <a href="http://vancouver-webpages.com/VWP1.0/">here</a>
+for more information.</p>
+<H3>&nbsp;</H3>
+<H3>dansguardian.conf</H3>
+<p>The only setting that is vital for you to configure in the 
+dansguardian.conf file is the <b> accessdeniedaddress </b> setting. You should set this 
+to the address (<b>not</b> the file path) of your Apache server with the perl access denied reporting 
+script. For most people this will be the same server as squid and DansGuardian. 
+If you really want you can change this address to a normal html static page on 
+any server.</p>
+<H4>Reporting Level</H4>You can change the reporting level for when a page 
+gets denied. It can say just 'Access Denied', or report why, or report why and what
+the denied phrase is. The latter may be more useful for testing, but the middler would be more 
+useful in a school environment. Stealth mode logs what would be denied but
+doesn't do any blocking.
+<H4>Logging Settings</H4>This setting lets you configure the logging level. You can log nothing, just denied pages, text based 
+and all requests. HTTPS requests only get logged when the logging is set to 3 - 
+all requests.
+<H4>Network Settings</H4>These allow you to modify the IP address that
+DansGuardian is listening on, the port DansGuardian listens on, the IP address of the server 
+running squid as well as the squid port. 
+It is possible to configure the Access Denied reporting page here also.
+<H4>Content Filtering Settings</H4>Here you can modify the location of the list 
+files. Adjusting these locations is not recommended. 
+<h4><b> Reverse Lookups for Banned Sites and URLs</b></h4>
+If set to on, DansGuardian will look up the forward DNS for an IP URL address and search for both in the
+banned site and URL lists.  This would prevent a user from simply entering the IP
+for a banned address. It will reduce searching speed somewhat so unless you have a local caching
+DNS server, leave it off and use the Blanket IP Block option in the bannedsitelist file instead.
+<h4> Build bannedsitelist and bannedurllist Cache Files</h4>
+This will compare the date stamp of the list file with the date stamp of the
+cache file and will recreate as needed. If a bsl or bul .processed file exists,
+then that will be used instead. It will increase process start speed by 300%. On
+slow computers this will be significant. Fast computers do not need this option.
+<h4> POST protection (web upload and forms)</h4>
+This is for blocking or limiting uploads, not for blocking forms without any file
+upload.
+The value is given in kilobytes after MIME encoding and header information.
+<h4>Username identification methods (used in logging)</h4>
+The proxyauth option is for when basic proxy authentication is used (obviously
+no good for   transparent proxying). The ntlm option is for when the proxy supports the MS NTLM authentication.&nbsp;
+This only works with IE5.5 sp1 and later, and has not been implemented yet. The ident
+option causes DansGuardian to try to connect to an identd server on the computer
+originating the request.
+<h4>Forwarded For</h4>
+This option adds an X-Forwarded-For: &lt;clientIP&gt; to the HTTP request header.  This may help
+solve some problem sites that need to know the source IP.
+<h4>Max Children</h4>
+<p>This sets the maximum number of processes to spawn to handle the incoming connections.  This will prevent DoS attacks killing the server with
+too many spawned processes. On large sites you might want to double or triple this number.</p>
+<h4>Log Connection Handling Errors</h4>
+<p>This option logs some debug info regarding fork()ing and accept()ing which can usually be ignored.  These are logged by syslog.  It is safe to leave<br>
+this setting on or off.</p>
+<p>&nbsp;</p>
+<H2><A name=squid>Squid configuration</A></H2>There is none that is 
+<EM>required</EM> as DansGuardian appears to squid just as a normal web browser. 
+However... 
+<P>We need to make sure that squid will not allow client browsers to bypass 
+DansGuardian. This is a non trivial problem. What I will assume is that you have 
+already blocked open web access (via firewall IP tables and IP chains) and the only way to access the web is through 
+squid and hence DansGuardian. This goal is achievable in a number of ways.
+<H3>squid.conf method</H3>
+<P>You can modify the acl rules so that only localhost has access. In my 
+squid.conf I had the following lines:
+<PRE># INSERT YOUR OWN RULE(S) HERE TO ALLOW ACCESS FROM YOUR CLIENTS
+#
+acl localnet src 192.168.42.0/255.255.255.0
+http_access allow localnet
+http_access allow localhost
+http_access deny all</PRE>
+<P>So I remmed out both the localnet lines with a #. I believe that the default 
+configuration of squid is to only have localhost allowed so you probably don't 
+even have to do this. 
+<P>With proxy authentication things get a little bit more complex. With no 
+DansGuardian in my squid.conf I have: <PRE>authenticate_program /usr/bin/smb_auth -W DOMAIN -U 192.168.0.2
+acl domainusers proxy_auth REQUIRED
+http_access allow domainusers
+http_access deny all
+</PRE>Which allows authenticated users to access the proxy from anywhere. 
+<P>However, it makes sense to let SSL through without going 
+through DansGuardian, yet at the same time still prevent bypassing DansGuardian
+on other ports. 
+So the same section became: <PRE>authenticate_program /usr/bin/smb_auth -W DOMAIN -U 192.168.0.2
+acl domainusers proxy_auth REQUIRED
+acl linuxserver src 192.168.0.1/255.255.255.255
+acl ntserver src 192.168.0.2/255.255.255.255
+http_access allow linuxserver
+http_access allow ntserver
+http_access allow domainusers localhost
+http_access allow CONNECT SSL_ports
+http_access deny all
+</PRE>So for all web access (SSL or not) the user is required to be 
+authenticated, but SSL is allowed to bypass DansGuardian. I also allow the NT 
+and Linux servers to bypass the filtering and access squid directly.
+<H3>ipchains method 1</H3>You could redirect incoming requests on port 3128 from 
+the local net to port 8080 while still allowing incoming from the localhost to 
+access 3128. More specific detail is currently beyond the scope of these 
+instructions.
+<H3>ipchains method 2 - sneaky method</H3>A really sneaky method would be to 
+configure squid to work as a transparent proxy and redirect all port 80 traffic 
+to port 8080. You would want to include method 1 as well. More specific detail 
+is currently beyond the scope of these instructions. There are <A 
+href="http://dansguardian.org/?page=howto">HOWTOs</A> that cover this.
+<p>&nbsp;</p>
+<H2><A name=client>Client Configuration</A></H2>
+<H3>Simple config</H3>
+<P>Let's assume you have a Linux server at IP 192.168.0.1 which is a caching web
+proxy and intranet web server. On this server you have DansGuardian 
+installed listening on port 8080. 
+<P>You need to configure the client browser for http proxy 192.168.0.1 with port 
+8080. You can configure ftp the same as http - it is reported to work. That's 
+it. But for efficiency you might want to set the 'no proxy on' to your local 
+Apache server address - 192.168.0.1 in this case. If you've got DNS working, you 
+can use the DNS address of your local server. I tend not to. 
+<P>
+<H3>Sneaky Config</H3>If you've used the sneaky method to configure squid then 
+there should be no configuration required. Configure your browser for no proxy 
+and maybe set the 'no proxy on' to your local Apache server address - 
+192.168.0.1 in this case. 
+<P>
+<H3>Beebug(Daniel's) Config</H3>This could be known as super sneaky I suppose. 
+The problem with the simple config method is that you have to configure by hand 
+every browser. This is a pain and is why the sneaky method is really quite 
+good.<BR>The way Beebug solve this is by using a custom in-house Visual Basic application that 
+loads upon login and modifies the needed Windows registry and various files so 
+that IE and Netscape (including email) are configured automatically. 
+It's so good, you can just stick a copy of Netscape on a server in a share and 
+run this program at login and it automatically just works on all the PCs. No 
+installation and a central copy so it's easy to update.<BR>It also has other 
+features such as removing unwanted bits such as web folders, GMT/BST auto 
+switching (already done by login script), app data, and other fixes.<BR>Unless I 
+persuade the directors to release it open source you can't use this method 
+without paying or writing your own. And guess who wrote this - yes - the
+DansGuardian author! <BR><BR>
+<H2><A name=support>Support</A></H2>For all support issues, join the <A 
+target=_blank href="http://groups.yahoo.com/group/dansguardian">mailing list</A> 
+and post your question or comment there. 
+<P>If you feel your message is not suitable for public viewing and is private
+(for example asking for pricing or other commercial issues) then email me 
+direct. My address is daniel at jadeb dot com. 
+<P>You can also get further help from the DansGuardian web site <A 
+href="http://dansguardian.org/">dansguardian.org</A>. 
+<P>Any comments about this document, email gb at dansguardian dot org. </P></BODY></HTML>
--- dansguardian-2.10.1.1.orig/debian/changelog
+++ dansguardian-2.10.1.1/debian/changelog
@@ -0,0 +1,287 @@
+dansguardian (2.10.1.1-5.58.201411181736) ucs4-0-0-0; urgency=low
+
+  * UCS auto build. The following patches have been applied to the original source package
+    00-query-filter-groups-from-nss
+    01-enable-kavd
+    03-fix-ntlm-auth
+    10-check-init-start
+    12-check-ucr-autostart
+
+ -- Univention builddaemon <buildd@univention.de>  Tue, 18 Nov 2014 17:36:53 +0100
+
+dansguardian (2.10.1.1-5) unstable; urgency=low
+
+  * [0a5a03b] Add support for "status" action to init.d script.
+    Thanks to Peter Eisentraut for the patch (Closes: #647870)
+  * [f41be8c] Don't allocate memory up to reg.re_nsub (Closes: #667664, #673691)
+  * [2ebb4bb] Remove obsolete preinst script (Closes: #597961)
+  * [3d01758] Document grouphandling for clamdscan (Closes: #544654)
+  * [0da0019] Add versioned dpatch dependency
+  * [05242c0] wrap-and-sort
+  * [817abff] Use dh9 for hardening
+
+ -- Alexander Wirt <formorer@debian.org>  Sun, 24 Jun 2012 09:02:21 +0200
+
+dansguardian (2.10.1.1-4) unstable; urgency=low
+
+  * [42dcd6d] Install subdirs
+  * [5643aa6] use dh_lintian
+  * [d9eae0e] Move from classic debhelper to dh
+  * [2269451] Raise dh compat level
+  * [4256464] Patch configure.ac to fix clamav detection.
+    Thanks to Dan Chen for the patch (Closes: #646903)
+  * [4295784] Add Vcs headers
+  * [cedb4a7] Bump debhelper dependency to 8
+  * [8f24e4e] bump standards version
+  * [3ad2dee] remove unused patches
+  * [27145cd] Fix compilation with gcc 4.6.
+    Thanks to Dan Chen for the patch (Closes: 624996)
+  * [02ba68c] remove leftovers
+  * [7c8296c] Remove old stuff in postinst (Closes: #646901)
+
+ -- Alexander Wirt <formorer@debian.org>  Sat, 05 Nov 2011 21:19:57 +0100
+
+dansguardian (2.10.1.1-3) unstable; urgency=low
+
+  * Fix restart in init script (Closes: #605934)
+
+ -- Alexander Wirt <formorer@debian.org>  Wed, 19 Jan 2011 19:30:17 +0100
+
+dansguardian (2.10.1.1-2) unstable; urgency=low
+
+  * Fix initscript ordering (Closes: #541742)
+  * Force debsource 1.0
+  * Update copyright file (Closes: #567263)
+  * Fix clamdsocket in clamdscan.conf (Closes: #544656)
+  * Use settings from configfile for chown ops 
+    (Closes: #419989) Thanks to Игорь Чумак for the patch
+
+ -- Alexander Wirt <formorer@debian.org>  Sat, 13 Feb 2010 09:32:09 +0100
+
+dansguardian (2.10.1.1-1) unstable; urgency=low
+
+  * New upstream version (Closes: #516749)
+  * Re-enable clamd support (Closes: #533024)
+  * Bump standards version (No changes)
+  * Add --retry 15 to start-ѕtop-daemon (Closes: #424076)
+  * Fix headers for gcc 4.4 (Closes: #505386, #526156)
+    Thanks to tbm for the patch
+
+ -- Alexander Wirt <formorer@debian.org>  Sun, 14 Jun 2009 11:21:44 +0200
+
+dansguardian (2.9.9.7-2.1) unstable; urgency=low
+
+  * Non-maintainer upload.
+  * Added patch for clamav 0.95/libclamav6 support
+    - added debian/patches/50_clamav095_support.dpatch 
+
+ -- Imre Gergely <gimre@narancs.net>  Sun, 19 Apr 2009 09:42:35 +0300
+
+dansguardian (2.9.9.7-2) unstable; urgency=low
+
+  [ Thomas Viehmann ]
+  * OptionContainer.cpp: If you need to iterate through all lines in the
+    config file to find a field, at least don't abuse the configfile deque
+    by accessing it as if it was an array with signed index.
+    Works way better on arm, too, i.e. closes: #493047.
+
+ -- Alexander Wirt <formorer@debian.org>  Mon, 13 Oct 2008 09:29:35 +0200
+
+dansguardian (2.9.9.7-1) unstable; urgency=low
+
+  * New upstream version (Closes: #497260)
+  * Don't ban sites with general rating (Closes: #477073)
+  * Update to new chown syntax
+
+ -- Alexander Wirt <formorer@debian.org>  Mon, 05 May 2008 16:33:47 +0200
+
+dansguardian (2.9.9.3-2) unstable; urgency=low
+
+  * This time build with gcc 4.3 (Closes: #454889) 
+
+ -- Alexander Wirt <formorer@debian.org>  Sun, 06 Apr 2008 14:47:06 +0200
+
+dansguardian (2.9.9.3-1) unstable; urgency=low
+
+  * New upstream release, move from dgav patch to 2.9 series (Closes: #334839)
+    - This version builds fine with GCC 4.3 (Closes: #454889)
+    - spanish translations have been fixed (Closes: #428372)
+    - See /usr/share/doc/dansguardian/NEWS.Debian.gz for more informations
+  * Don't fail it in prerm if dansguardian is already stopped (Closes:
+    #396321, #474420)
+  * Move configfiles to a new place
+  * Bump standards version (no changes)
+  * Remove 01_unrpmize (dansguardian now uses autotools) 
+  * Updated copyright file
+  * Remove 04_clamav-0.90-API.dpatch, 05_kfreebsd.dpatch,
+    06_gcc4.3.dpatch they are not used anymore
+  * Don't ignore failures from distclean
+  * Don't fail if build twice in a row. (Closes: #442538)
+
+ -- Alexander Wirt <formorer@debian.org>  Mon, 24 Mar 2008 18:45:37 +0100
+
+dansguardian (2.8.0.6-antivirus-6.4.4.1-4) unstable; urgency=low
+
+  * Add a patch for kfreebsd (Closes: #414338). Thanks Cyril Brulebois.
+  * Fix includes to make it compile with GCC 4.3 (Closes: #417139). Thanks
+    to Martin Michlmayr.
+
+ -- Alexander Wirt <formorer@debian.org>  Mon, 02 Apr 2007 16:03:15 +0200
+
+dansguardian (2.8.0.6-antivirus-6.4.4.1-3) UNRELEASED; urgency=low
+
+  * NOT RELEASED YET
+
+ -- Alexander Wirt <formorer@debian.org>  Wed, 28 Feb 2007 15:44:25 +0100
+
+dansguardian (2.8.0.6-antivirus-6.4.4.1-2) unstable; urgency=low
+
+  * Update ClamAV.cpp to the clamav 0.90 API (Closes: #410834). Thanks to
+    Stephen Gran for the patch!
+
+ -- Alexander Wirt <formorer@debian.org>  Wed, 28 Feb 2007 15:42:50 +0100
+
+dansguardian (2.8.0.6-antivirus-6.4.4.1-1) unstable; urgency=medium
+
+  * Updated antivirus plugin
+    - Fixed cleaning of temp files
+      (Closes: #400385)
+  * Fix missing opening quote in spanish translations
+    (Closes: #399176)
+  * Readd a patch thats prevents starting in unconfigured systems
+    (Closes: #402831)
+
+ -- Alexander Wirt <formorer@debian.org>  Thu, 14 Dec 2006 22:33:54 +0100
+
+dansguardian (2.8.0.6-antivirus-6.4.4-1) unstable; urgency=medium
+
+  * New av plugin release 
+    - Proper autocleaning (Closes: #377983)
+  * Bumped standards version
+  * Depend on clamav (>= 0.80) 
+  * Fix typo in description (Closes: #363224)
+
+ -- Alexander Wirt <formorer@debian.org>  Sun, 22 Oct 2006 16:56:11 +0200
+
+dansguardian (2.8.0.6-antivirus-6.3.8-1-1) unstable; urgency=low
+
+  * New upstream release
+  * Integreated Aecio F. Netos Antiviruspatch (Closes: #263890)
+  * Acknowledge the gcc4 nmu (Closes: #319568)
+
+ -- Alexander Wirt <formorer@debian.org>  Wed, 17 Aug 2005 14:30:31 +0200
+
+dansguardian (2.8.0.4-2.1) unstable; urgency=low
+ 
+  * Non-Maintainer Upload (BSP 2005-08-07).
+  * Fixed FTBFS by applying patch from Matt Kraai (Closes: #319568).
+ 
+ -- Uwe Hermann <uwe@debian.org>  Sun,  7 Aug 2005 14:21:46 +0200
+
+dansguardian (2.8.0.4-2) unstable; urgency=low
+
+  * Added --oknodo to start-stop-daemon to get restarting 
+    working if it isn't started before (Closes: #303762)
+    Thanks to Kevin Traas for the patch 
+
+ -- Alexander Wirt <formorer@debian.org>  Fri,  8 Apr 2005 21:02:42 +0200
+
+dansguardian (2.8.0.4-1) unstable; urgency=low
+
+  * New upstream release
+  * Added reload to initfile (Closes: #292301)
+
+ -- Alexander Wirt <formorer@debian.org>  Wed,  2 Mar 2005 19:16:47 +0100
+
+dansguardian (2.8.0.3-1) unstable; urgency=low
+
+  * New upstream release
+  * Removed the compressed content patch, this is
+    now solved from upstream
+  * Dansguardian builds now clean with gcc-3.4 (Closes: #258592)
+  * Make logrotate more silent (Closes: #180318)
+ 
+
+ -- Alexander Wirt <formorer@debian.org>  Mon, 27 Sep 2004 18:57:06 +0200
+
+dansguardian (2.7.7-9-1) unstable; urgency=low
+
+  * New upstream release
+  * New Maintainer (Closes: #254395)
+  * Acknowledge of several NMUs by Mathias Klose
+    closes: #160096, #150904, #156703, #151163, #169736, #150884, #161038
+    also closes: #200194, #200194, #206519
+  * Added a small patch from Bob Vincent <debian-bugs@fcfcn.org>
+    that fixes the handling of Sources.gz and Packages.gz (closes: #229826)
+
+ -- Alexander Wirt <formorer@debian.org>  Wed, 16 Jun 2004 21:28:52 +0200
+
+dansguardian (2.7.7-8-0.1) unstable; urgency=low
+
+  * NMU.
+  * New upstream release.
+
+ -- Matthias Klose <doko@debian.org>  Sat,  1 May 2004 10:15:29 +0200
+
+dansguardian (2.7.7-5-0.1) unstable; urgency=low
+
+  * NMU.
+  * New upstream release.
+
+ -- Matthias Klose <doko@debian.org>  Fri,  2 Apr 2004 23:15:24 +0200
+
+dansguardian (2.7.6-7-0.1) unstable; urgency=low
+
+  * NMU.
+  * New upstream release.
+
+ -- Matthias Klose <doko@debian.org>  Sun,  4 Jan 2004 11:03:31 +0100
+
+dansguardian (2.7.6-3-0.1) unstable; urgency=low
+
+  * NMU.
+  * New upstream release.
+
+ -- Matthias Klose <doko@debian.org>  Sat,  6 Dec 2003 16:28:05 +0100
+
+dansguardian (2.7.3-1-0.1) unstable; urgency=low
+
+  * NMU.
+  * New upstream release.
+  * Wait some time before restarting after a logrotate (closes: #206519).
+  * Upgrade problems fixed at least in 2.7.3 (closes: #169736).
+  * Change maintainer address to flimsy@debian.org, as the original
+    address bounces (closes: #200194).
+
+ -- Matthias Klose <doko@debian.org>  Wed,  1 Oct 2003 23:29:35 +0200
+
+dansguardian (2.7.3-0-0.1) unstable; urgency=low
+
+  * NMU.
+  * New upstream version (closes: #150904, #151163).
+
+ -- Matthias Klose <doko@debian.org>  Mon,  1 Sep 2003 00:06:48 +0200
+
+dansguardian (2.5.2-0-0.1) unstable; urgency=low
+
+  * NMU.
+  * New upstream version (close: #151163).
+    - Should fix compile errors on alpha, ia64 and s390 (closes: #160096).
+  * Make the g++-2.9[56] dependency explicit. The code doesn't compile with
+    g++-3.x.
+  * The configure script uses a broken check for the echo command,
+    so explicitely call it using bash.
+  * Start after squid and apache (closes: #161038).
+  * Update package description (closes: #150884).
+  * Fix postrm script to purge the package (closes: #156703).
+  * Fix broken checks for user and group in postinst.
+  * Link against dynamic libz.
+  * Add logrotate script.
+
+ -- Matthias Klose <doko@debian.org>  Sun, 10 Nov 2002 12:23:28 +0100
+
+dansguardian (2.2.10-0-1) unstable; urgency=low
+
+  * Initial Release. (Closes: #150218)
+
+ -- Jonathan J. Hall <jonhall@futureks.net>  Mon, 17 Jun 2002 21:14:35 -0500
--- dansguardian-2.10.1.1.orig/debian/copyright
+++ dansguardian-2.10.1.1/debian/copyright
@@ -0,0 +1,24 @@
+This package was debianized by Jonathan Hall <jonhall@futureks.net> on
+Mon, 17 Jun 2002 21:14:35 -0500.
+
+It as downloaded from http://dansguardian.org/
+
+Upstream Author: Daniel Barron <daniel@jadeb.com>
+
+Copyright (c) 2001-2010 Daniel Barron
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License along with
+this program; if not, write to the Free Software Foundation, Inc., 51 Franklin
+St, Fifth Floor, Boston, MA 02110-1301, USA.  On Debian systems, the complete
+text of the GNU General Public License, can be found in
+/usr/share/common-licenses/GPL.
--- dansguardian-2.10.1.1.orig/debian/README.Debian
+++ dansguardian-2.10.1.1/debian/README.Debian
@@ -0,0 +1,35 @@
+VIRUS SCANNING WITH CLAMD
+=========================
+
+If you use dansguardian with clamd take care clamd is able
+to read the dansguardian tempfiles. Something like
+`usermod -a -G dansguardian clamav` should work.
+
+LICENSING ISSUES
+================
+Thanks to Daniel Barron <daniel@jadeb.com> for this piece of software!
+
+Although this software is released under the GPL, and is therefore free for
+anyone to use for any purpose, Daniel has made commercial licenses of this
+software available for those who require another license for their purposes. 
+Please visit http://www.dansguardian.org/?page=copyright2 for details.
+
+If you use this software commercially, or if you just feel like making a
+donation, you are encouraged to make a donation to Daniel to support
+development of this software.
+
+Commercial support services are also available from Daniel for those
+needeing them.  Please visit http://www.dansguardian.org/?page=pricing#CS
+for details.
+
+
+DOCUMENTATION
+=============
+Available documentation can be found at
+http://www.dansguardian.org/?page=documentation
+
+The DansGuardian FAQ is at http://www.dansguardian.org/?page=faq
+
+Some useful HOWTOs that cover specific implimentations of DansGuardian and
+caching/filtering in general can be found at
+http://www.dansguardian.org/?page=howto
--- dansguardian-2.10.1.1.orig/debian/dansguardian.dirs
+++ dansguardian-2.10.1.1/debian/dansguardian.dirs
@@ -0,0 +1,3 @@
+usr/lib/cgi-bin/
+usr/share/doc/dansguardian
+var/lock/subsys
--- dansguardian-2.10.1.1.orig/debian/dansguardian.init
+++ dansguardian-2.10.1.1/debian/dansguardian.init
@@ -0,0 +1,114 @@
+#! /bin/sh
+# Startup script for dansguardian
+#
+# description: A web content filtering plugin for web \
+#              proxies, developed to filter using lists of \
+#              banned phrases, MIME types, filename \
+#              extensions and PICS labling.
+# processname: dansguardian
+# pidfile: /var/run/dansguardian.pid
+# config: /etc/dansguardian/dansguardian.conf
+### BEGIN INIT INFO
+# Provides:          dansguardian
+# Required-Start:    $remote_fs $network $syslog
+# Required-Stop:     $remote_fs $network $syslog
+# Default-Start:     2 3 4 5 
+# Default-Stop:      0 1 6 
+# Description: Starts dansguardian content proxy 
+# short-description: dansguardian configuration
+### END INIT INFO
+
+#include lsb functions
+. /lib/lsb/init-functions
+
+PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
+DAEMON=/usr/sbin/dansguardian
+NAME=dansguardian
+DESC="DansGuardian"
+
+CONFFILELOCATION=/etc/dansguardian/
+#BINARYLOCATION=/usr/sbin/
+#PIDDIR=/var/run/
+
+grep -q ^UNCONFIGURED ${CONFFILELOCATION}dansguardian.conf && {
+cat <<EOF
+        DansGuardian has not been configured!
+        Please edit ${CONFFILELOCATION}dansguardian.conf manually then rerun
+        this script.
+EOF
+exit; }
+
+test -x $DAEMON || exit 0
+test -f ${CONFFILELOCATION}dansguardian.conf || exit 0
+
+set -e
+
+checkUcrVars () {
+	if [ -x "$(which ucr)" ]; then
+		# check ucr autostart setting
+		if [ -f "/usr/share/univention-config-registry/init-autostart.lib" ]; then
+			. "/usr/share/univention-config-registry/init-autostart.lib"
+			check_autostart dansguardian dansguardian/autostart
+		fi
+		contentscan="$(ucr get squid/contentscan)"
+		virusscan="$(ucr get squid/virusscan)"
+		if [ "$contentscan" = "no" -a "$virusscan" = "no" ]; then
+			if [ "$1" = "restart" ]; then
+				log_action_msg " (disabled via ucr squid/contentscan, squid/virusscan)"
+			else
+				log_daemon_msg "Starting $DESC" "$NAME (disabled via ucr squid/contentscan, squid/virusscan)"
+				log_end_msg 0
+			fi
+			exit 0
+		fi
+	fi
+}
+
+case "$1" in
+  start)
+	checkUcrVars start
+	log_daemon_msg "Starting $DESC" "$NAME"
+	test -d /var/lock/subsys || mkdir -p /var/lock/subsys
+	start-stop-daemon --start --quiet --pidfile /var/run/$NAME.pid \
+		--exec $DAEMON || log_end_msg 1
+	log_end_msg 0
+	;;
+  stop)
+	log_daemon_msg "Stopping $DESC" "$NAME"
+	start-stop-daemon --stop --quiet --retry 15 --oknodo --pidfile /var/run/$NAME.pid \
+		--exec $DAEMON || log_end_msg 1
+	log_end_msg 0
+	;;
+  reload)
+	log_action_begin_msg "Reloading $DESC configuration..."
+	echo "Reloading $DESC configuration files."
+	start-stop-daemon --stop --signal 1 --quiet --pidfile \
+		/var/run/$NAME.pid --exec $DAEMON || log_action_end_msg 1
+	log_action_end_msg 0
+  	;;
+  restart|force-reload)
+	#
+	#	If the "reload" option is implemented, move the "force-reload"
+	#	option to the "reload" entry above. If not, "force-reload" is
+	#	just the same as "restart".
+	#
+	log_daemon_msg "Restarting $DESC" "$NAME"
+	start-stop-daemon --stop --quiet --retry 15 --oknodo --pidfile \
+		/var/run/$NAME.pid --exec $DAEMON || log_end_msg 1
+	checkUcrVars restart
+	start-stop-daemon --start --quiet --pidfile \
+		/var/run/$NAME.pid --exec $DAEMON || log_end_msg 1
+	log_end_msg 0
+	;;
+  status)
+	status_of_proc "$DAEMON" "$NAME" && exit 0 || exit $?
+	;;
+  *)
+	N=/etc/init.d/$NAME
+	# echo "Usage: $N {start|stop|restart|reload|force-reload}" >&2
+	log_action_msg "Usage: $N {start|stop|restart|force-reload|status}" >&2
+	exit 1
+	;;
+esac
+
+exit 0
--- dansguardian-2.10.1.1.orig/debian/installation2.html
+++ dansguardian-2.10.1.1/debian/installation2.html
@@ -0,0 +1,58 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<HTML>
+<HEAD><TITLE>DansGuardian Brief Installation Guide</TITLE><META http-equiv="PICS-Label" content='(PICS-1.1 "http://www.icra.org/ratingsv02.html" l gen true for "http://dansguardian.org/" r (cz 1 lz 1 nz 1 oz 1 vz 1) "http://www.rsac.org/ratingsv01.html" l gen true for "http://dansguardian.org/" r (n 0 s 0 v 0 l 0))'></HEAD>
+<BODY TEXT="#000000" BGCOLOR="#FFFFFF" LINK="#0000FF">
+<H1 ALIGN=CENTER>DansGuardian Brief Installation Guide</H1>
+<P align=center>
+<STRONG>Tue 9th October 2001 - version 2.x.x</STRONG>
+<P>
+<H3>Installing from RPM</H3>
+<OL TYPE="1">
+<LI>Download the correct RPM for <a href="http://dansguardian.org/?page=download">DansGuardian 2</a>.
+<LI>If upgrading from an older version of DansGuardian, make a backup of your /etc/dansguardian directory.  Also stop running any old version.
+<LI>rpm -Uvh DansGuardian-2....rpm (fill in the blank) (--nodeps might be needed)
+<LI>Now edit the dansguardian.conf file to your liking paying special attention to the accessdeniedaddress option.
+</OL>
+<P>
+<H3>Installing from source</H3>
+<OL TYPE="1">
+<LI>Download the source for <a href="http://dansguardian.org/?page=download">DansGuardian 2</a>.
+<LI>If upgrading from an older version of DansGuardian, make a backup of your /etc/dansguardian directory.  Also stop running any old version.
+<LI>Untar with a 'tar -zxpf DansGuardian-2.....tar.gz' (fill in the blanks).
+<LI>cd into the new directory.
+<LI>Run the configure (./configure --help) script with the help option to see the user selectable settings.  Default settings are shown in []'s.
+<LI>Run the configure (./configure) script with your options, if any. (RedHat 6.2/7.0 users can leave the default settings.  Other users see below.
+<LI>Edit the Makefile and verify that all the directory settings are correct. If not, re-run the configure script.
+<LI>"make" will now build DansGuardian.
+<LI>"make install" will create the directory structure and install all the files in the chosen paths.
+<LI>"make clean" will remove the now un-needed binaries etc.
+<LI>Now edit the dansguardian.conf file to your liking paying special attention to the accessdeniedaddress option.
+</OL>
+<H4>Options</h4>
+You may change with the configure options:
+<table>
+<tr><td>bindir</td><td>(where the binary gets places)</td></tr>
+<tr><td>sysconfdir</td><td>(where the config and data files gets placed)</td></tr>
+<tr><td>sysvdir</td><td>(where the startup script gets placed)</td></tr>
+<tr><td>cgidir</td><td>(where the cgi-bin dir is located)</td></tr>
+<tr><td>mandir</td><td>(where the man docs get placed)</td></tr>
+<tr><td>logdir</td><td>(where the logs get placed)</td></tr>
+<tr><td>runas_usr</td><td>(the system user the daemon runs as)</td></tr>
+<tr><td>runas_grp</td><td>(the system group the daemon runs as)</td></tr>
+<tr><td>piddir</td><td>(where the pid file gets placed)</td></tr>
+</table>
+<P>
+The INSTALL file included within the source tarball gives all this information as well as example options for FreeBSD, OpenBSD, Mandrake, SuSE, etc
+<P>
+<H3>Nearly finished</H3>
+You need to make DansGuardian start up when the server reboots.  For linux this means use your favourite SysV editor to stick DansGuardian in run level 5 and 3 at about 92, if chkconfig/rpm has not already done this for you.
+<P>
+Also you need to rotate the logs once a week.  As root, crontab -e and set the log rotation script up as follows:<br>
+<code>59 23 * * sun /etc/dansguardian/logrotation</code><br>I.e 23:59 every sunday.  Or as pleases you.  Note, the path may be different.  You don't have to use my splendid script and could use any method you want so long as it stops DansGuardian first, rotates then starts it again.
+<P>
+<H3>Finally</H3>
+<P>The port it listens on by default is 8080.  It uses port 3128 on Squid.  To manually start it run /etc/rc.d/init.d/dansguardian start.  Use stop to stop it.
+For all support issues, join the <A HREF="http://groups.yahoo.com/group/dansguardian" target="_blank">mailing list</A> and post your question or comment there.  Everyone would like to know of success or failure as this may help them.  The messages also act as an archive of information that may get put into the FAQ.
+<P>If you feel your message is not suitable for public viewing and is private (for example asking for pricing or other commercial issues) then email me direct.  My address is author at dansguardian dot org.
+</BODY>
+</HTML>
--- dansguardian-2.10.1.1.orig/debian/source/lintian-overrides
+++ dansguardian-2.10.1.1/debian/source/lintian-overrides
@@ -0,0 +1 @@
+build-depends-on-obsolete-package build-depends: dpatch (>= 2.0.32~)
--- dansguardian-2.10.1.1.orig/debian/source/format
+++ dansguardian-2.10.1.1/debian/source/format
@@ -0,0 +1 @@
+1.0
--- dansguardian-2.10.1.1.orig/debian/patches/65-fix_clamdsocket.dpatch
+++ dansguardian-2.10.1.1/debian/patches/65-fix_clamdsocket.dpatch
@@ -0,0 +1,19 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 65-editconfig.dpatch by Alexander Wirt <formorer@debian.org>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Fix clamdsocket path
+
+@DPATCH@
+diff -urNad dansguardian-2.10.1.1~/configs/contentscanners/clamdscan.conf.in dansguardian-2.10.1.1/configs/contentscanners/clamdscan.conf.in
+--- dansguardian-2.10.1.1~/configs/contentscanners/clamdscan.conf.in	2008-11-18 12:27:04.000000000 +0100
++++ dansguardian-2.10.1.1/configs/contentscanners/clamdscan.conf.in	2010-02-13 20:33:07.000000000 +0100
+@@ -1,7 +1,7 @@
+ plugname = 'clamdscan'
+ 
+ # edit this to match the location of your ClamD UNIX domain socket
+-#clamdudsfile = '/var/run/clamav/clamd.sock'
++clamdudsfile = '/var/run/clamav/clamd.ctl'
+ 
+ # If this string is set, the text it contains shall be removed from the
+ # beginning of filenames when passing them to ClamD.
--- dansguardian-2.10.1.1.orig/debian/patches/11_FixOptionContainer.cpp_on_arm.dpatch
+++ dansguardian-2.10.1.1/debian/patches/11_FixOptionContainer.cpp_on_arm.dpatch
@@ -0,0 +1,39 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 11_FixOptionContainer.cpp_on_arm.dpatch by Alexander Wirt <formorer@debian.org>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: If you need to iterate through all lines in the
+##     config file to find a field, at least don't abuse the configfile deque
+##     by accessing it as if it was an array with signed index.
+##     Works way better on arm, too, i.e. closes: #493047.
+
+@DPATCH@
+diff -urNad dansguardian-2.9.9.7~/src/OptionContainer.cpp dansguardian-2.9.9.7/src/OptionContainer.cpp
+--- dansguardian-2.9.9.7~/src/OptionContainer.cpp	2008-08-18 09:57:46.000000000 +0200
++++ dansguardian-2.9.9.7/src/OptionContainer.cpp	2008-10-13 09:23:20.000000000 +0200
+@@ -662,8 +662,10 @@
+ 	String temp;
+ 	String temp2;
+ 	String o(option);
+-	for (int i = 0; i < (signed) conffile.size(); i++) {
+-		temp = conffile[i].c_str();
++	for (std::deque<std::string>::iterator i = conffile.begin(); i != conffile.end(); i++) {
++		if ((*i).empty())
++			continue;
++		temp = (*i).c_str();
+ 		temp2 = temp.before("=");
+ 		while (temp2.endsWith(" ")) {	// get rid of tailing spaces before =
+ 			temp2.chop();
+@@ -696,8 +698,10 @@
+ 	String temp2;
+ 	String o(option);
+ 	std::deque<String > results;
+-	for (int i = 0; i < (signed) conffile.size(); i++) {
+-		temp = conffile[i].c_str();
++	for (std::deque<std::string>::iterator i = conffile.begin(); i != conffile.end(); i++) {
++		if ((*i).empty())
++			continue;
++		temp = (*i).c_str();
+ 		temp2 = temp.before("=");
+ 		while (temp2.endsWith(" ")) {	// get rid of tailing spaces before =
+ 			temp2.chop();
--- dansguardian-2.10.1.1.orig/debian/patches/00list
+++ dansguardian-2.10.1.1/debian/patches/00list
@@ -0,0 +1,11 @@
+03_add_unconfigures.dpatch
+07_fix_config_paths.dpatch
+11_FixOptionContainer.cpp_on_arm.dpatch
+50_clamav095_support.dpatch
+60_add_gcc4.4_support.dpatch
+65-fix_clamdsocket.dpatch
+70-gcc4.6.dpatch
+70_fix_clamav_detection
+80_fix_libcre3_max_sub_expression_allocation
+univention-00-query-filter-groups-from-nss.dpatch
+univention-03-fix-ntlm-auth.dpatch
--- dansguardian-2.10.1.1.orig/debian/patches/70_fix_clamav_detection
+++ dansguardian-2.10.1.1/debian/patches/70_fix_clamav_detection
@@ -0,0 +1,18 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 70_fix_clamav_datection.dpatch by Dan Chen <seven.steps@gmail.com>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Fix clamav detection in configure.ac
+
+@DPATCH@
+--- dansguardian-2.10.1.1.orig/configure.ac
++++ dansguardian-2.10.1.1/configure.ac
+@@ -333,7 +333,7 @@
+ 	CLAMAVSHM="!! Not supported on this platform !!"
+ else
+ 	AC_MSG_RESULT(yes)
+-	PKG_CHECK_MODULES([CLAMAV],[libclamav >= 4])
++	PKG_CHECK_MODULES([CLAMAV],[libclamav >= 0.95])
+ 
+ 	AC_DEFINE([HAVE_CLAMAV],[],[Define to enable ClamAV content scanner])
+ 	
--- dansguardian-2.10.1.1.orig/debian/patches/07_fix_config_paths.dpatch
+++ dansguardian-2.10.1.1/debian/patches/07_fix_config_paths.dpatch
@@ -0,0 +1,19 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## fix_config_paths.dpatch by Alexander Wirt <formorer@debian.org>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Fix config paths for language files
+
+@DPATCH@
+diff -urNad dansguardian-2.9.9.3~/configs/dansguardian.conf.in dansguardian-2.9.9.3/configs/dansguardian.conf.in
+--- dansguardian-2.9.9.3~/configs/dansguardian.conf.in	2007-11-26 13:00:06.000000000 +0100
++++ dansguardian-2.9.9.3/configs/dansguardian.conf.in	2008-03-22 22:25:50.000000000 +0100
+@@ -20,7 +20,7 @@
+ # and easier to customise the access denied page.
+ # The language file is used no matter what setting however.
+ #
+-languagedir = '@DGDATADIR@/languages'
++languagedir = '@DGCONFDIR@/languages'
+ 
+ # language to use from languagedir.
+ language = 'ukenglish'
--- dansguardian-2.10.1.1.orig/debian/patches/03_add_unconfigures.dpatch
+++ dansguardian-2.10.1.1/debian/patches/03_add_unconfigures.dpatch
@@ -0,0 +1,19 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 03_add_unconfigures.dpatch by Alexander Wirt <formorer@debian.org>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Don't start dansguardian if its not configured
+
+@DPATCH@
+diff -urNad dansguardian-2.9.9.3~/configs/dansguardian.conf.in dansguardian-2.9.9.3/configs/dansguardian.conf.in
+--- dansguardian-2.9.9.3~/configs/dansguardian.conf.in	2007-11-26 13:00:06.000000000 +0100
++++ dansguardian-2.9.9.3/configs/dansguardian.conf.in	2008-03-23 09:41:22.000000000 +0100
+@@ -2,6 +2,7 @@
+ 
+ # **NOTE** as of version 2.7.5 most of the list files are now in dansguardianf1.conf
+ 
++UNCONFIGURED - Please remove this line after configuration
+ 
+ # Web Access Denied Reporting (does not affect logging)
+ #
+
--- dansguardian-2.10.1.1.orig/debian/patches/60_add_gcc4.4_support.dpatch
+++ dansguardian-2.10.1.1/debian/patches/60_add_gcc4.4_support.dpatch
@@ -0,0 +1,51 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 60_add_gcc4.4_support.dpatch by Martin Michlmayr <tbm@cyrius.com>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Adds support for gcc4.4 (#505386)
+
+@DPATCH@
+diff -urNad dansguardian-2.9.9.8~/src/contentscanners/clamav.cpp dansguardian-2.9.9.8/src/contentscanners/clamav.cpp
+--- dansguardian-2.9.9.8~/src/contentscanners/clamav.cpp	2008-06-10 11:41:41.000000000 +0200
++++ dansguardian-2.9.9.8/src/contentscanners/clamav.cpp	2009-06-14 11:28:16.000000000 +0200
+@@ -33,6 +33,7 @@
+ #include <unistd.h>
+ #include <clamav.h>
+ #include <fcntl.h>
++#include <cstdio>
+ 
+ 
+ // GLOBALS
+diff -urNad dansguardian-2.9.9.8~/src/contentscanners/commandlinescan.cpp dansguardian-2.9.9.8/src/contentscanners/commandlinescan.cpp
+--- dansguardian-2.9.9.8~/src/contentscanners/commandlinescan.cpp	2008-06-10 11:47:55.000000000 +0200
++++ dansguardian-2.9.9.8/src/contentscanners/commandlinescan.cpp	2009-06-14 11:28:16.000000000 +0200
+@@ -35,6 +35,7 @@
+ #include <sys/wait.h>
+ #include <unistd.h>
+ #include <list>
++#include <cstdio>
+ 
+ 
+ // GLOBALS
+diff -urNad dansguardian-2.9.9.8~/src/contentscanners/icapscan.cpp dansguardian-2.9.9.8/src/contentscanners/icapscan.cpp
+--- dansguardian-2.9.9.8~/src/contentscanners/icapscan.cpp	2008-06-10 11:41:51.000000000 +0200
++++ dansguardian-2.9.9.8/src/contentscanners/icapscan.cpp	2009-06-14 11:28:16.000000000 +0200
+@@ -36,6 +36,7 @@
+ #include <fcntl.h>
+ #include <unistd.h>
+ #include <netdb.h>		// for gethostby
++#include <cstdio>
+ 
+ 
+ // DEFINES
+diff -urNad dansguardian-2.9.9.8~/src/downloadmanagers/fancy.cpp dansguardian-2.9.9.8/src/downloadmanagers/fancy.cpp
+--- dansguardian-2.9.9.8~/src/downloadmanagers/fancy.cpp	2008-06-10 11:41:25.000000000 +0200
++++ dansguardian-2.9.9.8/src/downloadmanagers/fancy.cpp	2009-06-14 11:28:16.000000000 +0200
+@@ -32,6 +32,7 @@
+ #include <unistd.h>
+ #include <iostream>
+ #include <math.h>
++#include <cstdio>
+ 
+ 
+ // GLOBALS
--- dansguardian-2.10.1.1.orig/debian/patches/80_fix_libcre3_max_sub_expression_allocation.dpatch
+++ dansguardian-2.10.1.1/debian/patches/80_fix_libcre3_max_sub_expression_allocation.dpatch
@@ -0,0 +1,61 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 80_fix_libcre3_max_sub_expression_allocation.dpatch by Russell Coker
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: libpcre3 sets reg.re_nsub to an exreme large value and dansguardian
+## DP: tries to allocate memory for all records which lets malloc fail.
+## DP: this patch limits the allocation to 1024 records. (#667664)
+
+@DPATCH@
+diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' pkg-dansguardian~/src/RegExp.cpp pkg-dansguardian/src/RegExp.cpp
+--- pkg-dansguardian~/src/RegExp.cpp	2011-10-29 14:16:31.000000000 +0200
++++ pkg-dansguardian/src/RegExp.cpp	2012-06-23 11:02:48.821473711 +0200
+@@ -161,14 +161,17 @@
+ 	offsets.clear();
+ 	lengths.clear();
+ 	imatched = false;
+-	regmatch_t *pmatch = new regmatch_t[reg.re_nsub + 1];  // to hold result
++	int num_sub_expressions = MAX_SUB_EXPRESSIONS;
++	if(reg.re_nsub < num_sub_expressions)
++		num_sub_expressions = reg.re_nsub;
++	regmatch_t *pmatch = new regmatch_t[num_sub_expressions + 1];  // to hold result
+ 	if (!pmatch) {  // if it failed
+ 		delete[]pmatch;
+ 		imatched = false;
+ 		return false;
+ 		// exception?
+ 	}
+-	if (regexec(&reg, pos, reg.re_nsub + 1, pmatch, 0)) {  // run regex
++	if (regexec(&reg, pos, num_sub_expressions + 1, pmatch, 0)) {  // run regex
+ 		delete[]pmatch;
+ 		imatched = false;
+ //        #ifdef DGDEBUG
+@@ -182,7 +185,7 @@
+ 	int error = 0;
+ 	while (error == 0) {
+ 		largestoffset = 0;
+-		for (i = 0; i <= (signed) reg.re_nsub; i++) {
++		for (i = 0; i <= (signed) num_sub_expressions; i++) {
+ 			if (pmatch[i].rm_so != -1) {
+ 				matchlen = pmatch[i].rm_eo - pmatch[i].rm_so;
+ 				submatch = new char[matchlen + 1];
+@@ -199,7 +202,7 @@
+ 		}
+ 		if (largestoffset > 0) {
+ 			pos += largestoffset;
+-			error = regexec(&reg, pos, reg.re_nsub + 1, pmatch, REG_NOTBOL);
++			error = regexec(&reg, pos, num_sub_expressions + 1, pmatch, REG_NOTBOL);
+ 		} else {
+ 			error = -1;
+ 		}
+diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' pkg-dansguardian~/src/RegExp.hpp pkg-dansguardian/src/RegExp.hpp
+--- pkg-dansguardian~/src/RegExp.hpp	2011-10-29 14:16:31.000000000 +0200
++++ pkg-dansguardian/src/RegExp.hpp	2012-06-23 11:02:48.821473711 +0200
+@@ -22,6 +22,7 @@
+ #ifndef __HPP_REGEXP
+ #define __HPP_REGEXP
+ 
++#define MAX_SUB_EXPRESSIONS 1024
+ 
+ // INCLUDES
+ 
--- dansguardian-2.10.1.1.orig/debian/patches/univention-00-query-filter-groups-from-nss.dpatch
+++ dansguardian-2.10.1.1/debian/patches/univention-00-query-filter-groups-from-nss.dpatch
@@ -0,0 +1,222 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## univention-00-query-filter-groups-from-nss.patch
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Query the filter groups from NSS/LDAP.
+## DP: UCS Bug #15484
+## DP: Debian bug not applicable, the patch should rather be applied upstream
+## DP: We tried to upstream the patch in 2009, but upstream maintenance is stalled, so nothing 
+## DP: has happened so far:
+## DP: http://tech.groups.yahoo.com/group/dansguardian/message/24600
+
+@DPATCH@
+--- dansguardian-2.10.1.1.orig/src/Auth.cpp
++++ dansguardian-2.10.1.1/src/Auth.cpp
+@@ -32,6 +32,10 @@
+ #include <iostream>
+ #include <syslog.h>
+ 
++#include <sys/types.h>
++#include <pwd.h>
++#include <grp.h>
++
+ // GLOBALS
+ 
+ extern OptionContainer o;
+@@ -70,7 +74,59 @@ int AuthPlugin::determineGroup(std::stri
+ 	if (user.length() < 1 || user == "-") {
+ 		return DGAUTH_NOMATCH;
+ 	}
++
++	if (o.use_filter_system_groups == false) {
++		return this->determineFilterGroup(user, fg);
++	}
++
++	return this->determineSystemGroup(user, fg);
++}
++
++int AuthPlugin::determineSystemGroup(std::string &user, int &fg)
++{
++	struct group *	grpinfo;
++
++	/* Invalid user = default group.  We rely on Squid to 
++	 * make sure user exists and is authenticated. */
++	if (getpwnam(user.c_str()) == NULL)
++		return DGAUTH_NOUSER;
++ 
++	for (int i = 0; i < o.filter_groups_list.getListLength(); i++) {
++		std::string item = o.filter_groups_list.getItemAtInt( i );
++
++#ifdef DGDEBUG
++		std::cout << "determineSystemGroup: check group: " << item << std::endl;
++#endif
++
++		grpinfo = getgrnam(item.c_str());
++		if (!grpinfo)
++			continue;
++
++		// find member
++		int j  = 0;
++		while (grpinfo->gr_mem[j]) {
++#ifdef DGDEBUG
++			std::cout << "determineSystemGroup: check member: " << grpinfo->gr_mem[j] << std::endl;
++#endif
++			if (user == grpinfo->gr_mem[j++]) {
++#ifdef DGDEBUG
++				std::cout << "determineSystemGroup: member of " << item << " is " << grpinfo->gr_mem[j-1] << std::endl;
++				std::cout << "determineSystemGroup: return filter group id " << i << std::endl;
++#endif
++				fg = i;
++
++				return DGAUTH_OK;
++			}
++		}
++	}
++
++	return DGAUTH_NOMATCH;
++}
++
++int AuthPlugin::determineFilterGroup(std::string &user, int &fg)
++{
+ 	String u(user);
++
+ 	u.toLower();  // since the filtergroupslist is read in in lowercase, we should do this.
+ 	user = u.toCharArray();  // also pass back to ConnectionHandler, so appears lowercase in logs
+ 	String ue(u);
+--- dansguardian-2.10.1.1.orig/src/Auth.hpp
++++ dansguardian-2.10.1.1/src/Auth.hpp
+@@ -75,6 +75,9 @@ public:
+ 	// any < 0 - error
+ 	virtual int determineGroup(std::string &user, int &fg);
+ 
++	int determineSystemGroup(std::string &user, int &fg);
++	int determineFilterGroup(std::string &user, int &fg);
++
+ 	// is this a connection-based auth type, i.e. assume all subsequent requests on the pconn are from the same user?
+ 	bool is_connection_based;
+ 
+--- dansguardian-2.10.1.1.orig/src/FatController.cpp
++++ dansguardian-2.10.1.1/src/FatController.cpp
+@@ -2095,8 +2095,12 @@ int fc_controlit()
+ 			} else {
+ 				if (o.use_filter_groups_list) {
+ 					o.filter_groups_list.reset();
+-					if (!o.doReadItemList(o.filter_groups_list_location.c_str(),&(o.filter_groups_list),"filtergroupslist",true))
++					if (o.use_filter_system_groups) {
++						if (!o.doReadItemList(o.filter_groups_list_location.c_str(),&(o.filter_groups_list),"filtergroupslist",true))
++							reloadconfig = true;  // filter groups problem...
++					} else if (!o.doReadItemList(o.filter_groups_list_location.c_str(),&(o.filter_groups_list),"filtersystemgroupslist",false,32)) {
+ 						reloadconfig = true;  // filter groups problem...
++					}
+ 				}
+ 				if (!reloadconfig) {
+ 					o.deletePlugins(o.csplugins);
+--- dansguardian-2.10.1.1.orig/src/OptionContainer.cpp
++++ dansguardian-2.10.1.1/src/OptionContainer.cpp
+@@ -62,7 +62,9 @@ void OptionContainer::reset()
+ 	html_template.reset();
+ 	language_list.reset();
+ 	conffile.clear();
+-	if (use_filter_groups_list) filter_groups_list.reset();
++	if (use_filter_groups_list) {
++		filter_groups_list.reset();
++	}
+ 	filter_ip.clear();
+ }
+ 
+@@ -482,6 +484,15 @@ bool OptionContainer::read(const char *f
+ 			use_xforwardedfor = false;
+ 		}
+ 
++		if (findoptionS("usefiltersystemgroups") == "on") {
++#ifdef DGDEBUG
++				std::cout << "filtergroup: use system groups" << std::endl;
++#endif
++			use_filter_system_groups = true;
++		} else {
++			use_filter_system_groups = false;
++		}
++
+ 		filter_groups = findoptionI("filtergroups");
+ 
+ 		if (!realitycheck(filter_groups, 1, 0, "filtergroups")) {
+@@ -560,10 +571,23 @@ bool OptionContainer::read(const char *f
+ #ifdef DGDEBUG
+ 			std::cout << "Not using filtergroupslist" << std::endl;
+ #endif
+-		} else if (!doReadItemList(filter_groups_list_location.c_str(),&filter_groups_list,"filtergroupslist",true)) {
+-			return false;
+ 		} else {
+-			use_filter_groups_list = true;
++			if ( use_filter_system_groups ) {
++#ifdef DGDEBUG
++				std::cout << "filtergroup: use system groups" << std::endl;
++#endif
++				// do not sort the list and du not convert to lower case (filter == 32)
++				if (!doReadItemList(filter_groups_list_location.c_str(),&filter_groups_list,"filtergroupslist",false,false,32) )
++					return false;
++#ifdef DGDEBUG
++				std::cout << "filtergroup: successfully read system groups" << std::endl;
++#endif
++				use_filter_groups_list = true;
++			} else {
++				if (!doReadItemList(filter_groups_list_location.c_str(),&filter_groups_list,"filtergroupslist",true) )
++					return false;
++				use_filter_groups_list = true;
++			}
+ 		}
+ 
+ 		if (group_names_list_location.length() == 0) {
+@@ -620,7 +644,7 @@ bool OptionContainer::read(const char *f
+ 	return true;
+ }
+ 
+-bool OptionContainer::doReadItemList(const char* filename, ListContainer* lc, const char* fname, bool swsort) {
++bool OptionContainer::doReadItemList(const char* filename, ListContainer* lc, const char* fname, bool swsort, bool dosort, int filters) {
+ 	bool result = lc->readItemList(filename, false, 0);
+ 	if (!result) {
+ 		if (!is_daemonised) {
+@@ -629,10 +653,12 @@ bool OptionContainer::doReadItemList(con
+ 		syslog(LOG_ERR, "Error opening %s", fname);
+ 		return false;
+ 	}
+-	if (swsort)
+-		lc->doSort(true);
+-	else
+-		lc->doSort(false);
++	if (dosort) {
++		if (swsort)
++			lc->doSort(true);
++		else
++			lc->doSort(false);
++	}
+ 	return true;
+ }
+ 
+--- dansguardian-2.10.1.1.orig/src/OptionContainer.hpp
++++ dansguardian-2.10.1.1/src/OptionContainer.hpp
+@@ -91,6 +91,7 @@ public:
+ 	int max_ips;
+ 	bool recheck_replaced_urls;
+ 	bool use_filter_groups_list;
++	bool use_filter_system_groups;
+ 	bool use_group_names_list;
+ 	bool auth_needs_proxy_query;
+ 
+@@ -135,6 +136,7 @@ public:
+ 
+ 	HTMLTemplate html_template;
+ 	ListContainer filter_groups_list;
++	ListContainer filter_system_groups_list;
+ 	IPList exception_ip_list;
+ 	IPList banned_ip_list;
+ 	LanguageContainer language_list;
+@@ -172,7 +174,7 @@ public:
+ 	bool inBannedIPList(const std::string *ip, std::string *&host);
+ 	bool readFilterGroupConf();
+ 	// public so fc_controlit can reload filter group config files
+-	bool doReadItemList(const char *filename, ListContainer *lc, const char *fname, bool swsort);
++	bool doReadItemList(const char *filename, ListContainer *lc, const char *fname, bool swsort, bool dosort = true, int filters = 0);
+ 
+ private:
+ 	std::deque<std::string> conffile;
--- dansguardian-2.10.1.1.orig/debian/patches/univention-03-fix-ntlm-auth.dpatch
+++ dansguardian-2.10.1.1/debian/patches/univention-03-fix-ntlm-auth.dpatch
@@ -0,0 +1,44 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## univention-03-fix-ntlm-auth.patch
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Damit die NTLM-Athentisierung über Dansguardian/Squid funktioniert muss
+## DP: Dansguardian wissen, dass er beim Header 'Connection: Proxy-support' ebenfalls
+## DP: eine peristente Verbindung nutzen soll und nicht nur bei 'Connection:
+## DP: keep-alive'
+## DP: Ein Patch dafür ist an das Dansguardian-Projekt geschickt worden. Es sieht
+## DP: allerdings nicht so aus, als ob die den Patch aufnehmen.
+## DP: UCS Bug #15682
+
+@DPATCH@
+--- dansguardian-2.10.1.1.orig/src/HTTPHeader.cpp
++++ dansguardian-2.10.1.1/src/HTTPHeader.cpp
+@@ -838,10 +838,13 @@ void HTTPHeader::checkheader(bool allowp
+ 			pproxyauthorization = &(*i);
+ 		}
+ 		else if ((pproxyconnection == NULL) && (i->startsWithLower("proxy-connection:") || i->startsWithLower("connection:"))) {
++			String lower = *i;
++
++			lower.toLower();
+ #ifdef DGDEBUG
+ 			std::cout << "CheckHeader: Found Proxy-Connection" << std::endl;
+ #endif
+-			if (i->contains("live")) {
++			if (lower.contains("keep-alive")) {
+ #ifdef DGDEBUG
+ 				std::cout << "CheckHeader: P-C says keep-alive" << std::endl;
+ #endif
+@@ -862,6 +865,13 @@ void HTTPHeader::checkheader(bool allowp
+ 				ispersistent = false;
+ 				waspersistent = false;
+ 			}
++			// keep connection alive if connection header is set to proxy-support (session based authentication)
++			if (!ispersistent && lower.contains( "proxy-support" ) ) {
++#ifdef DGDEBUG
++				std::cout << "CheckHeader: Keep connection alive because of proxy-support" << std::endl;
++#endif
++				ispersistent = true;
++			}
+ 			pproxyconnection = &(*i);
+ 		}
+ 		else if (outgoing && (pxforwardedfor == NULL) && i->startsWithLower("x-forwarded-for:")) {
--- dansguardian-2.10.1.1.orig/debian/patches/70-gcc4.6.dpatch
+++ dansguardian-2.10.1.1/debian/patches/70-gcc4.6.dpatch
@@ -0,0 +1,19 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 70-gcc4.6.dpatch by Daniel T Chen <crimsun@ubuntu.com>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Fix FTBFS by including cstddef for size_t
+
+@DPATCH@
+diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' dansguardian-2.10.1.1~/src/authplugins/ntlm.cpp dansguardian-2.10.1.1/src/authplugins/ntlm.cpp
+--- dansguardian-2.10.1.1~/src/authplugins/ntlm.cpp	2008-11-18 06:27:04.000000000 -0500
++++ dansguardian-2.10.1.1/src/authplugins/ntlm.cpp	2011-08-25 16:37:38.000000000 -0400
+@@ -27,6 +27,8 @@
+ #include "../FDTunnel.hpp"
+ #include "../OptionContainer.hpp"
+ 
++#include <cstddef>
++
+ #include <syslog.h>
+ 
+ #include <iconv.h>
--- dansguardian-2.10.1.1.orig/debian/patches/50_clamav095_support.dpatch
+++ dansguardian-2.10.1.1/debian/patches/50_clamav095_support.dpatch
@@ -0,0 +1,171 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 50_clamav095_support.dpatch by Imre Gergely <gimre@narancs.net>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Adds support for clamav 0.95
+
+@DPATCH@
+diff -urNad dansguardian-2.9.9.7~/src/contentscanners/clamav.cpp dansguardian-2.9.9.7/src/contentscanners/clamav.cpp
+--- dansguardian-2.9.9.7~/src/contentscanners/clamav.cpp	2008-06-10 12:41:41.000000000 +0300
++++ dansguardian-2.9.9.7/src/contentscanners/clamav.cpp	2009-04-19 09:47:39.000000000 +0300
+@@ -69,9 +69,11 @@
+ 	// virus database root node
+ 	// Update to support ClamAV 0.90
+ 	// Based on patch supplied by Aecio F. Neto
+-	struct cl_engine *root;
++	struct cl_engine *engine;
++#ifndef CL_INIT_DEFAULT
+ 	// archive limit options
+ 	struct cl_limits limits;
++#endif
+ 
+ #ifdef HAVE_CLAMAV_SHM
+ 	// use POSIX shared memory
+@@ -100,7 +102,11 @@
+ // destroy plugin
+ int clamavinstance::quit()
+ {
+-	cl_free(root);
++#ifdef CL_INIT_DEFAULT
++	cl_engine_free(engine);
++#else
++	cl_free(engine);
++#endif
+ 	return DGCS_OK;
+ }
+ 
+@@ -164,7 +170,11 @@
+ 		return DGCS_SCANERROR;
+ 	}
+ 
+-	rc = cl_scandesc(fd, &vn, NULL, root, &limits, CL_SCAN_STDOPT);
++#ifdef CL_INIT_DEFAULT
++	rc = cl_scandesc(fd, &vn, NULL, engine, CL_SCAN_STDOPT);
++#else
++	rc = cl_scandesc(fd, &vn, NULL, engine, &limits, CL_SCAN_STDOPT);
++#endif
+ 	close(fd);
+ 
+ #ifdef HAVE_CLAMAV_SHM
+@@ -189,7 +199,11 @@
+ {
+ 	lastmessage = lastvirusname = "";
+ 	const char *vn = NULL;
+-	int rc = cl_scanfile(filename, &vn, NULL, root, &limits, CL_SCAN_STDOPT );
++#ifdef CL_INIT_DEFAULT
++	int rc = cl_scanfile(filename, &vn, NULL, engine, CL_SCAN_STDOPT );
++#else
++	int rc = cl_scanfile(filename, &vn, NULL, engine, &limits, CL_SCAN_STDOPT );
++#endif
+ 	return doRC(rc, vn);
+ }
+ 
+@@ -220,6 +234,7 @@
+ // initialise libclamav
+ int clamavinstance::init(void* args)
+ {
++	int rc;
+ 	// always include these lists
+ 	if (!readStandardLists()) {
+ 		return DGCS_ERROR;
+@@ -244,18 +259,41 @@
+ 		return DGCS_ERROR;
+ 	}
+ 
+-	// set clam's own temp dir
+-	if (cv["tempdir"].length() > 0)
+-		cl_settempdir(cv["tempdir"].toCharArray(), 0);
+-
+ #ifdef DGDEBUG
+ 	std::cout << "Scanbuffmethod: " << smethod << std::endl;
+ 	std::cout << "Scanbuffdir: " << memdir << std::endl;
+ 	std::cout << "Tempdir: " << cv["tempdir"] << std::endl;
+ #endif
+ 
++#ifdef CL_INIT_DEFAULT
++	if ( (rc = cl_init(CL_INIT_DEFAULT)) != CL_SUCCESS ) {
++		return DGCS_ERROR;
++    	}
++	if ( !(engine = cl_engine_new()) ) {
++		return DGCS_ERROR;
++    	}
++
+ 	// set file, recursion and compression ratio limits for scanning archives
+-	root = NULL;
++	if ( (rc = cl_engine_set_num(engine, CL_ENGINE_MAX_FILES, (long long)cv["maxfiles"].toInteger())) ) {
++		return DGCS_ERROR;
++	}
++	if ( (rc = cl_engine_set_num(engine, CL_ENGINE_MAX_FILESIZE, (long long)o.max_content_filecache_scan_size + 1024 * 1024)) ) {
++		return DGCS_ERROR;
++	}
++	if ( (rc = cl_engine_set_num(engine, CL_ENGINE_MAX_RECURSION, (long long)cv["maxreclevel"].toInteger())) ) {
++		return DGCS_ERROR;
++	}
++	if ( (rc = cl_engine_set_num(engine, CL_ENGINE_MAX_SCANSIZE, (long long)cv["maxscansize"].toInteger() * 1024)) ) {
++		return DGCS_ERROR;
++	}
++// FIXME: need debug output code here
++	if (cv["tempdir"].length() > 0)
++        	if ( (rc = cl_engine_set_str(engine, CL_ENGINE_TMPDIR, cv["tempdir"].toCharArray())) ) {
++                	return DGCS_ERROR;
++        	}
++#else
++	// set file, recursion and compression ratio limits for scanning archives
++	engine = NULL;
+ 	limits.maxfiles = cv["maxfiles"].toInteger();
+ 	limits.maxfilesize = o.max_content_filecache_scan_size + 1024 * 1024;
+ 	limits.maxreclevel = cv["maxreclevel"].toInteger();
+@@ -264,12 +302,35 @@
+ 	std::cerr << "maxfiles: " << limits.maxfiles << " maxfilesize: " << limits.maxfilesize
+ 		<< " maxreclevel: " << limits.maxreclevel << " maxscansize: " << limits.maxscansize << std::endl;
+ #endif
++	if (cv["tempdir"].length() > 0)
++		cl_settempdir(cv["tempdir"].toCharArray(), 0);
++
++#endif
+ 
+ 	// load virus database
+-	unsigned int virnum = 0;
+-	int rc = cl_load(cl_retdbdir(), &root, &virnum, CL_DB_STDOPT);
++	unsigned int sigs = 0;
++#ifdef CL_INIT_DEFAULT
++	if ( (rc = cl_load(cl_retdbdir(), engine, &sigs, 0)) != CL_SUCCESS ) {
++		if (!is_daemonised)
++                	std::cerr << "Error loading clamav db: " << cl_strerror(rc) << std::endl;
++                syslog(LOG_ERR, "Error loading clamav db: %s", cl_strerror(rc));
++		return DGCS_ERROR;
++	}
+ #ifdef DGDEBUG
+-	std::cout << "engine: " << root << " virnum: " << virnum << std::endl;
++        std::cout << "engine: " << engine << " sigs: " << sigs << std::endl;
++#endif
++	if ( (rc = cl_engine_compile(engine)) != CL_SUCCESS ) {
++        	if (!is_daemonised)
++                	std::cerr << "Error preparing clamav engine: " << cl_strerror(rc) << std::endl;
++                syslog(LOG_ERR, "Error preparing clamav engine: %s", cl_strerror(rc));
++                return DGCS_ERROR;
++	}
++	return DGCS_OK;
++	
++#else
++	rc = cl_load(cl_retdbdir(), &engine, &sigs, CL_DB_STDOPT);
++#ifdef DGDEBUG
++	std::cout << "engine: " << engine << " sigs: " << sigs << std::endl;
+ #endif
+ 	if (rc != 0) {
+ 		if (!is_daemonised)
+@@ -277,7 +338,7 @@
+ 		syslog(LOG_ERR, "Error loading clamav db: %s", cl_strerror(rc));
+ 		return DGCS_ERROR;
+ 	}
+-	rc = cl_build(root);
++	rc = cl_build(engine);
+ 	if (rc != 0) {
+ 		if (!is_daemonised)
+ 			std::cerr << "Error building clamav db: " << cl_strerror(rc) << std::endl;
+@@ -285,4 +346,5 @@
+ 		return DGCS_ERROR;
+ 	}
+ 	return DGCS_OK;
++#endif
+ }
