Michael Adam [Thu, 7 Nov 2013 10:00:19 +0000 (11:00 +0100)]
[BB#63] conf: Allow multiple Listen statements in the config.
This introduces a list (vector) of addresses instead of
having just one address string.
Signed-off-by: Michael Adam <obnox@samba.org>
Michael Adam [Fri, 8 Nov 2013 10:50:57 +0000 (11:50 +0100)]
[BB#81] allow listening on multiple families when no Listen is provided in config
This is achieved by not stopping at the first result of getaddrinfo
that we managed to listen on: Without "Listen" in the config, we
call getraddrinfo with NULL address. With AI_PASSIVE, this gives results
for both IPv4 and IPv6 wildcard addresses (if both are supported).
This lets tinyproxy listen on both IPv4 and IPv6 wildcard if the system
supports them.
Signed-off-by: Michael Adam <obnox@samba.org>
Michael Adam [Fri, 8 Nov 2013 07:53:51 +0000 (08:53 +0100)]
sock: add a starting debug message to listen_sock()
Signed-off-by: Michael Adam <obnox@samba.org>
Michael Adam [Fri, 8 Nov 2013 12:53:00 +0000 (13:53 +0100)]
sock: update introductory comment for listen_sock()
Signed-off-by: Michael Adam <obnox@samba.org>
Michael Adam [Fri, 8 Nov 2013 14:31:11 +0000 (15:31 +0100)]
sock: set IPV6_V6ONLY on the socket before binding an IPv6 address
so that we can bind wildcard for both IPv4 and IPv6.
Signed-off-by: Michael Adam <obnox@samba.org>
Michael Adam [Fri, 8 Nov 2013 13:09:46 +0000 (14:09 +0100)]
sock: factor listening on one socket out of the gai-result-loop in listen_sock()
for clarity of the code
Signed-off-by: Michael Adam <obnox@samba.org>
Michael Adam [Fri, 8 Nov 2013 12:38:41 +0000 (13:38 +0100)]
sock: in listen_sock(), move variable for setsockopt() into scope
Signed-off-by: Michael Adam <obnox@samba.org>
Michael Adam [Fri, 8 Nov 2013 10:56:33 +0000 (11:56 +0100)]
sock: log each result of getaddrinfo() in listen_sock()
Signed-off-by: Michael Adam <obnox@samba.org>
Michael Adam [Fri, 8 Nov 2013 10:50:12 +0000 (11:50 +0100)]
sock: in listen_sock(), add a log message for when bind() has failed
Signed-off-by: Michael Adam <obnox@samba.org>
Michael Adam [Fri, 8 Nov 2013 10:41:35 +0000 (11:41 +0100)]
sock: in listen_sock(), detect and log failure to call setsockopt()
Signed-off-by: Michael Adam <obnox@samba.org>
Michael Adam [Fri, 8 Nov 2013 10:39:23 +0000 (11:39 +0100)]
sock: in listen_sock(), add debug message when socket() call failed.
Signed-off-by: Michael Adam <obnox@samba.org>
Michael Adam [Fri, 8 Nov 2013 12:19:32 +0000 (13:19 +0100)]
sock: move listen() into the getaddrinfo result loop in listen_sock()
This also reverses the exit logic of the loop.
It prepares listening on multiple addresses.
Signed-off-by: Michael Adam <obnox@samba.org>
Michael Adam [Fri, 8 Nov 2013 07:07:08 +0000 (08:07 +0100)]
child: use a list of listen_fds instead of one single listenfd.
This prepares listenting on multiple sockets, which will be ussed to
fix listening on the wildcard (listen on both ipv6 and ipv4) and
help add the support for multiple Listen statements in the config
Signed-off-by: Michael Adam <obnox@samba.org>
Michael Adam [Thu, 7 Nov 2013 13:30:35 +0000 (14:30 +0100)]
child: add addr argument to child_listening_sock().
Signed-off-by: Michael Adam <obnox@samba.org>
Michael Adam [Thu, 7 Nov 2013 11:15:20 +0000 (12:15 +0100)]
sock: add addr argument to listen_sock()
instead of using config.ipAddr internally.
This is in preparation to make it possible
to call it for multiple addresses.
Signed-off-by: Michael Adam <obnox@samba.org>
Michael Adam [Thu, 7 Nov 2013 09:54:56 +0000 (10:54 +0100)]
sock/child: remove global variable addrlen.
This changes listen_sock() to not return the
addrlen of the used address from getaddrinfo call
to the caller, stored in global addrlen in child.c.
This was only used to be able to allocate enough space for the
arguments to the later accept call depending on whether
IPv4 or IPv6 is used.
This removes the need to pass this info by always allocating
sizeof(struct sockaddr_storage) instead, which is enough
to carry both sockaddr_in and sockaddr_in6.
Signed-off-by: Michael Adam <obnox@samba.org>
Michael Adam [Sat, 9 Nov 2013 12:25:03 +0000 (13:25 +0100)]
[BB#109] Fix crash (infinite loop) when writing to log file fails.
Fall back to syslog logging in that case.
Signed-off-by: Michael Adam <obnox@samba.org>
Michael Adam [Sat, 9 Nov 2013 12:26:43 +0000 (13:26 +0100)]
log: remove extra newline characters in log messages.
Signed-off-by: Michael Adam <obnox@samba.org>
Gaudenz Steinlin [Mon, 9 Sep 2013 06:33:48 +0000 (08:33 +0200)]
[BB#115] Drop supplementary groups
Supplementary groups are inherited from the calling process. Drop all
supplementary groups if the "Group" configuration directive is set to
change to a different user. Otherwise the process may have more rights
than expected.
Reviewed-by: Michael Adam <obnox@samba.org>
Michael Adam [Tue, 9 Apr 2013 14:55:13 +0000 (16:55 +0200)]
[BB#112] build: fix build with autoconf >= 2.69
Use AC_CONFIG_HEADERS instead of obsolete AM_CONFIG_HEADER.
Signed-off-by: Michael Adam <obnox@samba.org>
Mukund Sivaraman [Mon, 23 Jan 2012 11:01:24 +0000 (16:31 +0530)]
Update authors
Mukund Sivaraman [Mon, 23 Jan 2012 10:55:24 +0000 (16:25 +0530)]
build: Prepend to LDFLAGS instead of replacing its contents
Mukund Sivaraman [Sun, 11 Sep 2011 06:22:21 +0000 (11:52 +0530)]
Make .xz compressed dist targets too
Mukund Sivaraman [Tue, 23 Aug 2011 09:16:04 +0000 (14:46 +0530)]
Bug #103: Move files installed in /etc/ to /etc/tinyproxy/
Mukund Sivaraman [Tue, 16 Aug 2011 12:13:59 +0000 (17:43 +0530)]
Minor whitespace fix
Mukund Sivaraman [Fri, 4 Mar 2011 09:17:05 +0000 (14:47 +0530)]
[BB#90]: Fix bug in ACL netmask generation
Thanks to John Horne who diagnosed this issue and found the problem.
Mukund Sivaraman [Fri, 4 Mar 2011 08:37:07 +0000 (14:07 +0530)]
Validate port number specified in Port directive
This was asked in bug #90 comment #8.
Mukund Sivaraman [Mon, 28 Feb 2011 07:06:05 +0000 (12:36 +0530)]
Update URLs of Tinyproxy
Mukund Sivaraman [Mon, 7 Feb 2011 12:30:39 +0000 (18:00 +0530)]
Surround IPv6 literals with [] in Host: headers
Mukund Sivaraman [Fri, 4 Feb 2011 14:58:48 +0000 (20:28 +0530)]
Handle IPv6 literals in URLs correctly
Michael Adam [Wed, 1 Dec 2010 21:21:11 +0000 (22:21 +0100)]
[BB#95] remove two comments that have become wrong by the fix.
Daniel Egger [Mon, 16 Aug 2010 20:36:20 +0000 (22:36 +0200)]
[BB#95] Fix FilterURLs with transparent proxy support.
Pass a pointer to a char pointer to do_transparent_proxy so the reassembled URL
will actually end up back in the caller where it is needed for filtering
decisions. This fixes the problem that a tinyproxy configured with the
transparent proxy functionality and "FilterURLs Yes" would filter on everything
but the domain.
Signed-off-by: daniel.egger@sphairon.com
Signed-off-by: Michael Adam <obnox@samba.org>
Michael Adam [Wed, 1 Dec 2010 20:40:07 +0000 (21:40 +0100)]
README: correctly list --enable-transparent
--enable-transparent-proxy was renamed to --enable-transparent
in August 2004... :-)
Michael Adam [Tue, 24 Aug 2010 20:47:35 +0000 (22:47 +0200)]
[BB#91] Fix upstream proxy support.
Patch by Jordi Mallach.
Michael Adam [Tue, 24 Aug 2010 20:46:10 +0000 (22:46 +0200)]
upstream: clarify debug messages
There are frequent questions "what does 'No proxy for ...' mean?"
on the mailing list and IRC. Be more specific. (No upstream proxy ...)
Correspondingly, log "Found upstream proxy ... for ..."
Mukund Sivaraman [Wed, 2 Jun 2010 04:49:49 +0000 (10:19 +0530)]
[BB#74] Create log and pid files after we drop privs
Mukund Sivaraman [Wed, 2 Jun 2010 04:41:10 +0000 (10:11 +0530)]
Remove excessive code
Mukund Sivaraman [Tue, 1 Jun 2010 02:46:53 +0000 (08:16 +0530)]
Add authors to authors.xml and regen
John van der Kamp [Tue, 1 Jun 2010 02:24:25 +0000 (07:54 +0530)]
[BB#89] Don't recompile regular expressions
This is a modification of a patch originally written by
John van der Kamp <john@kirika.demon.nl> at
<http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=579427#12>
The modification was done by the committer.
Mukund Sivaraman [Sun, 30 May 2010 04:31:36 +0000 (10:01 +0530)]
Fix typo in manpage
Mukund Sivaraman [Sun, 30 May 2010 02:38:04 +0000 (08:08 +0530)]
Precompute network addresses for increased performance
Mukund Sivaraman [Sun, 30 May 2010 02:31:14 +0000 (08:01 +0530)]
Minor indent of code
Mukund Sivaraman [Thu, 22 Apr 2010 15:44:27 +0000 (21:14 +0530)]
Use complete sentences in the manpages
Jordi Mallach [Wed, 21 Apr 2010 15:31:59 +0000 (21:01 +0530)]
[BB#83] Use output of id instead of $USER
Dmitry Semyonov [Wed, 21 Apr 2010 15:02:41 +0000 (20:32 +0530)]
Fix crash in send_stored_logs()
Mukund Sivaraman [Wed, 21 Apr 2010 14:40:56 +0000 (20:10 +0530)]
Revert "main: drop privileges right after reading the config"
This reverts commit
7a9abc2a04dd8ed1f113aa9c803af24adfb22773. It should
fix the issue in bug #87.
Mukund Sivaraman [Sun, 28 Mar 2010 05:03:38 +0000 (10:33 +0530)]
Just fix the support URLs
Mukund Sivaraman [Sun, 28 Mar 2010 04:57:40 +0000 (10:27 +0530)]
Revert "Update Tinyproxy website URLs"
This reverts commit
b108162dfb408b4818a6ea8b2a148ddaf1506bbe.
Mukund Sivaraman [Sat, 27 Mar 2010 02:52:51 +0000 (08:22 +0530)]
Update Tinyproxy website URLs
Mukund Sivaraman [Tue, 9 Mar 2010 11:38:37 +0000 (17:08 +0530)]
Revert "Revert "Pass address family when binding to outgoing socket""
This reverts commit
70885bf029a6f857684f99618f867b5c47767ae0. It looks
like bug #69 needs this fix after all.
Mukund Sivaraman [Tue, 2 Mar 2010 22:11:26 +0000 (03:41 +0530)]
Use AI_PASSIVE flag to make tinyproxy listen on wildcard interface
Signed-off-by: Michael Adam <obnox@samba.org>
Michael Adam [Tue, 2 Mar 2010 22:41:37 +0000 (23:41 +0100)]
Comment out the LogFile and PidFile options in the example tinyproxy.conf.
These are compiled in defaults now.
Michael
Michael Adam [Tue, 2 Mar 2010 22:36:59 +0000 (23:36 +0100)]
change the default pid file location to "@LOCALSTATEDIR@/run/tinyproxy/tinyproxy.pid"
I.e., add a tinyproxy subdirectory.
This is meant to ease running tinyproxy as non-root user.
The subdirectory can be used to give the tinyproxy user
write permission.
Michael
Michael Adam [Tue, 2 Mar 2010 22:11:57 +0000 (23:11 +0100)]
change the default log file location to "@LOCALSTATEDIR@/log/tinyproxy/tinyproxy.log"
i.e. add a tinyproxy subdirectory.
This is meant to ease running tinyproxy as non-root user
the subdirectory can be used to give the tinyproxy user
write permission.
Michael
Michael Adam [Tue, 2 Mar 2010 21:17:34 +0000 (22:17 +0100)]
main: some tabs->spaces
Michael Adam [Tue, 2 Mar 2010 21:05:28 +0000 (22:05 +0100)]
main: move a log message.
Michael Adam [Tue, 2 Mar 2010 21:02:46 +0000 (22:02 +0100)]
main: drop privileges right after reading the config
This is the second part of fixing bug #74.
I lets tinyproxy create its log and pid files as the
user as which it is running, so that later on at SIGHUP,
the log file can successfully be reopened.
Michael
Michael Adam [Tue, 2 Mar 2010 20:57:03 +0000 (21:57 +0100)]
main: separate loading of config and setup_logging at startup
This is the first part of a fix for bug #74
(making reloading of config work if running as non-privileged user)
Michael
Michael Adam [Tue, 23 Feb 2010 07:06:55 +0000 (08:06 +0100)]
tinyproxy.conf: fix LogFile to proper CamelCase for consistency
Michael Adam [Mon, 22 Feb 2010 23:18:29 +0000 (00:18 +0100)]
tests: fix bug #80: keep track of errors in return codes
Michael
Michael Adam [Mon, 22 Feb 2010 23:17:21 +0000 (00:17 +0100)]
tests: fix a typo in run_tests.sh
Michael Adam [Mon, 22 Feb 2010 22:31:40 +0000 (23:31 +0100)]
test: add make target "make valgrind-test-wait"
Michael Adam [Mon, 22 Feb 2010 22:17:39 +0000 (23:17 +0100)]
tests: add a new make target "make test-wait"
Michael Adam [Mon, 22 Feb 2010 22:12:51 +0000 (23:12 +0100)]
tests: Fix bug #79. Finish "make test" without waiting for user input.
Old behaviour is preserved by passing in the environment variable
TINYPROXY_TESTS_WAIT=yes.
Michael
Mukund Sivaraman [Fri, 19 Feb 2010 15:34:02 +0000 (21:04 +0530)]
Use format string when logging messages
Mukund Sivaraman [Wed, 17 Feb 2010 19:00:19 +0000 (00:30 +0530)]
Fix pkgdatadir path in tinyproxy.conf
Mukund Sivaraman [Wed, 17 Feb 2010 17:41:45 +0000 (23:11 +0530)]
Display upstream proxy support in usage message
Mukund Sivaraman [Tue, 16 Feb 2010 18:59:29 +0000 (00:29 +0530)]
Update help text a little
Mukund Sivaraman [Tue, 26 Jan 2010 07:56:32 +0000 (13:26 +0530)]
Also install AUTHORS file in doc directory
Mukund Sivaraman [Tue, 26 Jan 2010 06:54:41 +0000 (12:24 +0530)]
Install README and NEWS in doc directory
Mukund Sivaraman [Mon, 25 Jan 2010 18:10:03 +0000 (23:40 +0530)]
Remove bogus static qualifiers for these auto variables
Mukund Sivaraman [Mon, 25 Jan 2010 16:06:18 +0000 (21:36 +0530)]
Remove unnecessary cast to (void **)
Fixes a compiler warning about dereferencing type-punned pointers.
Mukund Sivaraman [Mon, 25 Jan 2010 15:46:39 +0000 (21:16 +0530)]
Remove obsolete ChangeLog file
Mukund Sivaraman [Mon, 25 Jan 2010 14:05:30 +0000 (19:35 +0530)]
Fix typo in manpage
Mukund Sivaraman [Mon, 25 Jan 2010 07:36:58 +0000 (13:06 +0530)]
Fix compiler warning about dereferencing type-punned pointers
Mukund Sivaraman [Mon, 25 Jan 2010 07:17:13 +0000 (12:47 +0530)]
Don't check for overlength strings
Mukund Sivaraman [Sun, 24 Jan 2010 05:47:20 +0000 (11:17 +0530)]
Minor text updates
Mukund Sivaraman [Sun, 24 Jan 2010 05:37:28 +0000 (11:07 +0530)]
Minor text updates to the patch section
Mukund Sivaraman [Thu, 21 Jan 2010 00:59:15 +0000 (06:29 +0530)]
Revert "Pass address family when binding to outgoing socket"
This reverts commit
65ef313cc4601b5ad84d1da1800ff38bf8f046a9.
This patch could've been the reason for BB#69.
Mukund Sivaraman [Tue, 19 Jan 2010 13:42:24 +0000 (19:12 +0530)]
Reformat README for asciidoc
Mukund Sivaraman [Tue, 19 Jan 2010 13:34:39 +0000 (19:04 +0530)]
List all authors when license is requested
(Not just recent authors.)
Mukund Sivaraman [Tue, 19 Jan 2010 13:33:36 +0000 (19:03 +0530)]
Add more authors
Mukund Sivaraman [Mon, 18 Jan 2010 23:44:06 +0000 (05:14 +0530)]
Change to for loop
Mukund Sivaraman [Mon, 18 Jan 2010 13:35:31 +0000 (19:05 +0530)]
Show authors and documenters when license is requested
Mukund Sivaraman [Mon, 18 Jan 2010 13:15:13 +0000 (18:45 +0530)]
Add authors.* files to EXTRA_DIST
Mukund Sivaraman [Mon, 18 Jan 2010 13:12:10 +0000 (18:42 +0530)]
Make note about auto-generated file an asciidoc comment
Mukund Sivaraman [Mon, 18 Jan 2010 13:05:59 +0000 (18:35 +0530)]
Update AUTHORS file for dual roles
Mukund Sivaraman [Mon, 18 Jan 2010 12:15:32 +0000 (17:45 +0530)]
Move documenters under Documentation section
Mukund Sivaraman [Mon, 18 Jan 2010 12:11:42 +0000 (17:41 +0530)]
Do better asciidoc formatting of AUTHORS file
Mukund Sivaraman [Mon, 18 Jan 2010 12:05:51 +0000 (17:35 +0530)]
Update the AUTHORS file
This uses an XML based system now to store author names.
We also keep a pre-generated AUTHORS file checked in.
Mukund Sivaraman [Mon, 18 Jan 2010 10:31:08 +0000 (16:01 +0530)]
Remove completed items from TODO list
Mukund Sivaraman [Sun, 17 Jan 2010 15:35:13 +0000 (21:05 +0530)]
Reset the NEWS file for the master branch
Mukund Sivaraman [Sun, 17 Jan 2010 13:51:22 +0000 (19:21 +0530)]
Bump master version to 1.9.0
Michael Adam [Sun, 17 Jan 2010 12:41:02 +0000 (13:41 +0100)]
Fix bug #68: Allow all ports for CONNECT at absence of ConnectPort in config.
Mukund Sivaraman [Sun, 17 Jan 2010 09:00:06 +0000 (14:30 +0530)]
Bump version to 1.8.0
Mukund Sivaraman [Sun, 17 Jan 2010 08:57:49 +0000 (14:27 +0530)]
Do an openlog() on fallback to syslog
Mukund Sivaraman [Sun, 17 Jan 2010 08:57:19 +0000 (14:27 +0530)]
Remove extra argument to log_message()
Mukund Sivaraman [Sun, 17 Jan 2010 08:56:56 +0000 (14:26 +0530)]
Remove ret variable as 0 is always returned
Mukund Sivaraman [Sun, 17 Jan 2010 08:56:08 +0000 (14:26 +0530)]
Remove unused label
Michael Adam [Sun, 17 Jan 2010 00:10:21 +0000 (01:10 +0100)]
log: when opening the log file fails, fall back to syslog logging.