config.status
junkbuster
junkbuster.log
+logfile
permissionsfile
re_filterfile
# Note: Makefile is built automatically from Makefile.in
#
-# $Id: Makefile.in,v 1.7 2001/06/03 17:09:09 swa Exp $
+# $Id: Makefile.in,v 1.8 2001/06/04 10:44:57 swa Exp $
#
# Written by and Copyright (C) 2001 the SourceForge
# IJBSWA team. http://ijbswa.sourceforge.net
# Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
# $Log: Makefile.in,v $
+# Revision 1.8 2001/06/04 10:44:57 swa
+# `make redhatr-dist' now works. Except for the paths
+# in the config file.
+#
# Revision 1.7 2001/06/03 17:09:09 swa
# swa for oes: reversed my earlier change
#
redhat-dist:
@make clobber
# verify that i'm root needs to be done
- tar --exclude "ijb/CVS" -cvzf ../ijbswa.tar.gz .
+ tar -cvzf ../ijbswa.tar.gz .
# verify all version strings, FLAGS, etc. in the spec file
cat junkbuster-rh.spec | sed 's/^Version:.*/Version: $(RPM_VERSION)/g' | sed 's/^Release:.*/Release: $(VERSION_POINT)/g' > /tmp/abc && cp -f /tmp/abc junkbuster-rh.spec
# verify all files in their correct location needs to be done
# Sample Configuration file for the Internet Junkbuster 2.0
#
-# $Id: config,v 1.11 2001/06/03 18:38:11 oes Exp $
+# $Id: config,v 1.12 2001/06/04 10:44:57 swa Exp $
#
# Table of Contents
# Now, only confdir/templates is used for storing HTML templates
# for CGI results.
#
-confdir /home/swa/sourceforge/current
+# No trailing /, please.
+confdir .
+
+#
+# The directory where all logging (i.e. logfile and jarfile) takes place
+# No trailing /, please.
+#
+logdir .
+
+#
+# Note that all file specifications below are relative to
+# the above two directories!!!
+#
# The permissions file contains patterns to specify the
# filtering rules to apply to each site.
# All sites are filtered if re_filterfile specified.
# No sites are blocked. Nothing is an image.
#
-permissionsfile ./permissionsfile
+permissionsfile permissionsfile
#
# The re_filterfile contains content modification rules. These rules
#
# Default: No content modification.
#
-re_filterfile ./re_filterfile
+re_filterfile re_filterfile
#
# The logfile is where all logging and error messages are written.
#
# Default: Log to the standard error channel, not to a file
#
-logfile ./junkbuster.log
+logfile logfile
#
# The jarfile defines where Junkbuster stores the cookies it
#
# Default: Don't store intercepted cookies
#
-#jarfile ./jarfile
+#jarfile jarfile
#
# The forwardfile defines domain-specific forwarding of HTTP
#
# Default: Make all connections directly.
#
-forwardfile ./forward
+forwardfile forward
#
# Generally, Junkbuster is used as a personal proxy. The default
# Default: No access control. Everybody that can reach junkbuster
# will be served.
#
-#aclfile ./aclfile
+#aclfile aclfile
#
# 4. OPTIONS
-# $Id: Makefile.in,v 1.7 2001/06/03 17:09:09 swa Exp $
+# $Id: junkbuster-rh.spec,v 1.1 2001/06/04 10:44:57 swa Exp $
#
# Written by and Copyright (C) 2001 the SourceForge
# IJBSWA team. http://ijbswa.sourceforge.net
# or write to the Free Software Foundation, Inc., 59
# Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
-# $Log: Makefile.in,v $
+# $Log: junkbuster-rh.spec,v $
+# Revision 1.1 2001/06/04 10:44:57 swa
+# `make redhatr-dist' now works. Except for the paths
+# in the config file.
+#
#
#
%define PACKAGE_NAME junkbuster
# cp -f imagelist $RPM_BUILD_ROOT/etc/junkbuster/imagelist
# cp -f cookiefile $RPM_BUILD_ROOT/etc/junkbuster/cookiefile
cp -f aclfile $RPM_BUILD_ROOT/etc/junkbuster/aclfile
-cp -f config $RPM_BUILD_ROOT/etc/junkbuster/config
+
+# verify all file locations, etc. in the config file
+# don't start with ^ or commented lines are not replaced
+cat config | \
+ sed 's/^confdir.*/confdir \/etc\/junkbuster/g' | \
+# sed 's/^permissionsfile.*/permissionsfile \/etc\/junkbuster\/permissionsfile/g' | \
+# sed 's/^re_filterfile.*/re_filterfile \/etc\/junkbuster\/re_filterfile/g' | \
+# sed 's/^logfile.*/logfile \/var\/log\/junkbuster\/logfile/g' | \
+# sed 's/^jarfile.*/jarfile \/var\/log\/junkbuster\/jarfile/g' | \
+# sed 's/^forward.*/forward \/etc\/junkbuster\/forward/g' | \
+# sed 's/^aclfile.*/aclfile \/etc\/junkbuster\/aclfile/g' > \
+ sed 's/^logdir.*/logdir \/var\/log\/junkbuster/g' > \
+ $RPM_BUILD_ROOT/etc/junkbuster/config
+
cp -f forward $RPM_BUILD_ROOT/etc/junkbuster/forward
cp -f trust $RPM_BUILD_ROOT/etc/junkbuster/trust
# cp -f popup $RPM_BUILD_ROOT/etc/junkbuster/popup
#
# ********************************************************************
#
-# File : $Source: /cvsroot/ijbswa/current/junkbuster.monthly,v $
+# File : $Source: /cvsroot/ijbswa/current/junkbuster.logrotate,v $
#
# Purpose : Rotates all potential Junkbuster logfiles
#
# Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
# Revisions :
-# $Log: junkbuster.monthly,v $
+# $Log: junkbuster.logrotate,v $
+# Revision 1.2 2001/05/24 07:52:24 swa
+# added header. removed ^M.
+#
# Revision 1.3 2001/05/24 07:41:33 swa
# added header
#
#
# ********************************************************************/
-/var/log/junkbuster/junkbuster {
+/var/log/junkbuster/logfile {
compress
weekly
}
-
-#/var/log/junkbuster/jarfile {
-# compress
-# weekly
-#}
+/var/log/junkbuster/jarfile {
+ compress
+ weekly
+}
-const char loadcfg_rcs[] = "$Id: loadcfg.c,v 1.10 2001/06/03 11:03:48 oes Exp $";
+const char loadcfg_rcs[] = "$Id: loadcfg.c,v 1.10 2001/06/03 19:11:54 oes Exp $";
/*********************************************************************
*
* File : $Source: /cvsroot/ijbswa/current/loadcfg.c,v $
*
* Revisions :
* $Log: loadcfg.c,v $
+ * Revision 1.10 2001/06/03 19:11:54 oes
+ * introduced confdir option
+ *
* Revision 1.10 2001/06/03 11:03:48 oes
* Makefile/in
*
#define hash_actions_file 3825730796ul /* FIXME "permissionsfile" */
#define hash_debug 78263ul
#define hash_confdir 1978389lu
+#define hash_logdir 422889lu
#define hash_forwardfile 1268669141ul
#define hash_jarfile 2046641ul
#define hash_listen_address 1255650842ul
char arg[BUFSIZ];
char tmp[BUFSIZ];
+ char arg2[BUFSIZ];
+
strcpy(tmp, buf);
/* Copy command (i.e. up to space or tab) into cmd */
#ifdef TRUST_FILES
case hash_trustfile :
freez((char *)config->trustfile);
- config->trustfile = strdup(arg);
+ snprintf(arg2, BUFSIZ, "%s/%s", config->confdir, arg);
+ config->trustfile = strdup(arg2);
continue;
case hash_trust_info_url :
config->confdir = strdup(arg);
continue;
+ case hash_logdir :
+ config->logdir = strdup(arg);
+ continue;
+
case hash_single_threaded :
config->multi_threaded = 0;
continue;
case hash_actions_file :
freez((char *)config->actions_file);
- config->actions_file = strdup(arg);
+ snprintf(arg2, BUFSIZ, "%s/%s", config->confdir, arg);
+ config->actions_file = strdup(arg2);
continue;
case hash_logfile :
freez((char *)config->logfile);
- config->logfile = strdup(arg);
+ snprintf(arg2, BUFSIZ, "%s/%s", config->logdir, arg);
+ config->logfile = strdup(arg2);
continue;
#ifdef JAR_FILES
case hash_jarfile :
freez((char *)config->jarfile);
- config->jarfile = strdup(arg);
+ snprintf(arg2, BUFSIZ, "%s/%s", config->logdir, arg);
+ config->jarfile = strdup(arg2);
continue;
#endif /* def JAR_FILES */
case hash_forwardfile :
freez((char *)config->forwardfile);
- config->forwardfile = strdup(arg);
+ snprintf(arg2, BUFSIZ, "%s/%s", config->confdir, arg);
+ config->forwardfile = strdup(arg2);
continue;
#ifdef ACL_FILES
case hash_aclfile :
freez((char *)config->aclfile);
- config->aclfile = strdup(arg);
+ snprintf(arg2, BUFSIZ, "%s/%s", config->confdir, arg);
+ config->aclfile = strdup(arg2);
continue;
#endif /* def ACL_FILES */
#ifndef _PROJECT_H
#define _PROJECT_H
-#define PROJECT_H_VERSION "$Id: project.h,v 1.14 2001/06/03 11:03:48 oes Exp $"
+#define PROJECT_H_VERSION "$Id: project.h,v 1.15 2001/06/04 11:28:53 swa Exp $"
/*********************************************************************
*
* File : $Source: /cvsroot/ijbswa/current/project.h,v $
*
* Revisions :
* $Log: project.h,v $
+ * Revision 1.15 2001/06/04 11:28:53 swa
+ * redirect did not work due to missing /
+ *
* Revision 1.14 2001/06/03 11:03:48 oes
* Makefile/in
*
const char *logfile;
const char *confdir;
+ const char *logdir;
const char *actions_file;
const char *forwardfile;