import of privoxy-3.0.0

submitted by Dan Weeks <danimal@danimal.org>

Privoxy is a web proxy with advanced filtering capabilities for protecting
privacy, filtering web page content, managing cookies, controlling access,
and removing ads, banners, pop-ups and other obnoxious Internet junk.
Privoxy has a very flexible configuration and can be customized to suit
individual needs and tastes. Privoxy has application for both stand-alone
systems and multi-user networks.

naddy@ OK
This commit is contained in:
sturm 2002-11-29 09:41:39 +00:00
parent 54c0f2c3b4
commit bd5cd2e258
20 changed files with 609 additions and 0 deletions

52
www/privoxy/Makefile Normal file
View File

@ -0,0 +1,52 @@
# $OpenBSD: Makefile,v 1.1.1.1 2002/11/29 09:41:39 sturm Exp $
COMMENT= "web proxy with advanced filtering capabilities"
DISTNAME= privoxy-3.0.0-stable
PKGNAME= ${DISTNAME:S/-stable//}
CATEGORIES= www
HOMEPAGE= http://www.privoxy.org/
MAINTAINER= Dan Weeks <danimal@danimal.org>
# GPL
PERMIT_PACKAGE_CDROM= Yes
PERMIT_PACKAGE_FTP= Yes
PERMIT_DISTFILES_CDROM= Yes
PERMIT_DISTFILES_FTP= Yes
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=ijbswa/}
EXTRACT_SUFX= -src.tar.gz
NO_REGRESS= Yes
USE_GMAKE= Yes
MAKE_FILE= GNUmakefile
LIB_DEPENDS= pcre,pcreposix::devel/pcre
CONFIGURE_STYLE= autoconf
CONFIGURE_ENV= CPPFLAGS="-Dunix -I${LOCALBASE}/include" \
LDFLAGS="-L${LOCALBASE}/lib"
pre-configure:
@cd ${WRKDIST} && PATH=${PORTPATH} autoheader
# make install is broken
do-install:
@perl -pi \
-e 's|%%SYSCONFDIR%%|${SYSCONFDIR}|g;' \
${WRKSRC}/config
${INSTALL_PROGRAM} ${WRKSRC}/privoxy ${PREFIX}/sbin
${INSTALL_MAN} ${WRKSRC}/privoxy.1 ${PREFIX}/man/man1
${INSTALL_DATA_DIR} ${PREFIX}/share/doc/privoxy
${INSTALL_DATA} ${WRKSRC}/README ${PREFIX}/share/doc/privoxy
${INSTALL_DATA_DIR} ${PREFIX}/share/examples/privoxy
${INSTALL_DATA} ${WRKSRC}/config ${PREFIX}/share/examples/privoxy
${INSTALL_DATA} ${WRKSRC}/default.filter ${PREFIX}/share/examples/privoxy
${INSTALL_DATA} ${WRKSRC}/*.action ${PREFIX}/share/examples/privoxy
${INSTALL_DATA_DIR} ${PREFIX}/share/examples/privoxy/templates
${INSTALL_DATA} ${WRKSRC}/templates/* ${PREFIX}/share/examples/privoxy/templates
.include <bsd.port.mk>

3
www/privoxy/distinfo Normal file
View File

@ -0,0 +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

View File

@ -0,0 +1,12 @@
$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
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)
-LIBS = @LIBS@ $(W32_LIB) $(SOCKET_LIB) $(PTHREAD_LIB)
+LIBS = @LDFLAGS@ @LIBS@ $(W32_LIB) $(SOCKET_LIB) $(PTHREAD_LIB)
#############################################################################

View File

@ -0,0 +1,21 @@
$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
init_action(cur_action);
/* trim { */
- strcpy(actions_buf, buf + 1);
+ strlcpy(actions_buf, buf + 1, sizeof(actions_buf));
/* 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
new_alias->name = strdup(buf);
- strcpy(actions_buf, start);
+ strlcpy(actions_buf, start, sizeof(actions_buf));
if (get_actions(actions_buf, alias_list, new_alias->action))
{

View File

@ -0,0 +1,30 @@
$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
rsp->head_length = 0;
rsp->is_static = 0;
- sprintf(errnumbuf, "%d", error_to_report);
+ snprintf(errnumbuf, sizeof(errnumbuf), "%d", error_to_report);
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
/*
* Fill in the HTTP Status
*/
- sprintf(buf, "HTTP/1.0 %s", rsp->status ? rsp->status : "200 OK");
+ snprintf(buf, sizeof(buf), "HTTP/1.0 %s", rsp->status ? rsp->status : "200 OK");
err = enlist_first(rsp->headers, buf);
/*
@@ -1493,7 +1493,7 @@ struct http_response *finish_http_respon
}
if (!err)
{
- sprintf(buf, "Content-Length: %d", (int)rsp->content_length);
+ snprintf(buf, sizeof(buf), "Content-Length: %d", (int)rsp->content_length);
err = enlist(rsp->headers, buf);
}

View File

@ -0,0 +1,29 @@
$OpenBSD: patch-cgisimple_c,v 1.1.1.1 2002/11/29 09:41:39 sturm Exp $
--- cgisimple.c.orig Sun Nov 17 12:20:12 2002
+++ cgisimple.c Sun Nov 17 12:21:30 2002
@@ -843,13 +843,13 @@ jb_err cgi_show_status(struct client_sta
perc_rej = (float)local_urls_rejected * 100.0F /
(float)local_urls_read;
- sprintf(buf, "%d", local_urls_read);
+ snprintf(buf, sizeof(buf), "%d", local_urls_read);
if (!err) err = map(exports, "requests-received", 1, buf, 1);
- sprintf(buf, "%d", local_urls_rejected);
+ snprintf(buf, sizeof(buf), "%d", local_urls_rejected);
if (!err) err = map(exports, "requests-blocked", 1, buf, 1);
- sprintf(buf, "%6.2f", perc_rej);
+ snprintf(buf, sizeof(buf), "%6.2f", perc_rej);
if (!err) err = map(exports, "percent-blocked", 1, buf, 1);
}
@@ -1382,7 +1382,7 @@ static char *show_rcs(void)
#define SHOW_RCS(__x) \
{ \
extern const char __x[]; \
- sprintf(buf, "%s\n", __x); \
+ snprintf(buf, sizeof(buf), "%s\n", __x); \
string_append(&result, buf); \
}

View File

@ -0,0 +1,32 @@
$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
@@ -104,7 +104,7 @@
# flat, except for confdir/templates, where the HTML templates
# for CGI output reside (e.g. Privoxy's 404 error page).
#
-confdir .
+confdir %%SYSCONFDIR%%/privoxy
#
# 1.2. logdir
@@ -131,7 +131,7 @@ confdir .
#
# No trailing "/", please
#
-logdir .
+logdir /var/log/privoxy
#
# 1.3. actionsfile
@@ -417,8 +417,8 @@ jarfile jarfile
# don't end up locked out from the information on why they were
# locked out in the first place!
#
-trust-info-url http://www.example.com/why_we_block.html
-trust-info-url http://www.example.com/what_we_allow.html
+#trust-info-url http://www.example.com/why_we_block.html
+#trust-info-url http://www.example.com/what_we_allow.html
#
# 2.3. admin-address

View File

@ -0,0 +1,34 @@
$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
@@ -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
@@ -617,24 +617,6 @@ if test $dodk != no; then
fi
AC_SUBST(WDUMP)
AC_SUBST(DB2HTML)
-
-dnl If we use rpm, we need to check where %_topdir is
-AC_CHECK_PROGS(RPMBIN,rpm,false)
-if test $RPMBIN != false; then
- RPM_BASE=`rpm --eval "%{_topdir}"`
- if test "$RPM_BASE" = ""; then
- RPM_BASE=/usr/src/redhat
- fi
-fi
-AC_SUBST(RPM_BASE)
-
-dnl Check for jade, so we can build the documentation
-AC_CHECK_PROGS(JADEBIN,jade openjade,false)
-AC_SUBST(JADEBIN)
-
-dnl Check for man2html for docs.
-AC_CHECK_PROGS(MAN2HTML,man2html,false)
-AC_SUBST(MAN2HTML)
dnl Set doc status flag for conditional content inclusions
DOC_STATUS=p-not-stable

View File

@ -0,0 +1,55 @@
$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,
case 'd':
ival = va_arg( ap, int );
oldoutc = outc;
- outc += sprintf(tempbuf, "%d", ival);
+ outc += snprintf(tempbuf, sizeof(tempbuf), "%d", ival);
if (outc < BUFFER_SIZE-1)
{
strcpy(outbuf + oldoutc, tempbuf);
@@ -553,7 +553,7 @@ void log_error(int loglevel, char *fmt,
case 'u':
uval = va_arg( ap, unsigned );
oldoutc = outc;
- outc += sprintf(tempbuf, "%u", uval);
+ outc += snprintf(tempbuf, sizeof(tempbuf), "%u", uval);
if (outc < BUFFER_SIZE-1)
{
strcpy(outbuf + oldoutc, tempbuf);
@@ -570,13 +570,13 @@ void log_error(int loglevel, char *fmt,
{
lval = va_arg( ap, long );
oldoutc = outc;
- outc += sprintf(tempbuf, "%ld", lval);
+ outc += snprintf(tempbuf, sizeof(tempbuf), "%ld", lval);
}
else if (ch == 'u')
{
ulval = va_arg( ap, unsigned long );
oldoutc = outc;
- outc += sprintf(tempbuf, "%lu", ulval);
+ outc += snprintf(tempbuf, sizeof(tempbuf), "%lu", ulval);
}
else
{
@@ -668,7 +668,7 @@ void log_error(int loglevel, char *fmt,
#endif /* ndef HAVE_STRERROR */
if (sval == NULL)
{
- sprintf(tempbuf, "(errno = %d)", ival);
+ snprintf(tempbuf, sizeof(tempbuf), "(errno = %d)", ival);
sval = tempbuf;
}
#endif /* ndef _WIN32 */
@@ -714,7 +714,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);
- sprintf (tempbuf + strlen(tempbuf), "%+03d%02d", mins / 60, abs(mins) % 60);
+ snprintf (tempbuf + strlen(tempbuf), sizeof(tempbuf) - strlen(tempbuf), "%+03d%02d", mins / 60, abs(mins) % 60);
}
oldoutc = outc;
outc += strlen(tempbuf);

