Wayne Davison
8ee6adefe3
Call logfile_close() and logfile_reopen() (tweaked function names).
2005-04-14 16:08:12 +00:00
Wayne Davison
4313d6f9c0
Changed the bind_address local variables to be named bind_addr
...
in order to avoid confusion with the bind_address global.
2005-04-05 05:52:49 +00:00
Wayne Davison
b31c92edcc
- Look for last '@' in a user@host spec.
2005-03-01 03:39:32 +00:00
Wayne Davison
1da05366ad
The daemon loop needs to call log_open() because it called log_close().
2005-02-18 17:34:09 +00:00
Wayne Davison
4f5b0756df
John E. Malmberg convinced me to standardize on #ifs for defined
...
values instead of non-zero.
2005-02-14 00:53:43 +00:00
Wayne Davison
4ccfd96cfe
Tweaked one or more warning messages.
2005-01-31 19:13:19 +00:00
Wayne Davison
92e1aeede7
Got rid of an unreachable free() call.
2005-01-28 21:07:05 +00:00
Wayne Davison
25ff04417e
Use "#if" (not "#ifdef") for configure-defined macros.
2005-01-28 18:50:49 +00:00
Wayne Davison
4c8f6b6a06
No need to call log_open() in start_accept_loop() because
...
rsync_module() calls log_init() before it gives up its privileges.
2005-01-28 17:33:57 +00:00
Wayne Davison
880570f228
Added a missing newline to an error message.
2005-01-27 21:45:32 +00:00
Wayne Davison
eb8ffa9040
Actually, since the close calls shouldn't fail (now that listener
...
is properly set to -1 on close), we don't really need to play the
save-errno game after all.
2004-09-16 17:22:31 +00:00
Wayne Davison
ab217f7ffa
- Set "listener" to -1 after we close it so that the error-handler
...
doesn't try to re-close it.
- Set blocking I/O before the second (final) connect() call.
2004-09-16 17:09:46 +00:00
Wayne Davison
dcd08dc51c
Restored the code in the IPV6_V6ONLY section that checks the
...
return value from setsockopt() with one improvement: if the
user has used --ipv6 (-6) we don't discard the IPv6 socket.
This should help people using older Linux kernels that don't
implement IPv6 support quite right.
2004-06-20 19:51:19 +00:00
Wayne Davison
d62bcc17f3
Changed rprintf() calls that included strerror() to use rsyserr().
2004-05-15 19:31:10 +00:00
Wayne Davison
c5bf99a1c2
Correct a typo.
2004-05-06 21:29:36 +00:00
Wayne Davison
2c7d63c765
- Updated the comments for open_socket_in().
...
- Changed open_socket_in() to return an array of ints with a trailing -1
value to indicate the end of the list.
- Use the out_of_memory() routine to complain about no memory.
- Undid the recent IPV6_V6ONLY change, as I think it would prevent the
use of IPv6 sockets on some older systems.
- If we get an EADDRINUSE error and this is not the first socket in the
list, suggest that the user try --ipv4 or --ipv6.
- When forking, the child now closes all the open bound sockets, not just
one of them (I'm not talking about the fd from accept(), obviously).
2004-05-06 21:26:46 +00:00
Wayne Davison
d8d36af452
If we need to set IPV6_V6ONLY but setsockopt() fails, close the
...
socket and skip it.
2004-05-05 22:17:48 +00:00
Wayne Davison
df5cd107a5
Moved (and expanded) a verbose message from clientserver.c to socket.c
...
to solve an old FIXME comment.
2004-04-14 16:51:48 +00:00
Wayne Davison
cb984e620e
In sigchild_handler(), finish with waitpid() before reinitializing
...
the SIGCHLD handling.
2004-03-29 16:30:53 +00:00
Wayne Davison
16f72adc49
Changed HAVE_SOCKADDR_SIN_LEN to HAVE_SOCKADDR_IN_LEN.
2004-03-16 01:26:31 +00:00
Wayne Davison
ac7aa92290
Use new HAVE_SOCKADDR_SIN_LEN define (replaces HAVE_SOCKADDR_LEN).
2004-02-27 07:22:40 +00:00
Wayne Davison
893c4cc056
Use new stringjoin() function.
2004-01-20 04:56:20 +00:00
Wayne Davison
173f5bf8cf
Fixed a size check in the new code.
2004-01-03 09:44:20 +00:00
Wayne Davison
a3a841073e
Added support for "Basic" authentication to our proxy, based on a
...
patch by Bardur Arantsson.
2004-01-03 09:19:06 +00:00
Wayne Davison
b0fd253afc
Applied a slightly-tweaked version of Oliver Braun's patch that
...
implements listening on multiple addresses and a fix for IPv6-only
systems.
2004-01-02 18:05:51 +00:00
Wayne Davison
e028b9ff53
Call bind() with the right ai_addr/ai_addrlen info.
2004-01-02 17:47:44 +00:00
Wayne Davison
9c07d25345
Tidied up a few things in preparation for changes.
2004-01-02 17:20:21 +00:00
Wayne Davison
067669dac7
Made the UNUSED(parameter) macro calls read a little nicer.
2003-08-22 05:04:13 +00:00
Wayne Davison
ca20c7fd62
Instead of ignoring SIG_CHLD, reap zombies in the signal handler.
2003-08-04 18:27:27 +00:00
David Dykstra
9f639210ca
Prevent the "Connection reset by peer" messages often seen from Cygwin.
...
Result of a lot of discussion over the last year and a half. Based on
a patch from Randy O'Meara, cleaned up a bit by Max Bowsher.
2003-01-27 03:35:08 +00:00
Wayne Davison
39993af514
The function passed to start_accept_loop() now takes 2 fd ints (for
...
the daemon via remote-shell support).
2002-08-01 00:37:08 +00:00
Martin Pool
32f761755e
Try to fix ctype issues by always calling these functions as
...
if (!isdigit(* (unsigned char *) p)) {
so that the argument is always in the range of unsigned char when
coerced to an int.
(See digit 1.)
2002-04-11 02:25:53 +00:00
Martin Pool
a7dc44d27d
Doc.
...
Correction from Nelson Beebe: argument to functions such as isspace()
must be an int, not a char. This could cause sign-extension problems.
2002-04-09 06:18:13 +00:00
Martin Pool
6b2d24de2c
Make sure that freeaddrinfo is called on all code paths leading away
...
from a call to getaddrinfo. (Dave Dykstra)
<20011219085021.A23107@lucent.com >
2002-03-16 09:00:44 +00:00
Martin Pool
e23d790fa7
Doc: Note from Dave Dykstra that getaddrinfo calls must be paired with
...
freeaddrinfo().
2002-03-16 08:23:08 +00:00
Martin Pool
7bea78ced6
With -vv, client shows a message when opening a daemon connection via
...
an HTTP proxy. This parallels the recent addition of a log message
for opening ssh connections.
2002-02-23 01:00:33 +00:00
Martin Pool
79845f2834
Doc.
2002-02-18 23:36:10 +00:00
Martin Pool
bd37c66630
Fix error handling for failing to fork after accepting a connection --
...
close fd, sleep, then try again.
2002-02-18 22:58:49 +00:00
Martin Pool
c4a5c57dc3
If the daemon is unable to fork a child to accept a connection, print
...
an error message. (Colin Walters)
2002-02-18 22:38:03 +00:00
David Dykstra
145794936f
Patch from Jos Backus <josb@cncdsl.com> to use HAVE_SOCKADDR_LEN rather
...
than HAVE_SOCK_SIN_LEN around use of sin_len. Correct usage was already
in place in clientname.c.
2002-02-13 18:45:17 +00:00
Martin Pool
0cd2f40764
The name resolution stuff is getting complicated -- split it out into
...
its own file.
2002-01-25 02:13:04 +00:00
Martin Pool
0d95824995
Verbose messages for spoof check... doesn't work on old linux libc?
2002-01-24 09:42:52 +00:00
Martin Pool
bbc09ffba9
When doing a name->addr translation to check for spoofing, give the
...
resolver the address family of the original address as a hint, so that
we're more likely to find the correct A or AAAA record.,
2002-01-24 08:52:28 +00:00
Martin Pool
5fdcc397b1
Fix getpeername call.
2002-01-24 08:16:27 +00:00
Martin Pool
07d70ff560
Move both calls to getpeername into a common wrapper function that
...
handles IPV4_MAPPED addresses.
2002-01-24 08:05:22 +00:00
Martin Pool
00d943d513
Another size_t warning
2002-01-24 05:57:49 +00:00
Martin Pool
71c780da06
check_name: Print out name *before* clobbering it.
2002-01-24 05:57:22 +00:00
Martin Pool
2974e20550
If name lookup fails, then show the relevant IP address in the error message.
2002-01-24 05:41:46 +00:00
Martin Pool
255810c0d6
Doc.
...
Oops, connection program message was in the wrong place.
2002-01-24 04:24:12 +00:00
Martin Pool
5d2640376e
Show helper program with -v when opening connection.
...
Doc.
2002-01-24 04:21:42 +00:00