--- dspam-3.6.5/webui/cgi-bin/Makefile.am 2006-05-07 16:07:10.368456730 +0300 +++ dspam-3.6.5/webui/cgi-bin/Makefile.am 2006-05-07 16:23:40.160557961 +0300 @@ -1,17 +1,21 @@ # $Id$ # -bin_SCRIPTS = configure_pl -CLEANFILES = configure.pl - -EXTRA_DIST = \ +bindir = $(pkgdatadir)/cgi +bin_SCRIPTS = \ dspam.cgi \ graph.cgi \ + admin.cgi \ + admingraph.cgi +CLEANFILES = configure.pl + +webappdir = /etc/webapps/$(PACKAGE_NAME) +webapp_DATA = configure.pl \ default.prefs \ + admins + +EXTRA_DIST = \ rgb.txt \ - admin.cgi \ - admingraph.cgi \ - admins \ configure.pl.in SUBDIRS = templates @@ -22,5 +26,5 @@ -e 's,@bindir\@,$(bindir),g' -configure_pl: configure.pl.in Makefile +configure.pl: configure.pl.in Makefile ${sed_substitute_variables} < $(srcdir)/configure.pl.in > configure.pl --- dspam-3.6.5/webui/cgi-bin/templates/Makefile.am 2006-02-13 18:16:57.000000000 +0200 +++ dspam-3.6.5.config/webui/cgi-bin/templates/Makefile.am 2006-05-07 15:24:39.881592142 +0300 @@ -1,6 +1,7 @@ # $Id$ -EXTRA_DIST = \ +templatesdir = $(pkgdatadir)/cgi/templates +templates_DATA = \ nav_alerts.html \ nav_error.html \ nav_performance.html \ --- dspam-3.6.5/webui/htdocs/Makefile.am 2005-07-02 06:59:52.000000000 +0300 +++ dspam-3.6.5.config/webui/htdocs/Makefile.am 2006-05-07 15:25:19.162469057 +0300 @@ -2,7 +2,8 @@ # webui/htdocs/Makefile.am # -EXTRA_DIST = \ +htdocsdir = $(pkgdatadir)/htdocs +htdocs_DATA = \ base.css \ dspam-logo-small.gif --- dspam-3.9.0/webui/cgi-bin/graph.cgi~ 2010-01-11 22:21:58.000000000 +0100 +++ dspam-3.9.0/webui/cgi-bin/graph.cgi 2010-04-27 00:17:05.000000000 +0200 @@ -25,7 +25,7 @@ use vars qw { %CONFIG %FORM %LANG @spam_day @nonspam_day @period @data }; # Read configuration parameters common to all CGI scripts -require "configure.pl"; +require "/etc/webapps/dspam/configure.pl"; # # Read language file @@ -40,7 +40,7 @@ %FORM = &ReadParse(); -GD::Graph::colour::read_rgb("rgb.txt"); +GD::Graph::colour::read_rgb("/usr/X11R6/lib/X11/rgb.txt"); do { my($spam, $nonspam, $period) = split(/\_/, $FORM{'data'}); --- dspam-3.9.0/webui/cgi-bin/admingraph.cgi~ 2010-01-11 22:21:58.000000000 +0100 +++ dspam-3.9.0/webui/cgi-bin/admingraph.cgi 2010-04-27 00:20:27.000000000 +0200 @@ -24,7 +24,7 @@ use vars qw { %CONFIG %FORM %LANG @spam @nonspam @period @data @inoc @sm @fp @wh @corpus @virus @black @block }; # Read configuration parameters common to all CGI scripts -require "configure.pl"; +require "/etc/webapps/dspam/configure.pl"; # # Read language file @@ -39,7 +39,7 @@ %FORM = &ReadParse(); -GD::Graph::colour::read_rgb("rgb.txt"); +GD::Graph::colour::read_rgb("/usr/X11R6/lib/X11/rgb.txt"); do { my($spam, $nonspam, $sm, $fp, $inoc, $wh, $corpus, $virus, $black, $block, $period) = split(/\_/, $FORM{'data'}); --- dspam-3.8.0/webui/cgi-bin/dspam.cgi.orig 2006-06-01 21:14:14.000000000 +0200 +++ dspam-3.8.0/webui/cgi-bin/dspam.cgi 2009-12-08 00:41:41.991051714 +0100 @@ -25,7 +25,7 @@ require "ctime.pl"; # Read configuration parameters common to all CGI scripts -require "configure.pl"; +require "/etc/webapps/dspam/configure.pl"; if($CONFIG{"DATE_FORMAT"}) { use POSIX qw(strftime); @@ -67,7 +67,7 @@ $CONFIG{'ADMIN'} = 0; if ($ENV{'REMOTE_USER'} ne "") { - open(FILE, "<./admins"); + open(FILE, ") { chomp; if ($_ eq $ENV{'REMOTE_USER'}) { @@ -2065,10 +2065,10 @@ if (keys(%PREFS) eq "0" || $CONFIG{'PREFERENCES_EXTENSION'} != 1) { - if (! -e "./default.prefs") { + if (! -e "/etc/webapps/dspam/default.prefs") { &error("$LANG{'error_load_default_prefs'}"); } - open(FILE, "<./default.prefs"); + open(FILE, ") { chomp; my($directive, $value) = split(/\=/); --- dspam-3.6.5/webui/cgi-bin/admin.cgi 2006-05-07 16:34:00.934427888 +0300 +++ dspam-3.6.5/webui/cgi-bin/admin.cgi 2006-05-07 16:37:17.648823791 +0300 @@ -24,7 +24,7 @@ require "ctime.pl"; # Read configuration parameters common to all CGI scripts -require "configure.pl"; +require "/etc/webapps/dspam/configure.pl"; # # The current CGI script @@ -37,7 +37,7 @@ # do { my($admin) = 0; - open(FILE, "<./admins"); + open(FILE, ") { chomp; if ($_ eq $ENV{'REMOTE_USER'}) { @@ -125,14 +125,14 @@ $USER = $FORM{'username'}; if ($FORM{'username'} eq "") { - $FILE = "./default.prefs"; + $FILE = "/etc/webapps/dspam/default.prefs"; if ($CONFIG{'PREFERENCES_EXTENSION'} != 1 && ! -l "$CONFIG{'DSPAM_HOME'}/default.prefs") { $DATA{'ERROR'} = "WARNING: " . "These default preferences will not be loaded by DSPAM, but only by ". " the CGI interface when a user initially sets up their preferences. ". "To have DSPAM override its configuration with these default ". "preferences, symlink $CONFIG{'DSPAM_HOME'}/default.prefs to the ". - "default.prefs file in the CGI directory.