View File

@ -0,0 +1,21 @@
$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
p = strdup("");
for (tl = csp->config->trust_list; (t = *tl) != NULL ; tl++)
{
- sprintf(buf, "<li>%s</li>\n", t->spec);
+ snprintf(buf, sizeof(buf), "<li>%s</li>\n", t->spec);
string_append(&p, buf);
}
err = map(exports, "trusted-referrers", 1, p, 0);
@@ -972,7 +972,7 @@ struct http_response *trust_url(struct c
p = strdup("");
for (l = csp->config->trust_info->first; l ; l = l->next)
{
- sprintf(buf, "<li> <a href=\"%s\">%s</a><br>\n",l->str, l->str);
+ snprintf(buf, sizeof(buf), "<li> <a href=\"%s\">%s</a><br>\n",l->str, l->str);
string_append(&p, buf);
}
err = map(exports, "trust-info", 1, p, 0);

View File

@ -0,0 +1,12 @@
$OpenBSD: patch-gateway_c,v 1.1.1.1 2002/11/29 09:41:39 sturm Exp $
--- gateway.c.orig Sun Nov 17 12:20:12 2002
+++ gateway.c Sun Nov 17 12:46:58 2002
@@ -316,7 +316,7 @@ static jb_socket socks4_connect(const st
errno = EINVAL;
return(JB_INVALID_SOCKET);
}
- strcpy(cbuf + csiz, target_host);
+ strlcpy(cbuf + csiz, target_host, sizeof(cbuf) - csiz);
csiz = n;
break;
default:

View File

@ -0,0 +1,39 @@
$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
if (http->cmd == NULL)
{
- strcpy(buf, CHEADER);
+ strlcpy(buf, CHEADER, sizeof(buf));
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
|| (csp->action->flags & ACTION_LIMIT_CONNECT
&& !match_portlist(csp->action->string[ACTION_STRING_LIMIT_CONNECT], csp->http->port)) )
{
- strcpy(buf, CFORBIDDEN);
+ strlcpy(buf, CFORBIDDEN, sizeof(buf));
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
* This is NOT the body, so
* Let's pretend the server just sent us a blank line.
*/
- len = sprintf(buf, "\r\n");
+ len = snprintf(buf, sizeof(buf), "\r\n");
/*
* Now, let the normal header parsing algorithm below do its
@@ -2297,7 +2297,7 @@ static void listen_loop(void)
log_error(LOG_LEVEL_ERROR, "can't fork: %E");
- sprintf(buf , "Privoxy: can't fork: errno = %d", errno);
+ snprintf(buf, sizeof(buf), "Privoxy: can't fork: errno = %d", errno);
write_socket(csp->cfd, buf, strlen(buf));
close_socket(csp->cfd);

View File

@ -0,0 +1,30 @@
$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(
int vec_count;
char *vec[3];
- strcpy(tmp, buf);
+ strlcpy(tmp, buf, sizeof(tmp));
/* Copy command (i.e. up to space or tab) into cmd */
p = buf;
@@ -644,7 +644,7 @@ struct configuration_spec * load_config(
}
/* Copy the argument into arg */
- strcpy(arg, p);
+ strlcpy(arg, p, sizeof(arg));
/* Should never happen, but check this anyway */
if (*cmd == '\0')
@@ -1274,7 +1274,7 @@ struct configuration_spec * load_config(
* log-font-name fontnane
* *************************************************************************/
case hash_log_font_name :
- strcpy( g_szFontFaceName, arg );
+ strlcpy( g_szFontFaceName, arg , sizeof(g_szFontFaceName));
continue;
/* *************************************************************************

View File

@ -0,0 +1,21 @@
$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 )
if (result != NULL)
{
- strcpy( result, s );
+ strlcpy( result, s, sizeof(result) );
}
return( result );
@@ -375,7 +375,7 @@ char *safe_strerror(int err)
if (s == NULL)
{
- sprintf(buf, "(errno = %d)", err);
+ snprintf(buf, sizeof(buf), "(errno = %d)", err);
s = buf;
}

View File

@ -0,0 +1,12 @@
$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 *
return JB_ERR_MEMORY;
}
- sprintf(rebuf, "^(%s)", url->path);
+ snprintf(rebuf, sizeof(rebuf), "^(%s)", url->path);
errcode = regcomp(url->preg, rebuf,
(REG_EXTENDED|REG_NOSUB|REG_ICASE));

26
www/privoxy/pkg/DEINSTALL Normal file
View File

@ -0,0 +1,26 @@
#!/bin/sh
# $OpenBSD: DEINSTALL,v 1.1.1.1 2002/11/29 09:41:39 sturm Exp $
#
# privoxy de-installation
set -e
PATH=/bin:/usr/bin:/sbin:/usr/sbin
PREFIX=${PKG_PREFIX:-/usr/local}
CONFIG_DIR=${SYSCONFDIR}/privoxy
LOG_DIR=/var/log/privoxy
echo
echo "+---------------"
echo "| To completely deinstall the $1 package you need to perform"
echo "| these steps as root:"
echo "|"
echo "| rm -rf $CONFIG_DIR"
echo "| rm -rf $LOG_DIR"
echo "| rmuser privoxy"
echo "|"
echo "| Do not do this if you plan on re-installing $1"
echo "| at some future time."
echo "+---------------"
echo
exit 0

10
www/privoxy/pkg/DESCR Normal file
View File

@ -0,0 +1,10 @@
Privoxy is a web proxy with advanced filtering capabilities for protecting
privacy, filtering web page content, managing cookies, controlling access,
and removing ads, banners, pop-ups and other obnoxious Internet junk.
Privoxy has a very flexible configuration and can be customized to suit
individual needs and tastes. Privoxy has application for both stand-alone
systems and multi-user networks.
Privoxy is based on Internet Junkbuster (tm).
WWW: ${HOMEPAGE}

113
www/privoxy/pkg/INSTALL Normal file
View File

@ -0,0 +1,113 @@
#!/bin/sh
# $OpenBSD: INSTALL,v 1.1.1.1 2002/11/29 09:41:39 sturm Exp $
PATH=/bin:/usr/bin:/sbin:/usr/sbin
PREFIX=${PKG_PREFIX:-/usr/local}
CONFIG_DIR=${SYSCONFDIR}/privoxy
SAMPLE_CONFIG_DIR=${PREFIX}/share/examples/privoxy
LOG_DIR=/var/log/privoxy
PRIVOXYUSER=privoxy
PRIVOXYGROUP=privoxy
do_install_usergroup()
{
# create privoxy user and group
groupinfo -e $PRIVOXYGROUP
if [ $? -eq 0 ]; then
echo "===> Using $PRIVOXYGROUP group for Privoxy"
else
echo "===> Creating $PRIVOXYGROUP group for Privoxy"
groupadd $PRIVOXYGROUP
fi
userinfo -e $PRIVOXYUSER
if [ $? -eq 0 ]; then
echo "===> Using $PRIVOXYUSER user for Privoxy"
else
echo "===> Creating $PRIVOXYUSER user for Privoxy"
useradd -g $PRIVOXYGROUP -d /nonexistent -L daemon -c 'Privoxy Account' -s /sbin/nologin $PRIVOXYUSER
fi
}
do_message_top()
{
echo
echo "+---------------"
}
do_notice_conf()
{
echo "| The existing $1 configuration files in $CONFIG_DIR have NOT"
echo "| been changed. You may want to compare them to the current samples in"
echo "| $SAMPLE_CONFIG_DIR and update your configuration"
echo "| files as needed."
echo "|"
}
do_install_conf()
{
install -d -o root -g $PRIVOXYGROUP -m 755 $CONFIG_DIR
install -d -o root -g $PRIVOXYGROUP -m 755 $CONFIG_DIR/templates
install -o $PRIVOXYUSER -g $PRIVOXYGROUP -m 644 $SAMPLE_CONFIG_DIR/config $CONFIG_DIR
install -o $PRIVOXYUSER -g $PRIVOXYGROUP -m 644 $SAMPLE_CONFIG_DIR/*.action $CONFIG_DIR
install -o $PRIVOXYUSER -g $PRIVOXYGROUP -m 644 $SAMPLE_CONFIG_DIR/default.filter $CONFIG_DIR
install -o $PRIVOXYUSER -g $PRIVOXYGROUP -m 644 $SAMPLE_CONFIG_DIR/templates/* $CONFIG_DIR/templates
echo "| The $1 configuration files have been installed"
echo "| in $CONFIG_DIR."
echo "|"
echo "| Please view these files and change the configuration to meet your needs."
echo "|"
}
do_install_log()
{
install -d -o root -g $PRIVOXYGROUP -m 775 $LOG_DIR
echo "| The $1 log directory has been installed"
echo "| in $LOG_DIR."
echo "|"
}
do_message_bottom()
{
echo "| You will need to edit /etc/rc.local as appropriate and add a"
echo "| section similiar to the following:"
echo "|"
echo "| if [ -x ${PREFIX}/sbin/privoxy ]; then"
echo "| echo -n ' privoxy';"
echo "| ${PREFIX}/sbin/privoxy --user privoxy.privoxy ${SYSCONFDIR}/privoxy/config"
echo "| fi"
echo "+---------------"
echo
}
# verify proper execution
#
if [ $# -ne 2 ]; then
echo "usage: $0 distname { PRE-INSTALL | POST-INSTALL }" >&2
exit 1
fi
# Verify/process the command
#
case $2 in
PRE-INSTALL)
do_install_usergroup
;;
POST-INSTALL)
do_message_top
if [ ! -d $CONFIG_DIR ]; then
do_install_conf $1
else
do_notice_conf $1
fi
if [ ! -d $LOG_DIR ]; then
do_install_log $1
fi
do_message_bottom
;;
*)
echo "usage: $0 distname { PRE-INSTALL | POST-INSTALL }" >&2
exit 1
;;
esac
exit 0

45
www/privoxy/pkg/PLIST Normal file
View File

@ -0,0 +1,45 @@
@comment $OpenBSD: PLIST,v 1.1.1.1 2002/11/29 09:41:39 sturm Exp $
man/man1/privoxy.1
sbin/privoxy
share/doc/privoxy/README
share/examples/privoxy/config
share/examples/privoxy/default.action
share/examples/privoxy/default.filter
share/examples/privoxy/standard.action
share/examples/privoxy/templates/blocked
share/examples/privoxy/templates/cgi-error-404
share/examples/privoxy/templates/cgi-error-bad-param
share/examples/privoxy/templates/cgi-error-disabled
share/examples/privoxy/templates/cgi-error-file
share/examples/privoxy/templates/cgi-error-file-read-only
share/examples/privoxy/templates/cgi-error-modified
share/examples/privoxy/templates/cgi-error-parse
share/examples/privoxy/templates/cgi-style.css
share/examples/privoxy/templates/connect-failed
share/examples/privoxy/templates/default
share/examples/privoxy/templates/edit-actions-add-url-form
share/examples/privoxy/templates/edit-actions-for-url
share/examples/privoxy/templates/edit-actions-for-url-filter
share/examples/privoxy/templates/edit-actions-list
share/examples/privoxy/templates/edit-actions-list-button
share/examples/privoxy/templates/edit-actions-list-section
share/examples/privoxy/templates/edit-actions-list-url
share/examples/privoxy/templates/edit-actions-remove-url-form
share/examples/privoxy/templates/edit-actions-url-form
share/examples/privoxy/templates/mod-local-help
share/examples/privoxy/templates/mod-support-and-service
share/examples/privoxy/templates/mod-title
share/examples/privoxy/templates/mod-unstable-warning
share/examples/privoxy/templates/no-such-domain
share/examples/privoxy/templates/show-request
share/examples/privoxy/templates/show-status
share/examples/privoxy/templates/show-status-file
share/examples/privoxy/templates/show-url-info
share/examples/privoxy/templates/show-version
share/examples/privoxy/templates/toggle
share/examples/privoxy/templates/toggle-mini
share/examples/privoxy/templates/untrusted
share/examples/privoxy/user.action
@dirrm share/examples/privoxy/templates
@dirrm share/examples/privoxy
@dirrm share/doc/privoxy

12
www/privoxy/pkg/SECURITY Normal file
View File

@ -0,0 +1,12 @@
$OpenBSD: SECURITY,v 1.1.1.1 2002/11/29 09:41:39 sturm Exp $
sprintf() and strcpy() changed to snprintf() and strlcpy()
respectively in:
actions.c, cgi.c, cgisimple.c, errlog.c, filters.c,
gateway.c, jcc.c, loadcfg.c, miscutil.c, urlmatch.c
The privoxy daemon should be run as a non-root user. The
install sets up a privoxy user and group, installs config
and log files with that user and group, and points the
user at the way to start the daemon with the user and
group.