Commit Graph

133 Commits

Author SHA1 Message Date
Wayne Davison
bda41fa509 + The prototype for isc_net_pton() should have been inet_pton().
+ Define IN_LOOPBACKNET if it is not already defined.
2003-01-10 20:09:58 +00:00
David Dykstra
30e8c8e1e4 When using daemon mode over a remote shell program and not running as root,
default the config file to just "rsyncd.conf" in the current directory
instead of /etc/rsyncd.conf.  Also, fix problems with logging messages when
running daemon mode over a remote shell program: it was pretty much doing
the opposite of what it should have, sending early error messages to the
log and later messages to the client.  Switched it around so the very early
error messages go to the client and the later ones go to the log.
2002-08-30 23:27:26 +00:00
Martin Pool
6ded1170ac Doxygen 2002-04-11 02:18:51 +00:00
Martin Pool
eca2adb4b3 OK, we can now get phase messages if we fail in send_file_entry 2002-04-09 04:50:25 +00:00
Martin Pool
f4a0483ab8 Add manual prototype for maintainer-mode function 2002-04-08 08:24:59 +00:00
Martin Pool
999dfffc9b Add link to Apple bug. 2002-03-25 07:29:43 +00:00
Martin Pool
fb859e5674 Apparently the OS X port of gcc gags on __attribute__. 2002-03-25 06:49:08 +00:00
Martin Pool
1bfbf40bd5 Fix --whole-file problem that caused it to be the default even for
remote connections.  (Frank Schulz)

<http://lists.samba.org/pipermail/rsync/2002-March/006526.html>

Also, add documentation for whole_file and add assertions that the
value is valid.
2002-03-19 03:21:53 +00:00
Martin Pool
0f0ea7f779 Add UNUSED macro that expands to a parameter attribute annotation on
gcc, to quieten its worries about parameters that must always be
unused.
2002-02-23 00:17:50 +00:00
Martin Pool
1eca49c6ed Doc:
#defiine lchown chown

could be bad on systems which have no lchown and where chown
follows symbollic links.  On such systems it might be better not to
try to chown symlinks at all.
2002-02-18 21:46:49 +00:00
Martin Pool
1e19f7ba5f At least change INO64_T and DEV64_T back to just 'int64', not
'unsigned int64'.  This should fix some compile problems on machines
where int64 is not a simple integer type, but I'm not convinced it is
the ideal fix.
2002-02-13 02:57:55 +00:00
Martin Pool
81c652d5d2 Merge modified --with-rsh patch: we now determine the default
remote-execution command as follows:

 1) if --with-rsh is specified, use that.

 2) otherwise if remsh is in the path, use that.

 3) otherwise use rsh

If remsh is present, we always modify the order of parameters to suit
it.  This is a bit strange.
2002-02-06 04:37:09 +00:00
Martin Pool
0feec72eee DEV64_t and INO64_T should probably be unsigned 2002-01-25 23:00:21 +00:00
Martin Pool
58c2960960 Must get declarations from addrinfo.h before prototypes. 2002-01-24 07:22:38 +00:00
Martin Pool
10f83cf43d Doc. 2002-01-23 08:08:48 +00:00
Martin Pool
1c09c743b1 indent -kr -i8 2002-01-23 07:52:52 +00:00
Martin Pool
9dd891bb28 Signedness security patch from Sebastian Krahmer <krahmer@suse.de> --
in some cases we were not sufficiently careful about reading integers
from the network.

