1 --- dspam-3.6.5/webui/cgi-bin/Makefile.am 2006-05-07 16:07:10.368456730 +0300
2 +++ dspam-3.6.5/webui/cgi-bin/Makefile.am 2006-05-07 16:23:40.160557961 +0300
7 -bin_SCRIPTS = configure_pl
8 -CLEANFILES = configure.pl
11 +bindir = $(pkgdatadir)/cgi
17 +CLEANFILES = configure.pl
19 +webappdir = /etc/webapps/$(PACKAGE_NAME)
20 +webapp_DATA = configure.pl \
33 -e 's,@bindir\@,$(bindir),g'
35 -configure_pl: configure.pl.in Makefile
36 +configure.pl: configure.pl.in Makefile
37 ${sed_substitute_variables} < $(srcdir)/configure.pl.in > configure.pl
39 --- dspam-3.6.5/webui/cgi-bin/templates/Makefile.am 2006-02-13 18:16:57.000000000 +0200
40 +++ dspam-3.6.5.config/webui/cgi-bin/templates/Makefile.am 2006-05-07 15:24:39.881592142 +0300
45 +templatesdir = $(pkgdatadir)/cgi/templates
49 nav_performance.html \
50 --- dspam-3.6.5/webui/htdocs/Makefile.am 2005-07-02 06:59:52.000000000 +0300
51 +++ dspam-3.6.5.config/webui/htdocs/Makefile.am 2006-05-07 15:25:19.162469057 +0300
53 # webui/htdocs/Makefile.am
57 +htdocsdir = $(pkgdatadir)/htdocs
62 --- dspam-3.6.5/webui/cgi-bin/graph.cgi 2006-05-07 16:30:10.239273555 +0300
63 +++ dspam-3.6.5/webui/cgi-bin/graph.cgi 2006-05-07 16:33:54.974294724 +0300
65 use vars qw { %CONFIG %FORM @spam_day @nonspam_day @period @data };
67 # Read configuration parameters common to all CGI scripts
68 -require "configure.pl";
69 +require "/etc/webapps/dspam/configure.pl";
73 -GD::Graph::colour::read_rgb("rgb.txt");
74 +GD::Graph::colour::read_rgb("/usr/X11R6/lib/X11/rgb.txt");
77 my($spam, $nonspam, $period) = split(/\_/, $FORM{'data'});
78 --- dspam-3.6.5/webui/cgi-bin/admingraph.cgi 2006-05-07 16:30:14.049358683 +0300
79 +++ dspam-3.6.5/webui/cgi-bin/admingraph.cgi 2006-05-07 16:33:57.714355944 +0300
81 use vars qw { %CONFIG %FORM @spam @nonspam @period @data @inoc @sm @fp @wh };
83 # Read configuration parameters common to all CGI scripts
84 -require "configure.pl";
85 +require "/etc/webapps/dspam/configure.pl";
89 -GD::Graph::colour::read_rgb("rgb.txt");
90 +GD::Graph::colour::read_rgb("/usr/X11R6/lib/X11/rgb.txt");
93 my($spam, $nonspam, $sm, $fp, $inoc, $wh, $period) = split(/\_/, $FORM{'data'});
94 --- dspam-3.6.5/webui/cgi-bin/dspam.cgi 2006-05-07 16:35:40.756658154 +0300
95 +++ dspam-3.6.5/webui/cgi-bin/dspam.cgi 2006-05-07 17:10:23.043206785 +0300
99 # Read configuration parameters common to all CGI scripts
100 -require "configure.pl";
101 +require "/etc/webapps/dspam/configure.pl";
103 if($CONFIG{"DATE_FORMAT"}) {
104 use POSIX qw(strftime);
107 $CONFIG{'ADMIN'} = 0;
108 if ($ENV{'REMOTE_USER'} ne "") {
109 - open(FILE, "<./admins");
110 + open(FILE, "</etc/webapps/dspam/admins");
113 if ($_ eq $ENV{'REMOTE_USER'}) {
118 - open(FILE, ">$FILE") || do { &error("Unable to write preferences: $!"); };
119 + open(FILE, ">$FILE") || do { &error("Unable to write preferences: $FILE: $!"); };
121 trainingMode=$FORM{'trainingMode'}
122 spamAction=$FORM{'spamAction'}
123 @@ -1576,10 +1576,10 @@
125 if (keys(%PREFS) eq "0" || $CONFIG{'PREFERENCES_EXTENSION'} != 1) {
127 - if (! -e "./default.prefs") {
128 + if (! -e "/etc/webapps/dspam/default.prefs") {
129 &error("Unable to load default preferences");
131 - open(FILE, "<./default.prefs");
132 + open(FILE, "</etc/webapps/dspam/default.prefs");
135 my($directive, $value) = split(/\=/);
136 --- dspam-3.6.5/webui/cgi-bin/admin.cgi 2006-05-07 16:34:00.934427888 +0300
137 +++ dspam-3.6.5/webui/cgi-bin/admin.cgi 2006-05-07 16:37:17.648823791 +0300
141 # Read configuration parameters common to all CGI scripts
142 -require "configure.pl";
143 +require "/etc/webapps/dspam/configure.pl";
146 # The current CGI script
151 - open(FILE, "<./admins");
152 + open(FILE, "</etc/webapps/dspam/admins");
155 if ($_ eq $ENV{'REMOTE_USER'}) {
156 @@ -125,14 +125,14 @@
157 $USER = $FORM{'username'};
159 if ($FORM{'username'} eq "") {
160 - $FILE = "./default.prefs";
161 + $FILE = "/etc/webapps/dspam/default.prefs";
162 if ($CONFIG{'PREFERENCES_EXTENSION'} != 1 && ! -l "$CONFIG{'DSPAM_HOME'}/default.prefs") {
163 $DATA{'ERROR'} = "<em>WARNING:</em> " .
164 "These default preferences will not be loaded by DSPAM, but only by ".
165 " the CGI interface when a user initially sets up their preferences. ".
166 "To have DSPAM override its configuration with these default ".
167 "preferences, symlink $CONFIG{'DSPAM_HOME'}/default.prefs to the ".
168 - "default.prefs file in the CGI directory.<BR><BR>";
169 + "default.prefs file in the /etc/webapps/dspam directory.<BR><BR>";
172 $FILE = GetPath($FORM{'username'}) . ".prefs";
177 - %PREFS = GetPrefs($USER, "./default.prefs");
178 + %PREFS = GetPrefs($USER, "/etc/webapps/dspam/default.prefs");
180 %PREFS = GetPrefs($USER, $FILE);
186 - $FILE = "./default.prefs";
187 + $FILE = "/etc/webapps/dspam/default.prefs";
191 --- dspam-3.6.5/webui/cgi-bin/configure.pl.in 2006-05-07 17:06:58.468634350 +0300
192 +++ dspam-3.6.5/webui/cgi-bin/configure.pl.in 2006-05-07 17:16:07.510906392 +0300
194 $CONFIG{'ALL_PROCS'} = "ps auxw"; # use ps -deaf for Solaris
195 $CONFIG{'MAIL_QUEUE'} = "mailq | grep '^[0-9,A-F]' | wc -l";
197 -$CONFIG{'WEB_ROOT'} = ""; # URL location of included htdocs/ files
198 +$CONFIG{'WEB_ROOT'} = "/dspam/htdocs"; # URL location of included htdocs/ files
200 # Default DSPAM display
201 #$CONFIG{'DATE_FORMAT'} = "%d.%m.%Y %H:%M"; # Date format in strftime style
203 $ENV{'PATH'} = "$ENV{'PATH'}:$CONFIG{'DSPAM_BIN'}";
205 # Autodetect filesystem layout and preference options
206 -$CONFIG{'AUTODETECT'} = 1;
207 +#$CONFIG{'AUTODETECT'} = 1;
209 # Or, if you're running dspam.cgi as untrusted, it won't be able to auto-detect
210 # so you will need to specify some features manually:
211 -#$CONFIG{'AUTODETECT'} = 0;
212 -#$CONFIG{'LARGE_SCALE'} = 0;
213 -#$CONFIG{'DOMAIN_SCALE'} = 0;
214 -#$CONFIG{'PREFERENCES_EXTENSION'} = 0;
215 +$CONFIG{'AUTODETECT'} = 1;
216 +$CONFIG{'LARGE_SCALE'} = 1;
217 +$CONFIG{'DOMAIN_SCALE'} = 0;
218 +$CONFIG{'PREFERENCES_EXTENSION'} = 1;
220 $CONFIG{'DSPAM_CGI'} = "dspam.cgi";