Michael Adam [Sat, 16 Jan 2010 12:26:18 +0000 (13:26 +0100)]
conf: reduce indentation in load_config_file()
This replaces a do { ... } while (0) with break statements
ba gotos. Imho, this is much clearer.
Michael
Mukund Sivaraman [Sat, 16 Jan 2010 11:12:02 +0000 (16:42 +0530)]
Add author sections to the manpages
Mukund Sivaraman [Sat, 16 Jan 2010 11:10:48 +0000 (16:40 +0530)]
Add see-also sections to the manpages
Mukund Sivaraman [Sat, 16 Jan 2010 05:39:14 +0000 (11:09 +0530)]
Fix leak of file handle in load_config_file()
Mukund Sivaraman [Sat, 16 Jan 2010 04:52:22 +0000 (10:22 +0530)]
Use HTTPS link in URLs to Tinyproxy websites
Mukund Sivaraman [Sat, 16 Jan 2010 04:48:14 +0000 (10:18 +0530)]
Bump version number in override too
Mukund Sivaraman [Sat, 16 Jan 2010 04:45:31 +0000 (10:15 +0530)]
Fix text about bug reporting
Mukund Sivaraman [Sat, 16 Jan 2010 04:47:07 +0000 (10:17 +0530)]
Fix case of Bugzilla product name
Mukund Sivaraman [Fri, 15 Jan 2010 16:58:14 +0000 (22:28 +0530)]
Rename version 1.7.2 to 1.8.0 in NEWS
Mukund Sivaraman [Thu, 14 Jan 2010 08:29:35 +0000 (13:59 +0530)]
Add old NEWS for 1.7.0
Mukund Sivaraman [Thu, 14 Jan 2010 08:10:12 +0000 (13:40 +0530)]
Fix case
Mukund Sivaraman [Thu, 14 Jan 2010 08:00:54 +0000 (13:30 +0530)]
Fix typos and elaborate some NEWS items
Mukund Sivaraman [Thu, 14 Jan 2010 07:53:35 +0000 (13:23 +0530)]
Fix list of 1.7.2 contributors
Mukund Sivaraman [Thu, 14 Jan 2010 07:51:55 +0000 (13:21 +0530)]
Revert list of 1.7.1 contributors to what it was before
Mukund Sivaraman [Thu, 14 Jan 2010 07:50:51 +0000 (13:20 +0530)]
Add a separate contributors section for version 1.7.2
Mukund Sivaraman [Thu, 14 Jan 2010 07:50:15 +0000 (13:20 +0530)]
Fix version number in NEWS file
Michael Adam [Thu, 14 Jan 2010 07:34:09 +0000 (08:34 +0100)]
NEWS: add David Shanks to the list of contributors.
Michael Adam [Thu, 14 Jan 2010 07:33:11 +0000 (08:33 +0100)]
NEWS: document some more new features in the release notes
Michael
Michael Adam [Thu, 14 Jan 2010 07:24:46 +0000 (08:24 +0100)]
NEWS: add list of bugs fixed since 1.7.1
Muks: please verify - thes are current the fixed bugs
with milestone 1.8.0 (i.e. the renamed 1.7.2).
I hope this is correct!
I also hope this was the intended scheme - have bug
lists per version section. Please feel free to edit...
Michael
Michael Adam [Thu, 14 Jan 2010 07:14:01 +0000 (08:14 +0100)]
NEWS: mention change of XTinyProxy to be a global bool
Michael
David Shanks [Tue, 12 Jan 2010 03:40:45 +0000 (19:40 -0800)]
check_numeric_acl() should return -1 when IPs don't match.
Signed-off-by: Michael Adam <obnox@samba.org>
Michael Adam [Wed, 13 Jan 2010 22:26:20 +0000 (23:26 +0100)]
NEWS: move the changes after 1.7.1 to new section 1.7.2
Michael
Michael Adam [Wed, 13 Jan 2010 20:28:38 +0000 (21:28 +0100)]
NEWS: reformulate and elaborate some items.
Michael
Michael Adam [Wed, 13 Jan 2010 20:25:03 +0000 (21:25 +0100)]
update NEWS
* mention config reload and upon HUP
* log-reopen (not trunc!) upon HUP
* file-logging as default
Michael
Michael Adam [Wed, 13 Jan 2010 16:11:54 +0000 (17:11 +0100)]
NEWS: add Mathew Mrosko as contributor.
Michael Adam [Tue, 12 Jan 2010 23:58:55 +0000 (00:58 +0100)]
log: turn tabs into spaces =)
Michael
Michael Adam [Tue, 12 Jan 2010 23:57:32 +0000 (00:57 +0100)]
log: change internal logic to choose syslog over file logging.
Now that there is always a log file set, we just check for
syslog being set to TRUE and in that case use syslog logging,
file logging otherwiese.
Michael
Michael Adam [Tue, 12 Jan 2010 23:30:50 +0000 (00:30 +0100)]
conf: add a default for PidFile: LOCALSTATEDIR/run/tinyproxy.pid
Michael
Michael Adam [Tue, 12 Jan 2010 23:23:48 +0000 (00:23 +0100)]
log: remove a (now) useless fprintf in setup_logging.
Now that there is a default value for LogFile, the case
that neither the log file name nor syslog is configured
can not happen any more.
Michael
Michael Adam [Tue, 12 Jan 2010 23:21:39 +0000 (00:21 +0100)]
conf: set default LogFile to LOCALSTATEDIR/log/tinyproxy.log
Michael
Michael Adam [Tue, 12 Jan 2010 23:16:02 +0000 (00:16 +0100)]
Export configure variable localstatedir to C as define LOCALSTATEDIR.
So that it can be used for default values of some paths later on.
Michael
Mukund Sivaraman [Sun, 10 Jan 2010 22:47:26 +0000 (04:17 +0530)]
Make bzip2 compressed dist tarballs
We publish bzip2 compressed tarballs starting with the 1.8.x releases.
Michael Adam [Sun, 10 Jan 2010 18:27:59 +0000 (19:27 +0100)]
log: remove an fprintf "not configured" error message in setup_logging().
Now that we exit early when !logging_initialized, this
can actually not happen anymore anyways: When logging is
initialized, it was also properly configured.
Michael
Michael Adam [Sun, 10 Jan 2010 18:24:23 +0000 (19:24 +0100)]
log: shortcut return in shutdown_logging() if logging_initialized == false
This does for instance happen at startup when logging has not yet been set up.
Michael
Mukund Sivaraman [Mon, 16 Nov 2009 21:10:36 +0000 (02:40 +0530)]
Pass address family when binding to outgoing socket
Michael Adam [Sun, 10 Jan 2010 12:53:03 +0000 (13:53 +0100)]
Happy new year 2010!
Michael Adam [Sun, 10 Jan 2010 12:52:17 +0000 (13:52 +0100)]
Happy new year 2010!
Michael Adam [Sun, 10 Jan 2010 12:51:33 +0000 (13:51 +0100)]
Happy new year 2010!
Michael Adam [Tue, 13 Oct 2009 11:09:00 +0000 (13:09 +0200)]
Fix bug #55: Read request entity before sending error page to client.
https://www.banu.com/bugzilla/show_bug.cgi?id=55
This is achieved by streamlining handle_connection, adding
a common cleanup-and-exit poing ("done") and a common
failure exit point ("fail") that reads any pending data
from the client fd first before trying to send back
data (error page or stats page).
The new function get_request_entity that is used here,
does not honour any content-length header. It just calls
select on the client-fd and gets any data that is there
to read.
Michael
Michael Adam [Sat, 9 Jan 2010 23:39:55 +0000 (00:39 +0100)]
reqs:handle_connection: untangle assignment from check
Michael
Michael Adam [Sat, 9 Jan 2010 23:35:21 +0000 (00:35 +0100)]
reqs:process_client_headers: polish logic flow a bit.
Michael
Michael Adam [Sat, 9 Jan 2010 23:24:34 +0000 (00:24 +0100)]
reqs: simply process_request a bit: create common fail exit point
Michael
Mukund Sivaraman [Fri, 8 Jan 2010 16:35:17 +0000 (22:05 +0530)]
[BB#17] Add custom HTTP request headers to outgoing HTTP requests
Mukund Sivaraman [Wed, 6 Jan 2010 06:24:57 +0000 (11:54 +0530)]
Fix case in log message
Mukund Sivaraman [Sun, 3 Jan 2010 15:20:07 +0000 (20:50 +0530)]
Use named lists to match rest of the document
Mukund Sivaraman [Sun, 3 Jan 2010 15:16:37 +0000 (20:46 +0530)]
Modify description of LogLevel in manpage
Mukund Sivaraman [Sun, 3 Jan 2010 14:44:43 +0000 (20:14 +0530)]
Use proper asciidoc formatting in manpage
Mukund Sivaraman [Sun, 3 Jan 2010 14:44:29 +0000 (20:14 +0530)]
Fix caps in manpage
Mukund Sivaraman [Sun, 3 Jan 2010 08:22:00 +0000 (13:52 +0530)]
Use a configure arg to request regex checking
Disabling the regex check seems to be required during cross-compiles,
where it's not possible to test the target's regex library at
compile time.
Mukund Sivaraman [Sun, 3 Jan 2010 08:11:49 +0000 (13:41 +0530)]
Reindent the last configure.ac changes
Mathew Mrosko [Tue, 22 Dec 2009 17:24:56 +0000 (09:24 -0800)]
build: allow a forcing build with "broken" regex.
The configure would fail when cross compiling due to the regex check
automatically failing for cross compilation. Since you can't run the
regex binary check, assuming the regex library on the target platform is
working would be the only way to get the build working, or adding a
force for people to control based on their build environment.
Signed-off-by: Michael Adam <obnox@samba.org>
Michael Adam [Tue, 22 Dec 2009 23:32:46 +0000 (00:32 +0100)]
log: confess - add my (C) after substantial changes.
Michael
Michael Adam [Tue, 22 Dec 2009 12:20:36 +0000 (13:20 +0100)]
conf: confess - add my (C) after substantial changes.
Michael
Michael Adam [Tue, 22 Dec 2009 23:31:03 +0000 (00:31 +0100)]
log: remove unneeded truncate_log_file().
Michael
Michael Adam [Tue, 22 Dec 2009 23:30:11 +0000 (00:30 +0100)]
Use shutdown_logging() in main().
Michael
Michael Adam [Tue, 22 Dec 2009 23:29:14 +0000 (00:29 +0100)]
Use reload_config() in main() to load config and init logging.
Michael
Michael Adam [Tue, 22 Dec 2009 23:24:36 +0000 (00:24 +0100)]
log: fix log_message so do only one write before the fsync.
This way the logging from the various child processes does not
get clobbered up. Formerly, the different write portions
(time stamp, message, newline) would get mixed from the
various child processes' log messages.
Michael
Michael Adam [Tue, 22 Dec 2009 23:24:05 +0000 (00:24 +0100)]
log: add start/end debug messages for "sending stored logs".
Michael
Michael Adam [Tue, 22 Dec 2009 23:22:37 +0000 (00:22 +0100)]
Add warning comments to SIGHUP handlers, that we ignore the retrun code of reload_config().
This can actually fail, and we probably need some way to handle this.
Like an emergency error exit or so...
Michael
Michael Adam [Tue, 22 Dec 2009 23:20:38 +0000 (00:20 +0100)]
Don't truncate the log file in the SIGHUP handler.
Logging is re-initialized by reload_config() now.
And truncation is wrong anyways: A syslog mechanism will
move the current log file and the reopen-action will just
create a new empty log file upon SIGHUP.
Michael
Michael Adam [Tue, 22 Dec 2009 23:18:31 +0000 (00:18 +0100)]
enhance reload_config to correctly re-initialize the logging subsystem.
This includes reopening the log file (in append mode).
Also switching from syslog to logfile and visa versa are included
when called from the SIGHUP handler.
Michael
Michael Adam [Tue, 22 Dec 2009 23:17:37 +0000 (00:17 +0100)]
log: enhance close_log_file to reset logfile_fd to -1 after closing
Michael
Michael Adam [Tue, 22 Dec 2009 22:55:14 +0000 (23:55 +0100)]
log.c: remove superfluous uses of #ifdef HAVE_SYSLOG_H
When this code is hit, availability of syslog has already
been checked (when reading the config file). So config.syslog == TRUE
only when HAVE_SYSLOG_H is defined.
So I remove the preprocessor checks which only clobber the logic
and make the code harder to read (IMHO).
Michael
Michael Adam [Tue, 22 Dec 2009 12:17:19 +0000 (13:17 +0100)]
main: remove global bool processed_config_file.
This seemed out of place. Now the information is
stored in the correct places (as log.c:logging_initialized).
This way, we will be able to cleanly re-initialize
logging during config reload (SIGHUP) in subsequent
commits.
Michael
Michael Adam [Tue, 22 Dec 2009 12:15:48 +0000 (13:15 +0100)]
log: call send_stored_logs in setup_logging instead of in main().
This is where it actually belongs.
Michael
Michael Adam [Tue, 22 Dec 2009 12:11:55 +0000 (13:11 +0100)]
log: add boolean local variable logging_initialized.
This controls whether log_messages should write to the
log file / syslog or rather to the log_message_storage.
This will make the global processed_config_file variable
from main unneccessary in the next step.
Michael
Michael Adam [Tue, 22 Dec 2009 11:57:49 +0000 (12:57 +0100)]
log: add function shutdown_logging().
Michael
Michael Adam [Mon, 21 Dec 2009 23:12:55 +0000 (00:12 +0100)]
reload config upon SIGHUP
Michael
Michael Adam [Mon, 21 Dec 2009 23:11:39 +0000 (00:11 +0100)]
conf: add a log messate ("reloading config file")
Michael
Michael Adam [Mon, 21 Dec 2009 23:10:57 +0000 (00:10 +0100)]
conf: adapt a log message (add quotes to string value)
Michael
Michael Adam [Mon, 21 Dec 2009 22:56:39 +0000 (23:56 +0100)]
conf: elaborate a comment
Michael
Michael Adam [Mon, 21 Dec 2009 22:53:07 +0000 (23:53 +0100)]
conf: change a log message (to be more reasonable?)
Michael
Michael Adam [Mon, 21 Dec 2009 22:37:17 +0000 (23:37 +0100)]
main: add convenience wrapper reload_config() for reload_config_file()
Michael
Michael Adam [Mon, 21 Dec 2009 22:34:18 +0000 (23:34 +0100)]
conf.h: add "extern" to prototype of reload_config_file
Michael
Michael Adam [Mon, 21 Dec 2009 22:33:23 +0000 (23:33 +0100)]
conf: make free_config static
Michael
Michael Adam [Mon, 21 Dec 2009 22:32:22 +0000 (23:32 +0100)]
conf: make load_config_file static.
Michael
Michael Adam [Mon, 21 Dec 2009 22:31:10 +0000 (23:31 +0100)]
conf: rename reload_config --> reload_config_file
Michael
Mukund Sivaraman [Tue, 8 Dec 2009 05:20:16 +0000 (10:50 +0530)]
Remove AM_MAINTAINER_MODE
Michael Adam [Tue, 8 Dec 2009 00:21:35 +0000 (01:21 +0100)]
Fix restarting of tinyproxy: call setsockopt with REUSEADDR _before_ calling bind
Somehow this got moved too far down in the ipv6 changes.
Thanks to Mathew Mrosko for helping me debugging this.
Michael
Michael Adam [Mon, 7 Dec 2009 22:42:30 +0000 (23:42 +0100)]
Fix the build with --enable-transaparent after conf changes.
Michael
Michael Adam [Mon, 7 Dec 2009 22:39:25 +0000 (23:39 +0100)]
fix build with "--enable-reverse" after conf changes
Michael
Michael Adam [Mon, 7 Dec 2009 21:23:31 +0000 (22:23 +0100)]
Move definition of "struct config_s" from main.h to conf.h
Michael
Michael Adam [Mon, 7 Dec 2009 06:56:27 +0000 (07:56 +0100)]
main.h: fix tabs ---> spaces
Michael
Michael Adam [Mon, 7 Dec 2009 06:55:03 +0000 (07:55 +0100)]
conf: remove direct use of config from reload_config()
The "conf" argument has to be used.
Michael
Michael Adam [Mon, 7 Dec 2009 06:54:19 +0000 (07:54 +0100)]
conf: remove direct reference to config from load_config_file()
This has to use the parameter "conf".
Michael
Michael Adam [Mon, 7 Dec 2009 00:11:17 +0000 (01:11 +0100)]
Use reload_config() in main.
Michael
Michael Adam [Mon, 7 Dec 2009 00:08:22 +0000 (01:08 +0100)]
Add reload_config() - (re-)load the config file, keeping defaults.
This allows for later reloading the config at SIGHUP (e.g.).
First the old config data is freed, then the defaults that
are given as a parameter are copied over in a rather clumsy
manual fashion (maybe something more clever can be done here)
and finally, the actual config file is loaded.
Michael
Michael Adam [Sun, 6 Dec 2009 23:36:58 +0000 (00:36 +0100)]
main: Move setup_logging to after the config post-processing checks.
Michael
Michael Adam [Sun, 6 Dec 2009 23:22:53 +0000 (00:22 +0100)]
Add free_config() - free all config data.
Michael
Michael Adam [Sun, 6 Dec 2009 23:30:41 +0000 (00:30 +0100)]
Don't make config_file const in the config struct.
Michael
Michael Adam [Sun, 6 Dec 2009 23:06:50 +0000 (00:06 +0100)]
Add the anonymous_map hasmap to the config struct.
Michael
Michael Adam [Sun, 6 Dec 2009 22:59:46 +0000 (23:59 +0100)]
Add free_connect_ports_list().
Michael
Michael Adam [Sun, 6 Dec 2009 22:56:41 +0000 (23:56 +0100)]
Add connect_ports list to config struct instead of keeping extra global var.
Michael
Michael Adam [Sun, 6 Dec 2009 22:50:15 +0000 (23:50 +0100)]
Move handling of connect_ports list to its own source module.
Michael
Michael Adam [Sun, 6 Dec 2009 22:30:23 +0000 (23:30 +0100)]
Add access_list to the config struct instead of a global variable in acl.c.
Change insert_acl, check_acl and flush_access_list to take a corresponding
argument.
Michael
Michael Adam [Mon, 16 Nov 2009 00:15:39 +0000 (01:15 +0100)]
acl: add function flush_access_list().
Michael Adam [Sun, 6 Dec 2009 22:04:05 +0000 (23:04 +0100)]
Add free_reversepath_list().
Michael
Michael Adam [Sun, 6 Dec 2009 21:59:08 +0000 (22:59 +0100)]
Add a reversepath argument to reversepath_get().
This abstracts the setter/getter functions for the reversepath
list from the concrete list in config.reversepath_list.
Michael
Michael Adam [Sun, 6 Dec 2009 21:53:17 +0000 (22:53 +0100)]
Add reversepath_list parameter to reversepath_add.
Michael
Michael Adam [Sun, 6 Dec 2009 12:26:50 +0000 (13:26 +0100)]
upstream: add free_upstream_list ()
Michael