Martin Pool
b8771f9615
Try to be better about handling the results of getaddrinfo(): when
...
opening an inbound socket, we might get several address results,
e.g. for the machine's ipv4 and ipv6 name.
If binding a wildcard, then any one of them should do. If an address
was specified but it's insufficiently specific then that's not our
fault.
However, some of the advertized addresses may not work because e.g. we
don't have IPv6 support in the kernel. In that case go on and try all
addresses until one succeeds.
2001-11-26 07:10:06 +00:00
Martin Pool
d5d4b28220
Put the new address family option into an options struct. We have too
...
many globals already.
Better error messages for network-related failures.
2001-11-26 04:52:19 +00:00
Martin Pool
1f0fa9318a
Remove highly suspicious redefinition of sockaddr structure -- there
...
seems no point using anything but the platform's native definition,
and if we can't get that from the system headers we're hosed anyhow.
2001-11-26 00:41:11 +00:00
Martin Pool
7ef6aa6405
Improved error messages.
2001-11-24 04:22:20 +00:00
Martin Pool
06963d0fca
Merge KAME.net IPv6 patch: you can now (in theory) pass IPv6 hostnames
...
or literal IP addresses to rsync, and if your platform supports them
they will be used. Also there are -4 and -6 command-line options to
choose the default address type. Thankyou!
2001-11-23 07:35:49 +00:00
Martin Pool
eecd22ff7b
Merge in the LIBSMB_PROG idea from samba, so that you can do
...
RSYNC_CONNECT_PROG='./rsync --daemon' ./rsync -vvvvvv localhost::
to test as a daemon without actually having to listen on a port.
2001-08-31 07:06:13 +00:00
Martin Pool
7d91d5a619
Check that gethostbyname does actually return AF_INET addresses, since
...
that's all we can handle.
Also, try a new method of handling in_addr and hostent that will
hopefully work on Cray machines without 32-bit types.
2001-08-15 07:52:28 +00:00
Martin Pool
c1f62a573a
Use socklen_t for getpeername, since we hopefully now have it defined
...
on all platforms.
2001-08-15 06:47:40 +00:00
Martin Pool
f8014b864e
Typo. Shouldn't depend on assert().
2001-08-15 05:47:29 +00:00
Martin Pool
d58911fb37
Better error messages for DNS.
2001-08-15 05:08:07 +00:00
Andrew Tridgell
376acbfad5
don't need to lookup our own name in open_socket_in()
2001-08-08 08:55:24 +00:00
Martin Pool
546434f867
Two more instances of socklen_t.
2001-08-06 12:31:23 +00:00
Martin Pool
ac2a1a449d
Use socklen_t if defined, or otherwise int. This tries to fix
...
warnings on platforms (e.g. AIX) where this type is defined and not
int.
2001-08-06 12:27:04 +00:00
Martin Pool
4d66e00afa
If binding to a low-numbered port fails with EACCES, then the error
...
message should explain that you probably need to be root.
(Why leave off the final S? Kernighan must have been a *really* slow
typist.)
2001-06-21 06:19:00 +00:00
Andrew Tridgell
8950ac03f8
imported new snprintf.c from samba, got rid of slprintf
2001-05-07 06:59:37 +00:00
Martin Pool
660c6fbdaa
Include strerror message when there's a socket error.
2001-01-08 10:25:00 +00:00
Martin Pool
7c1b4daa6f
Document getsockopt POSIX confusion.
2000-11-09 09:27:34 +00:00
David Dykstra
15b84e142a
Make sure the log file is always opened before root privileges (if any)
...
are given up.
2000-10-25 19:57:42 +00:00
David Dykstra
45a8354004
When running as --daemon in the background and using a "log file" rsyncd.conf
...
directive, close the log file every time it is open when going to sleep on
the socket. This allows the log file to get cleaned out by another process.
2000-10-24 18:50:08 +00:00
Andrew Tridgell
e30f065766
make --address work for a client connecting to a server
2000-01-10 04:49:51 +00:00
Andrew Tridgell
1f5c6343e6
removed old non-blocking fd code (a hangover from a earlier version of
...
io.c). Thanks to Theo for pointing out this brokenness.
1999-11-15 01:32:20 +00:00
Andrew Tridgell
5c9730a46c
added --address option for virtual hosting
1999-10-31 03:21:02 +00:00
Andrew Tridgell
0503f06089
continue calling waitpid() while still reapingchildren (patch from
...
Matti Aarnio)
1999-06-27 04:12:12 +00:00
Andrew Tridgell
4c3b4b2557
added RSYNC_PROXY support from Stephen Rothwell. This allows access to
...
rsync servers via a web proxy (useful for getting through firewalls)
1999-04-13 03:53:30 +00:00
David Dykstra
d41c7d025c
Use MAXHOSTNAMELEN (256) for the array holding the host_name in socket.c
...
instead of 200. Move the defines of True and False to rsync.h. Eliminate
the defines of BOOL in loadparm.c and params.c because it is already
defined in rsync.h. Changes suggested by Roman Gollent roman.gollent@wdr.com
1999-02-09 18:35:29 +00:00
Andrew Tridgell
37f9805dab
changed strlcat() and strlcpy() to have the same semantics as the
...
OpenBSD functions of the same name.
changed slprintf() to take buffer length rather than buffer length -1
1998-11-14 23:31:58 +00:00
Andrew Tridgell
654175798b
patch from Alberto Accomazzi <aaccomazzi@cfa.harvard.edu> to add
...
different exit codes for different conditions.
1998-11-03 07:08:27 +00:00
Andrew Tridgell
11a5a3c704
and I thought I wasn't going to do any rsync coding for a while ...
...
Jason Andrade convinced me to add ftpd style logging of transfers,
enabled with a "transfer logging" option in rsyncd.conf
you can customise the format in log.c
1998-10-28 03:28:30 +00:00
Andrew Tridgell
3eb388185b
a couple of changes to where the nonblocking settings are called.
1998-08-27 05:05:14 +00:00
Andrew Tridgell
c46ded4621
I think I might havefinally fixed the rsync hanging bug. It was caused
...
by a read during an io_flush() triggered during a readfd(). A simple
logic bug in the io code :(
1998-07-20 05:36:25 +00:00
Andrew Tridgell
b11ed3b150
- close stdout and stderr and reopen then as /dev/null when running as
...
a daemon. This prevents library functions (such as getopt) stuffing up
our protocol stream when errors are detected.
- defer the error message from the options parsing until after the
socket is multiplexed. This allows clients sending new options which
the remote server doesn't understand to get a sensible error message.
1998-07-19 04:50:48 +00:00
Andrew Tridgell
31f440e68b
I've had reports of rsyncd leaving zombies under digital unix. This
...
patch tries to address the problem in two ways:
1) reinstall the SIGCHLD handler before each fork
2) reap any children not caught by the handler using waitpid with
WNOHANG.
I expect this will fix the problem.
1998-07-01 05:10:42 +00:00
Andrew Tridgell
f578043391
for consistency use memcpy/memset everywhere instead of bcopy/bzero
1998-06-18 09:51:44 +00:00
Andrew Tridgell
de5fb3744d
added DNS spoofing test to host access control
1998-05-20 00:20:12 +00:00
Andrew Tridgell
8d9dc9f99d
this is a large commit which adds io multiplexing, thus giving error
...
messages from the server when using the socket code.
I've doen a fair bit of testing and I don't seem to have broken
anything, but it is a very complex change. More testing needed!
1998-05-18 08:20:26 +00:00
Andrew Tridgell
a6801c3977
added a "socket options" option to rsyncd.conf. This option will
...
provide hours of fun for those people who like to tune their systems
to the utmost degree.
1998-05-15 13:25:19 +00:00
Andrew Tridgell
e22de16264
fixed SIGCLD -> SIGCHLD
...
fixed formatting of man page (thanks to Karsten)
1998-05-15 00:29:45 +00:00
Andrew Tridgell
ff8b29b8c6
use syslog instead of /var/adm/rsyncd.log
1998-05-10 08:24:38 +00:00
Andrew Tridgell
8ef4ffd698
change to allow names or numbers to be used for uid and gid.
1998-05-10 08:05:56 +00:00
Andrew Tridgell
f0fca04e4e
first vesrion of working socket based rsync. It still needs a lot of
...
work, but at least it works :-)
1998-05-09 13:58:54 +00:00
Andrew Tridgell
bc2e93eb8e
just a stub for now
1998-05-07 14:53:02 +00:00