Also, make sure log messages are always nul-terminated.
2002-01-23 04:57:18 +00:00
Martin Pool
b9df3bf20c DOc. 2002-01-11 08:37:42 +00:00
Martin Pool
6abd193fe3 Always use 64-bit ino_t and dev_t internally, so that we can detect
hardlinks if coming from a larger platform.  Add heaps of comments
explaining why this is so.
2002-01-11 08:25:32 +00:00
Martin Pool
e5a2b8544d Look for mallinfo() and use it to display
heap usage information in --stats
2002-01-11 07:16:11 +00:00
Martin Pool
736a6a291c In protocol version 26, always
send 64-bit ino_t and dev_t.  We also need to try to use 64-bit
ino_t internally *even if* this platform does not have 64-bit
inums itself, because we need to find duplicate inums when
coming from a larger platform with --hardlinks.
2002-01-11 07:15:16 +00:00
Martin Pool
a8e2a43a09 Get rid of global_opts struct as suggested by Dave -- too many
problems with initialization.
2001-12-18 06:47:40 +00:00
Martin Pool
e20a4f84d6 Some platforms may have getaddrinfo() but not sockaddr_storage. 2001-12-05 13:19:16 +00:00
Martin Pool
a538066d5a Add --no-detach option for W32, daemontools, etc. 2001-12-05 13:03:16 +00:00
Martin Pool
740819ef7b Split code to generate "rwx-----" strings into lib/permstring.c so it
can be reused in tls.
2001-11-27 06:43:17 +00:00
Martin Pool
8f694072a5 Add Paul Vixie's implementation of inet_ntop and inet_pton for
platforms that don't have them.
2001-11-27 05:22:23 +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
a358449ab1 Set rsync version in configure.in
Show IPv6 availability in --version.
2001-11-24 04:57:41 +00:00
Martin Pool
1d54358e52 Fix selective definition of *snprintf. (Welcome to mbp's breakage world.) 2001-09-06 06:27:02 +00:00
Martin Pool
0de40240bb If we're using built-in *printf functions, then provide prototypes. 2001-08-31 09:23:06 +00:00
Martin Pool
d79c77caca Cope on machines without INADDR_LOOPBACK. 2001-08-31 08:22:00 +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
063393d62d Only use the "@RSYNC EXIT" tag if we're talking to a client about
version 25.  This prevents it appearing and messing up the module list
when an old client connects to a 2.4.7 server.
2001-08-23 06:14:54 +00:00
Martin Pool
e2ba16ccea Fix check for ino_t to work with both autoconf2.50 and autoconf2.13. 2001-08-06 08:49:19 +00:00
Martin Pool
3fa64fd008 Don't unconditionally define _LARGEFILE_SOURCE, but instead include
some autoconf-2.13 macros that make the appropriate settings.  Thanks
to Albert Chin <china@thewrittenword.com> and Paul Eggert
<eggert@twinsun.com>.
2001-03-17 01:06:34 +00:00
Martin Pool
b557c4c7eb Define _LARGE_FILES to turn on LFS support on AIX (and some others?).
See http://www.rs6000.ibm.com/doc_link/en_US/a_doc_lib/aixprggd/genprogc/prg_lrg_files.htm

Thanks to Todd Willeat <TWilleat@MHP.SMHS.com>
2001-03-16 05:23:33 +00:00
Martin Pool
e420b9d854 Change from getopt to popt.
Add comment.
2001-02-23 01:02:55 +00:00
Martin Pool
a039749b4c Print strerror when a system error occurs; add a new function rsyserr
to do this.  This is not used in every case yet -- I've just changed a
few cases that were causing trouble.  Please convert others as you see them.
2000-10-26 07:24:18 +00:00
Martin Pool
d567322fbc include/exclude cluestick: with -vv, print out whether files are
included or excluded and why.
2000-10-09 03:46:38 +00:00
Andrew Tridgell
82980a2384 fixed timing problem with cleanup and io_flush() by using non-blocking
waitpid()
2000-08-16 08:34:18 +00:00
Andrew Tridgell
3d38277706 optimisations from Rich Salz <rsalz@caveosystems.com> 2000-07-29 04:52:05 +00:00
Andrew Tridgell
f0359dd00d went back to non-blokcing IO
it looks like ssh is willing to accept a non-blocking fd when used as
a transport, this seems to avoid the Solaris socketpair bug
2000-03-30 14:15:00 +00:00
Andrew Tridgell
8ada751890 damn.
with the new error handling code it is possible for rsync to get stuck
on the final transaction, leaving it hung.

looks like 2.4.1 will be pretty soon
2000-01-29 23:49:36 +00:00
Andrew Tridgell
b2999e457f don't need PIPE_BUF any more 2000-01-29 02:56:36 +00:00
Andrew Tridgell
0f3203c312 fixed some logcode warnings 2000-01-29 02:49:03 +00:00
Andrew Tridgell
ff41a59f58 - switched on multiplexing for all connections, not just daemon
connections (this fixes the stderr/stdout problem). Upped
  protocol version for backward compat
- use multiplexing on error fd
- upped minimal protocol version
- got rid of some ugly code in the write buffering
2000-01-28 15:29:59 +00:00
Andrew Tridgell
08f15335b5 switch to using socketpair instead of pipe if possible. This fixes the
ssh clag problems as long as you also fix the same problem in sshd

removed all the old read buffering code from io.c as this was only
there to try to reduce the chance of clagging up sshd.
2000-01-28 12:37:58 +00:00
Andrew Tridgell
cbce490e13 reinstated the MAX_READ_BUFFER code. Its a nasty tradeoff - using lots
of memory vs. ssh bugs. uggh.
2000-01-24 12:23:39 +00:00
Andrew Tridgell
554e0a8dd0 added some really ugly code to allow errors to propogate to
clients when writing to a rsync server

it works like this:

- we have an extra pipe from the receiver to the generator
- the server always runs with multiplexing on
- errors from the generator go down the multiplexed connection
- errors from the receiver go over the pipe, and from there to
  the multiplexed conn

it required some incredibly ugly code. damn.
2000-01-23 07:36:56 +00:00
Andrew Tridgell
07b7c86c06 don't write more than PIPE_BUF bytes in any one write() in io.c
this makes sure that the write never blocks.
1999-11-23 08:43:16 +00:00