update to 3.0.2

- fixes two memory leaks, one serious
- quite some filter changes, upgraders beware!
- for details, see http://www.privoxy.org/announce.txt

from MAINTAINER
This commit is contained in:
sturm 2003-04-01 20:52:59 +00:00
parent ae8e267857
commit 6035b15ee1
15 changed files with 110 additions and 99 deletions

View File

@ -1,9 +1,9 @@
# $OpenBSD: Makefile,v 1.3 2003/02/24 06:44:26 pvalchev Exp $
# $OpenBSD: Makefile,v 1.4 2003/04/01 20:52:59 sturm Exp $
COMMENT= "web proxy with advanced filtering capabilities"
DISTNAME= privoxy-3.0.0-stable
PKGNAME= ${DISTNAME:S/-stable//}p0
DISTNAME= privoxy-3.0.2-stable
PKGNAME= ${DISTNAME:S/-stable//}
CATEGORIES= www
HOMEPAGE= http://www.privoxy.org/

View File

@ -1,3 +1,3 @@
MD5 (privoxy-3.0.0-stable-src.tar.gz) = 6790def33b3e5ade2aa576347aa3cd4c
RMD160 (privoxy-3.0.0-stable-src.tar.gz) = c361265d56241ff275cc11f98a372b9db41e1f9f
SHA1 (privoxy-3.0.0-stable-src.tar.gz) = 41ea2129f52f886fc549f65899a6dc5354d17202
MD5 (privoxy-3.0.2-stable-src.tar.gz) = 9a9e25ad4420dac73d57a8efe6be58a0
RMD160 (privoxy-3.0.2-stable-src.tar.gz) = 35fec245a3d4a6e94d8ad6ddd3899b2db432ae5d
SHA1 (privoxy-3.0.2-stable-src.tar.gz) = 8af78f6f8cd445d0de3cdbac4595524c206f7ae4

View File

@ -1,7 +1,7 @@
$OpenBSD: patch-GNUmakefile_in,v 1.1.1.1 2002/11/29 09:41:39 sturm Exp $
--- GNUmakefile.in.orig Fri Aug 23 08:22:40 2002
+++ GNUmakefile.in Sun Nov 17 10:08:40 2002
@@ -181,7 +181,7 @@ PTHREAD_LIB = @PTHREAD_ONLY@@PTHREAD_LI
$OpenBSD: patch-GNUmakefile_in,v 1.2 2003/04/01 20:52:59 sturm Exp $
--- GNUmakefile.in.orig Mon Nov 4 02:04:03 2002
+++ GNUmakefile.in Sat Mar 29 18:17:02 2003
@@ -226,7 +226,7 @@ PTHREAD_LIB = @PTHREAD_ONLY@@PTHREAD_LI
SRCS = $(C_SRC) $(W32_SRC) $(PCRS_SRC) $(PCRE_SRC) $(REGEX_SRC)
OBJS = $(C_OBJS) $(W32_OBJS) $(PCRS_OBJS) $(PCRE_OBJS) $(REGEX_OBJS)
HDRS = $(C_HDRS) $(W32_HDRS) $(PCRS_HDRS) $(PCRE_OBJS) $(REGEX_HDRS)

View File

@ -1,7 +1,7 @@
$OpenBSD: patch-actions_c,v 1.1.1.1 2002/11/29 09:41:39 sturm Exp $
--- actions.c.orig Sun May 26 08:13:16 2002
+++ actions.c Sun Nov 17 12:55:23 2002
@@ -1194,7 +1194,7 @@ static int load_one_actions_file(struct
$OpenBSD: patch-actions_c,v 1.2 2003/04/01 20:52:59 sturm Exp $
--- actions.c.orig Fri Feb 28 07:52:10 2003
+++ actions.c Sat Mar 29 18:17:02 2003
@@ -1206,7 +1206,7 @@ static int load_one_actions_file(struct
init_action(cur_action);
/* trim { */
@ -10,7 +10,7 @@ $OpenBSD: patch-actions_c,v 1.1.1.1 2002/11/29 09:41:39 sturm Exp $
/* check we have a trailing } and then trim it */
end = actions_buf + strlen(actions_buf) - 1;
@@ -1294,7 +1294,7 @@ static int load_one_actions_file(struct
@@ -1306,7 +1306,7 @@ static int load_one_actions_file(struct
new_alias->name = strdup(buf);

View File

@ -1,7 +1,7 @@
$OpenBSD: patch-cgi_c,v 1.1.1.1 2002/11/29 09:41:39 sturm Exp $
--- cgi.c.orig Sun Nov 17 11:26:36 2002
+++ cgi.c Sun Nov 17 12:19:16 2002
@@ -1296,7 +1296,7 @@ jb_err cgi_error_unknown(struct client_s
$OpenBSD: patch-cgi_c,v 1.2 2003/04/01 20:52:59 sturm Exp $
--- cgi.c.orig Tue Mar 11 20:26:25 2003
+++ cgi.c Sat Mar 29 18:17:02 2003
@@ -1399,7 +1399,7 @@ jb_err cgi_error_unknown(struct client_s
rsp->head_length = 0;
rsp->is_static = 0;
@ -10,7 +10,7 @@ $OpenBSD: patch-cgi_c,v 1.1.1.1 2002/11/29 09:41:39 sturm Exp $
rsp->body = malloc(strlen(body_prefix) + strlen(errnumbuf) + strlen(body_suffix) + 1);
if (rsp->body == NULL)
@@ -1481,7 +1481,7 @@ struct http_response *finish_http_respon
@@ -1596,7 +1596,7 @@ struct http_response *finish_http_respon
/*
* Fill in the HTTP Status
*/
@ -19,7 +19,7 @@ $OpenBSD: patch-cgi_c,v 1.1.1.1 2002/11/29 09:41:39 sturm Exp $
err = enlist_first(rsp->headers, buf);
/*
@@ -1493,7 +1493,7 @@ struct http_response *finish_http_respon
@@ -1608,7 +1608,7 @@ struct http_response *finish_http_respon
}
if (!err)
{

View File

@ -1,6 +1,6 @@
$OpenBSD: patch-config,v 1.1.1.1 2002/11/29 09:41:39 sturm Exp $
--- config.orig Sun Aug 25 19:50:21 2002
+++ config Sun Nov 17 10:43:18 2002
$OpenBSD: patch-config,v 1.2 2003/04/01 20:52:59 sturm Exp $
--- config.orig Wed Mar 5 11:34:15 2003
+++ config Sat Mar 29 18:17:02 2003
@@ -104,7 +104,7 @@
# flat, except for confdir/templates, where the HTML templates
# for CGI output reside (e.g. Privoxy's 404 error page).
@ -19,7 +19,7 @@ $OpenBSD: patch-config,v 1.1.1.1 2002/11/29 09:41:39 sturm Exp $
#
# 1.3. actionsfile
@@ -417,8 +417,8 @@ jarfile jarfile
@@ -438,8 +438,8 @@ jarfile jarfile
# don't end up locked out from the information on why they were
# locked out in the first place!
#

View File

@ -1,13 +1,13 @@
$OpenBSD: patch-configure_in,v 1.1.1.1 2002/11/29 09:41:39 sturm Exp $
--- configure.in.orig Mon Nov 25 21:04:43 2002
+++ configure.in Mon Nov 25 21:05:32 2002
$OpenBSD: patch-configure_in,v 1.2 2003/04/01 20:52:59 sturm Exp $
--- configure.in.orig Tue Mar 25 19:25:00 2003
+++ configure.in Sat Mar 29 18:17:02 2003
@@ -1,4 +1,4 @@
-dnl Process this file with autoconf to produce a configure script.
+/rdnl Process this file with autoconf to produce a configure script.
dnl
dnl $Id: patch-configure_in,v 1.1.1.1 2002/11/29 09:41:39 sturm Exp $
dnl $Id: patch-configure_in,v 1.2 2003/04/01 20:52:59 sturm Exp $
dnl
@@ -617,24 +617,6 @@ if test $dodk != no; then
@@ -705,24 +705,6 @@ if test $dodk != no; then
fi
AC_SUBST(WDUMP)
AC_SUBST(DB2HTML)

View File

@ -1,7 +1,7 @@
$OpenBSD: patch-errlog_c,v 1.1.1.1 2002/11/29 09:41:39 sturm Exp $
--- errlog.c.orig Sun Nov 17 12:20:12 2002
+++ errlog.c Sun Nov 17 12:45:19 2002
@@ -540,7 +540,7 @@ void log_error(int loglevel, char *fmt,
$OpenBSD: patch-errlog_c,v 1.2 2003/04/01 20:52:59 sturm Exp $
--- errlog.c.orig Thu Mar 6 22:41:04 2003
+++ errlog.c Sat Mar 29 18:17:02 2003
@@ -564,7 +564,7 @@ void log_error(int loglevel, char *fmt,
case 'd':
ival = va_arg( ap, int );
oldoutc = outc;
@ -10,7 +10,7 @@ $OpenBSD: patch-errlog_c,v 1.1.1.1 2002/11/29 09:41:39 sturm Exp $
if (outc < BUFFER_SIZE-1)
{
strcpy(outbuf + oldoutc, tempbuf);
@@ -553,7 +553,7 @@ void log_error(int loglevel, char *fmt,
@@ -577,7 +577,7 @@ void log_error(int loglevel, char *fmt,
case 'u':
uval = va_arg( ap, unsigned );
oldoutc = outc;
@ -19,7 +19,7 @@ $OpenBSD: patch-errlog_c,v 1.1.1.1 2002/11/29 09:41:39 sturm Exp $
if (outc < BUFFER_SIZE-1)
{
strcpy(outbuf + oldoutc, tempbuf);
@@ -570,13 +570,13 @@ void log_error(int loglevel, char *fmt,
@@ -594,13 +594,13 @@ void log_error(int loglevel, char *fmt,
{
lval = va_arg( ap, long );
oldoutc = outc;
@ -35,7 +35,7 @@ $OpenBSD: patch-errlog_c,v 1.1.1.1 2002/11/29 09:41:39 sturm Exp $
}
else
{
@@ -668,7 +668,7 @@ void log_error(int loglevel, char *fmt,
@@ -700,7 +700,7 @@ void log_error(int loglevel, char *fmt,
#endif /* ndef HAVE_STRERROR */
if (sval == NULL)
{
@ -44,7 +44,7 @@ $OpenBSD: patch-errlog_c,v 1.1.1.1 2002/11/29 09:41:39 sturm Exp $
sval = tempbuf;
}
#endif /* ndef _WIN32 */
@@ -714,7 +714,7 @@ void log_error(int loglevel, char *fmt,
@@ -754,7 +754,7 @@ void log_error(int loglevel, char *fmt,
hrs = ((days < -1 ? 24 : 1 < days ? -24 : days * 24) + tm_now->tm_hour - gmt.tm_hour);
mins = hrs * 60 + tm_now->tm_min - gmt.tm_min;
strftime (tempbuf, BUFFER_SIZE-6, "%d/%b/%Y:%H:%M:%S ", tm_now);

View File

@ -1,7 +1,7 @@
$OpenBSD: patch-filters_c,v 1.1.1.1 2002/11/29 09:41:39 sturm Exp $
--- filters.c.orig Thu Aug 1 13:18:28 2002
+++ filters.c Sun Nov 17 12:56:21 2002
@@ -950,7 +950,7 @@ struct http_response *trust_url(struct c
$OpenBSD: patch-filters_c,v 1.2 2003/04/01 20:52:59 sturm Exp $
--- filters.c.orig Fri Feb 28 07:52:45 2003
+++ filters.c Sat Mar 29 18:17:02 2003
@@ -958,7 +958,7 @@ struct http_response *trust_url(struct c
p = strdup("");
for (tl = csp->config->trust_list; (t = *tl) != NULL ; tl++)
{
@ -10,7 +10,7 @@ $OpenBSD: patch-filters_c,v 1.1.1.1 2002/11/29 09:41:39 sturm Exp $
string_append(&p, buf);
}
err = map(exports, "trusted-referrers", 1, p, 0);
@@ -972,7 +972,7 @@ struct http_response *trust_url(struct c
@@ -980,7 +980,7 @@ struct http_response *trust_url(struct c
p = strdup("");
for (l = csp->config->trust_info->first; l ; l = l->next)
{

View File

@ -1,41 +1,30 @@
$OpenBSD: patch-jbsockets.c,v 1.1 2003/02/24 06:44:26 pvalchev Exp $
--- jbsockets.c.orig Sun May 26 16:41:27 2002
+++ jbsockets.c Thu Feb 13 13:44:58 2003
@@ -185,6 +185,7 @@ const char jbsockets_rcs[] = "$Id: jbsoc
$OpenBSD: patch-jbsockets.c,v 1.2 2003/04/01 20:52:59 sturm Exp $
--- jbsockets.c.orig Thu Mar 6 22:41:04 2003
+++ jbsockets.c Sat Mar 29 18:40:39 2003
@@ -237,7 +237,7 @@ const char jbsockets_rcs[] = "$Id: jbsoc
#include "config.h"
#endif
+#include <pthread.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
@@ -710,8 +711,13 @@ int accept_connection(struct client_stat
-#ifdef OSX_DARWIN
+#if defined(OSX_DARWIN) || defined(__OpenBSD__)
#include <pthread.h>
#include "jcc.h"
/* jcc.h is for mutex semaphores only */
@@ -723,7 +723,7 @@ int accept_connection(struct client_stat
{
host = NULL;
}
#else
- host = gethostbyaddr((const char *)&server.sin_addr,
- sizeof(server.sin_addr), AF_INET);
+ {
+ static pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER;
+ pthread_mutex_lock(&mutex);
+ host = gethostbyaddr((const char *)&server.sin_addr,
+ sizeof(server.sin_addr), AF_INET);
+ pthread_mutex_unlock(&mutex);
+ }
#endif
if (host == NULL)
-#elif defined(OSX_DARWIN)
+#elif defined(OSX_DARWIN) || defined(__OpenBSD__)
pthread_mutex_lock(&gethostbyaddr_mutex);
host = gethostbyaddr((const char *)&server.sin_addr,
sizeof(server.sin_addr), AF_INET);
@@ -802,7 +802,7 @@ unsigned long resolve_hostname_to_ip(con
{
@@ -784,7 +790,12 @@ unsigned long resolve_hostname_to_ip(con
hostp = NULL;
}
#else
- hostp = gethostbyname(host);
+ {
+ static pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER;
+ pthread_mutex_lock(&mutex);
+ hostp = gethostbyname(host);
+ pthread_mutex_unlock(&mutex);
+ }
#endif /* def HAVE_GETHOSTBYNAME_R_(6|5|3)_ARGS */
if (hostp == NULL)
{
-#elif OSX_DARWIN
+#elif defined(OSX_DARWIN) || defined(__OpenBSD__)
pthread_mutex_lock(&gethostbyname_mutex);
hostp = gethostbyname(host);
pthread_mutex_unlock(&gethostbyname_mutex);

View File

@ -1,7 +1,16 @@
$OpenBSD: patch-jcc_c,v 1.1.1.1 2002/11/29 09:41:39 sturm Exp $
--- jcc.c.orig Sun Nov 17 12:20:12 2002
+++ jcc.c Sun Nov 17 12:47:28 2002
@@ -845,7 +845,7 @@ static void chat(struct client_state *cs
$OpenBSD: patch-jcc_c,v 1.2 2003/04/01 20:52:59 sturm Exp $
--- jcc.c.orig Mon Mar 17 11:48:59 2003
+++ jcc.c Sat Mar 29 19:10:14 2003
@@ -688,7 +688,7 @@ static int32 server_thread(void *data);
#define sleep(N) DosSleep(((N) * 100))
#endif
-#ifdef OSX_DARWIN
+#if defined(OSX_DARWIN) || defined(__OpenBSD__)
/*
* Hit OSX over the head with a hammer. Protect all *_r functions.
*/
@@ -886,7 +886,7 @@ static void chat(struct client_state *cs
if (http->cmd == NULL)
{
@ -10,7 +19,7 @@ $OpenBSD: patch-jcc_c,v 1.1.1.1 2002/11/29 09:41:39 sturm Exp $
write_socket(csp->cfd, buf, strlen(buf));
log_error(LOG_LEVEL_CLF, "%s - - [%T] \" \" 400 0", csp->ip_addr_str);
@@ -924,7 +924,7 @@ static void chat(struct client_state *cs
@@ -966,7 +966,7 @@ static void chat(struct client_state *cs
|| (csp->action->flags & ACTION_LIMIT_CONNECT
&& !match_portlist(csp->action->string[ACTION_STRING_LIMIT_CONNECT], csp->http->port)) )
{
@ -19,7 +28,7 @@ $OpenBSD: patch-jcc_c,v 1.1.1.1 2002/11/29 09:41:39 sturm Exp $
write_socket(csp->cfd, buf, strlen(buf));
log_error(LOG_LEVEL_CONNECT, "Denying suspicious CONNECT request from %s", csp->ip_addr_str);
@@ -1370,7 +1370,7 @@ static void chat(struct client_state *cs
@@ -1417,7 +1417,7 @@ static void chat(struct client_state *cs
* This is NOT the body, so
* Let's pretend the server just sent us a blank line.
*/
@ -28,7 +37,7 @@ $OpenBSD: patch-jcc_c,v 1.1.1.1 2002/11/29 09:41:39 sturm Exp $
/*
* Now, let the normal header parsing algorithm below do its
@@ -2297,7 +2297,7 @@ static void listen_loop(void)
@@ -2438,7 +2438,7 @@ static void listen_loop(void)
log_error(LOG_LEVEL_ERROR, "can't fork: %E");

View File

@ -0,0 +1,13 @@
$OpenBSD: patch-jcc_h,v 1.1 2003/04/01 20:52:59 sturm Exp $
--- jcc.h.orig Thu Mar 6 22:41:05 2003
+++ jcc.h Sat Mar 29 19:13:52 2003
@@ -121,7 +121,8 @@ extern int no_daemon;
extern int g_terminate;
#endif
-#ifdef OSX_DARWIN
+#if defined(OSX_DARWIN) || defined(__OpenBSD__)
+#include <pthread.h>
extern pthread_mutex_t gmtime_mutex;
extern pthread_mutex_t localtime_mutex;
extern pthread_mutex_t gethostbyaddr_mutex;

View File

@ -1,7 +1,7 @@
$OpenBSD: patch-loadcfg_c,v 1.1.1.1 2002/11/29 09:41:39 sturm Exp $
--- loadcfg.c.orig Sun Nov 17 12:48:16 2002
+++ loadcfg.c Sun Nov 17 12:49:47 2002
@@ -626,7 +626,7 @@ struct configuration_spec * load_config(
$OpenBSD: patch-loadcfg_c,v 1.2 2003/04/01 20:52:59 sturm Exp $
--- loadcfg.c.orig Tue Mar 11 06:53:59 2003
+++ loadcfg.c Sat Mar 29 18:17:03 2003
@@ -633,7 +633,7 @@ struct configuration_spec * load_config(
int vec_count;
char *vec[3];
@ -10,7 +10,7 @@ $OpenBSD: patch-loadcfg_c,v 1.1.1.1 2002/11/29 09:41:39 sturm Exp $
/* Copy command (i.e. up to space or tab) into cmd */
p = buf;
@@ -644,7 +644,7 @@ struct configuration_spec * load_config(
@@ -651,7 +651,7 @@ struct configuration_spec * load_config(
}
/* Copy the argument into arg */
@ -19,7 +19,7 @@ $OpenBSD: patch-loadcfg_c,v 1.1.1.1 2002/11/29 09:41:39 sturm Exp $
/* Should never happen, but check this anyway */
if (*cmd == '\0')
@@ -1274,7 +1274,7 @@ struct configuration_spec * load_config(
@@ -1281,7 +1281,7 @@ struct configuration_spec * load_config(
* log-font-name fontnane
* *************************************************************************/
case hash_log_font_name :

View File

@ -1,7 +1,7 @@
$OpenBSD: patch-miscutil_c,v 1.1.1.1 2002/11/29 09:41:39 sturm Exp $
--- miscutil.c.orig Sun Nov 17 12:20:12 2002
+++ miscutil.c Sun Nov 17 12:50:52 2002
@@ -337,7 +337,7 @@ char *strdup( const char *s )
$OpenBSD: patch-miscutil_c,v 1.2 2003/04/01 20:52:59 sturm Exp $
--- miscutil.c.orig Tue Nov 12 09:28:18 2002
+++ miscutil.c Sat Mar 29 18:17:03 2003
@@ -344,7 +344,7 @@ char *strdup( const char *s )
if (result != NULL)
{
@ -10,7 +10,7 @@ $OpenBSD: patch-miscutil_c,v 1.1.1.1 2002/11/29 09:41:39 sturm Exp $
}
return( result );
@@ -375,7 +375,7 @@ char *safe_strerror(int err)
@@ -382,7 +382,7 @@ char *safe_strerror(int err)
if (s == NULL)
{

View File

@ -1,7 +1,7 @@
$OpenBSD: patch-urlmatch_c,v 1.1.1.1 2002/11/29 09:41:39 sturm Exp $
--- urlmatch.c.orig Sun Nov 17 12:20:12 2002
+++ urlmatch.c Sun Nov 17 12:33:11 2002
@@ -664,7 +664,7 @@ jb_err create_url_spec(struct url_spec *
$OpenBSD: patch-urlmatch_c,v 1.2 2003/04/01 20:52:59 sturm Exp $
--- urlmatch.c.orig Fri Feb 28 08:09:29 2003
+++ urlmatch.c Sat Mar 29 18:17:03 2003
@@ -686,7 +686,7 @@ jb_err create_url_spec(struct url_spec *
return JB_ERR_MEMORY;
}