"; + "default.prefs file in the /etc/webapps/dspam directory.

"; } } else { $FILE = GetPath($FORM{'username'}) . ".prefs"; @@ -213,7 +213,7 @@ } if (! -e $FILE) { - %PREFS = GetPrefs($USER, "./default.prefs"); + %PREFS = GetPrefs($USER, "/etc/webapps/dspam/default.prefs"); } else { %PREFS = GetPrefs($USER, $FILE); } @@ -704,7 +704,7 @@ close(PIPE); } else { if (! -e $FILE) { - $FILE = "./default.prefs"; + $FILE = "/etc/webapps/dspam/default.prefs"; } if (! -e $FILE) { --- dspam-3.9.0/webui/cgi-bin/configure.pl.in~ 2010-01-11 22:21:58.000000000 +0100 +++ dspam-3.9.0/webui/cgi-bin/configure.pl.in 2010-04-27 00:33:18.000000000 +0200 @@ -34,7 +34,7 @@ $CONFIG{'DSPAM_PROCESSES'} = "ps auxw | grep dspam | grep -v 'grep\|cgi\|sock' | wc -l"; # use ps -deaf for Solaris $CONFIG{'MAIL_QUEUE'} = "mailq | grep '^[0-9,A-F]\{10,12\}[\t ][\t ]*[1-9]' | wc -l"; -$CONFIG{'WEB_ROOT'} = ""; # URL location of included htdocs/ files +$CONFIG{'WEB_ROOT'} = "/dspam/htdocs"; # URL location of included htdocs/ files # Default DSPAM display #$CONFIG{'DATE_FORMAT'} = "%d.%m.%Y %H:%M"; # Date format in strftime style @@ -54,14 +54,14 @@ $ENV{'PATH'} = "$ENV{'PATH'}:$CONFIG{'DSPAM_BIN'}"; # Autodetect filesystem layout and preference options -$CONFIG{'AUTODETECT'} = 1; +#$CONFIG{'AUTODETECT'} = 1; # Or, if you're running dspam.cgi as untrusted, it won't be able to auto-detect # so you will need to specify some features manually: -#$CONFIG{'AUTODETECT'} = 0; -#$CONFIG{'LARGE_SCALE'} = 0; -#$CONFIG{'DOMAIN_SCALE'}= 0; -#$CONFIG{'PREFERENCES_EXTENSION'} = 0; +$CONFIG{'AUTODETECT'} = 1; +$CONFIG{'LARGE_SCALE'} = 1; +$CONFIG{'DOMAIN_SCALE'}= 0; +$CONFIG{'PREFERENCES_EXTENSION'} = 1; # Get DSPAM version $CONFIG{'DSPAM_VERSION'} = "Unknown Version";