summaryrefslogtreecommitdiff
path: root/recipes/havp/havp-0.86/reconfigure.patch
blob: 6485efaa4232e67b06883a43602e1f861fb62aaa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
Fix templates for autoreconf. Also copy non autoheader generated settings
from default.h.in to defs.h and include that from the autogenerated
default.h - maybe there's some way to stop autoreconf wiping them all out
but I have no idea what that is. This at least makes it all work as
expected.

Index: havp-0.86/configure.in
===================================================================
--- havp-0.86.orig/configure.in	2007-03-17 23:34:01.000000000 +1100
+++ havp-0.86/configure.in	2007-05-16 11:17:27.000000000 +1000
@@ -9,6 +9,7 @@
 AC_PREFIX_DEFAULT(/usr/local)
 
 AC_CONFIG_HEADER(havp/default.h)
+AH_BOTTOM([#include "defs.h"])
 
 AC_ARG_ENABLE(locking,[  --disable-locking       Disable mandatory locking (not needed on Linux/Solaris system)], enable_locking=$enableval, enable_locking=yes)
 AC_ARG_ENABLE(ssl-tunnel,[  --enable-ssl-tunnel     Enable SSL proxying (not scanned, only forwarded!)], enable_ssl_tunnel=$enableval, enable_ssl_tunnel=no)
@@ -53,7 +54,7 @@
 then
 	AC_MSG_RESULT([disabled, no dynamic scanning!])
 
-	AC_DEFINE(NOMAND)
+	AC_DEFINE(NOMAND, 1, [Enable mandatory locking])
 else
 	if test "$mandatory" = "yes"
 	then
@@ -78,7 +79,7 @@
 
 if test "$enable_ssl_tunnel" = "yes"
 then
-	AC_DEFINE(SSLTUNNEL)
+	AC_DEFINE(SSLTUNNEL, 1, [Enable SSL tunnel])
 fi
 
 AC_MSG_CHECKING(for ClamAV scanner library)
@@ -118,7 +119,7 @@
 	LDFLAGS="$LDFLAGS -lclamav"
 
 	SCANNEROBJECTS="clamlibscanner.o"
-	AC_DEFINE(USECLAMLIB)
+	AC_DEFINE(USECLAMLIB, 1, [Enable clamav library])
 
 	AC_MSG_RESULT([found $clamversion in $clamprefix])
 else
@@ -136,7 +137,7 @@
 		SCANNEROBJECTS="$SCANNEROBJECTS trophiescanner.o"
 		LDFLAGS="-L/etc/iscan -lvsapi $LDFLAGS"
 
-		AC_DEFINE(USETROPHIE)
+		AC_DEFINE(USETROPHIE, 1, [Use Trend Micro scanner])
 	else
 		AC_MSG_RESULT([/etc/iscan/libvsapi.so not found, disabled])
 	fi
@@ -151,14 +152,14 @@
 test "$localstatedir" = '${prefix}/var' && localstatedir=/var || localstatedir=$localstatedir
 sysconfdir=`eval echo $sysconfdir | $PERL -pe 's#/havp/?$##'`
 localstatedir=`eval echo $localstatedir`
-AC_DEFINE_UNQUOTED(CONFIGFILE, "$sysconfdir/havp/havp.config")
-AC_DEFINE_UNQUOTED(WHITELISTFILE, "$sysconfdir/havp/whitelist")
-AC_DEFINE_UNQUOTED(BLACKLISTFILE, "$sysconfdir/havp/blacklist")
-AC_DEFINE_UNQUOTED(TEMPLATEPATH, "$sysconfdir/havp/templates/en")
-AC_DEFINE_UNQUOTED(ACCESSLOG, "$localstatedir/log/havp/access.log")
-AC_DEFINE_UNQUOTED(ERRORLOG, "$localstatedir/log/havp/error.log")
-AC_DEFINE_UNQUOTED(SCANTEMPFILE, "$localstatedir/tmp/havp/havp-XXXXXX")
-AC_DEFINE_UNQUOTED(PIDFILE, "$localstatedir/run/havp/havp.pid")
+AC_DEFINE_UNQUOTED([CONFIGFILE], "$sysconfdir/havp/havp.config", [Config file])
+AC_DEFINE_UNQUOTED([WHITELISTFILE], "$sysconfdir/havp/whitelist", [Whitelist file])
+AC_DEFINE_UNQUOTED([BLACKLISTFILE], "$sysconfdir/havp/blacklist", [Blkaclist file])
+AC_DEFINE_UNQUOTED([TEMPLATEPATH], "$sysconfdir/havp/templates/en", [Template path])
+AC_DEFINE_UNQUOTED([ACCESSLOG], "$localstatedir/log/havp/access.log", [Access log file])
+AC_DEFINE_UNQUOTED([ERRORLOG], "$localstatedir/log/havp/error.log", [Error log file])
+AC_DEFINE_UNQUOTED([SCANTEMPFILE], "$localstatedir/tmp/havp/havp-XXXXXX", [Scanner temp file])
+AC_DEFINE_UNQUOTED([PIDFILE], "$localstatedir/run/havp/havp.pid", [PID file])
 
 AC_SUBST(SCANNEROBJECTS)
 AC_SUBST(CFLAGS)
Index: havp-0.86/havp/defs.h
===================================================================
--- /dev/null	1970-01-01 00:00:00.000000000 +0000
+++ havp-0.86/havp/defs.h	2007-05-16 11:19:59.000000000 +1000
@@ -0,0 +1,82 @@
+#define VERSION "0.86"
+
+//##############################################################
+//Define if you want to rewrite a URL
+//#define REWRITE URLRewrite["havp"]="www.server-side.de"; URLRewrite["www.havp"]="www.server-side.de";
+
+//##############################################################
+//Parameters in Configurationfile
+
+#define CONFIGPARAMS \
+ "WHITELISTFIRST","TEMPDIR","RANGE","USER","GROUP", \
+ "SERVERNUMBER","PORT","BIND_ADDRESS","SOURCE_ADDRESS","KEEPBACKBUFFER", \
+ "KEEPBACKTIME","TRICKLING","MAXSCANSIZE","WHITELIST","BLACKLIST","PIDFILE", \
+ "DAEMON","TRANSPARENT","LOG_OKS","ACCESSLOG","ERRORLOG","LOGLEVEL", \
+ "USESYSLOG","SYSLOGNAME","SYSLOGFACILITY","SYSLOGLEVEL","IGNOREVIRUS", \
+ "DISPLAYINITIALMESSAGES","DBRELOAD","SCANTEMPFILE","TEMPLATEPATH", \
+ "PARENTPROXY","PARENTPORT","MAXSERVERS","FORWARDED_IP","X_FORWARDED_FOR","FAILSCANERROR", \
+ "MAXDOWNLOADSIZE","SCANNERTIMEOUT","STREAMUSERAGENT","STREAMSCANSIZE","SCANIMAGES", \
+ "ENABLECLAMLIB","CLAMDBDIR","CLAMBLOCKBROKEN","CLAMBLOCKMAX","CLAMBLOCKENCRYPTED", \
+ "CLAMMAXFILES","CLAMMAXFILESIZE","CLAMMAXRECURSION","CLAMMAXRATIO", \
+ "ENABLEAVG","AVGSERVER","AVGPORT", \
+ "ENABLEAVESERVER","AVESOCKET", \
+ "ENABLEFPROT","FPROTSERVER","FPROTPORT", \
+ "ENABLETROPHIE","TROPHIEMAXFILES","TROPHIEMAXFILESIZE","TROPHIEMAXRATIO", \
+ "ENABLENOD32","NOD32SOCKET","NOD32VERSION", \
+ "ENABLECLAMD","CLAMDSOCKET","CLAMDSERVER","CLAMDPORT", \
+ "ENABLESOPHIE","SOPHIESOCKET", \
+ "ENABLEAVAST","AVASTSOCKET","AVASTSERVER","AVASTPORT", \
+ "ENABLEARCAVIR","ARCAVIRSOCKET"
+//SCANNERS
+
+
+//##############################################################
+//Configuration not setable in havp.config
+
+//Time format
+#define TIMEFORMAT "%d/%m/%Y %H:%M:%S "
+
+//CONNTIMEOUT in seconds
+#define CONNTIMEOUT 60
+
+//RECVTIMEOUT in seconds
+#define RECVTIMEOUT 120
+
+//SENDTIMEOUT in seconds
+#define SENDTIMEOUT 120
+
+//Maximum client connection waiting for accept
+#define MAXCONNECTIONS 1024
+
+//Maximum bytes received in one request
+#define MAXRECV 14600
+
+//Maximum logfile line length
+#define STRINGLENGTH 1000
+
+//Maximum hardlock size - do not change
+#define MAXFILELOCKSIZE 1000000000
+
+//Valid Methods
+#define METHODS \
+ "GET","POST","HEAD","CONNECT","PUT","TRACE","PURGE","OPTIONS","UNLOCK", \
+ "SEARCH","PROPFIND","BPROPFIND","PROPPATCH","BPROPPATCH","MKCOL","COPY", \
+ "BCOPY","MOVE","LOCK","BMOVE","DELETE","BDELETE","SUBSCRIBE","UNSUBSCRIBE", \
+ "POLL","REPORT","ERROR","NONE"
+
+//Maximum length of SCANTEMPFILE
+#define MAXSCANTEMPFILELENGTH 200
+
+//Maximum length of http headers
+#define MAXHTTPHEADERLENGTH 20480
+
+// HTML Error String
+#define ERROR_DNS	"dns.html"
+#define VIRUS_FOUND	"virus.html"
+#define ERROR_SCANNER	"scanner.html"
+#define ERROR_DOWN	"down.html"
+#define ERROR_INVALID	"invalid.html"
+#define ERROR_REQUEST	"request.html"
+#define ERROR_BODY	"error.html"
+#define ERROR_BLACKLIST	"blacklist.html"
+#define ERROR_MAXSIZE	"maxsize.html"