Wayne Davison
1eec003a80
The FCLIENT log code aviods putting the message into the daemon's
...
log file and instead sends a FINFO message to the client. This is
used when the daemon wants to log a better message locally than it
is sending to the client. Improved log_delete() to make use of this
idiom if it needs to log a separate delete message for the daemon
and the client.
2005-02-19 22:16:41 +00:00
Wayne Davison
088aff1a48
- Don't log a delete message to the daemon log in dry-run mode.
...
- The daemon's wrote/read log message now uses the terms
sent/received.
2005-02-19 17:23:08 +00:00
Wayne Davison
d6707171e6
Decide whether to log a delete message via the default format by
...
checking the new log_format_has_o_or_i variable, not itemize_changes.
2005-02-19 03:54:13 +00:00
Wayne Davison
19bc826d8b
- Tweaked the letters output by "%i", including adding support for
...
logging a deleted item and an identical item.
- Added log_delete(), a routine that either logs the fact that a
deletion happened, or sends a MSG_DELETED message to the client
side (or both if we're a daemon server receiver).
2005-02-19 02:39:26 +00:00
Wayne Davison
e66d70e34c
The '%n' escape needs to append a trailing slash onto a directory name.
2005-02-18 20:17:17 +00:00
Wayne Davison
2267efeac5
Made log_open() non-static and moved log_close() next to it.
2005-02-18 17:33:43 +00:00
Wayne Davison
d4e0196346
Use '.' for unchanged attributes in the %i output.
2005-02-17 09:16:23 +00:00
Wayne Davison
ef74f5d626
- Improved log_formatted() to handle long filenames better.
...
- Added %i, for the list of itemized changes, %n for the normal
filename (might be shorter than %f), and %L for a " -> symlink"
string IIF the item is a symlink (else "").
- The log_{send,recv}() functions now take an "iflags" arg.
2005-02-16 08:10:28 +00:00
Wayne Davison
1e7098b5e3
Fixed a typo.
2005-02-15 03:38:04 +00:00
Wayne Davison
4875d6b64d
Adding more calls to safe_fname().
2005-02-07 20:36:43 +00:00
Wayne Davison
c32edbe02e
Make sure the %f expansion handles the new dir.root properly.
2005-02-01 09:23:59 +00:00
Wayne Davison
2b1366635d
Refer to the old basedir variable as dir.root.
2005-02-01 09:21:28 +00:00
Wayne Davison
4ccfd96cfe
Tweaked one or more warning messages.
2005-01-31 19:13:19 +00:00
Wayne Davison
63ecee4d1a
Made log_open() static and made it die with an error if the
...
log-file can't be opened.
2005-01-28 17:42:21 +00:00
Wayne Davison
584ba4ebae
Fixed a typo Paul pointed out.
2004-09-05 21:30:00 +00:00
Wayne Davison
58b1999e08
Call clean_flist() with its new "collapse_dot_dot" arg.
2004-08-12 18:20:07 +00:00
Wayne Davison
0bb4d17634
Improved rwrite() in two ways:
...
- We no longer assume that the buffer is null terminated (daemon
mode would ignore the len when logging a message).
- Errors in daemon mode are now sent to both the log and the user.
2004-06-07 22:51:14 +00:00
Wayne Davison
8fcdc444df
- Improved rsyserr() to prefix RSYNC_NAME (as the TODO requested),
...
to construct the string in a better manner, and to have a buffer
big enough to hold a full MAXPATHLEN filename plus some error
text.
- Fixed some comments referring to vsprintf() returning -1 -- our
configuration process now ensures that we replace such a function
with our own lib version.
2004-05-15 19:31:16 +00:00
Wayne Davison
4ce48a5bfd
Restore old behavior of logging most daemon errors instead of sending
...
them to the user. This should eventually be improved to duplicate
some of these messages to the user to keep them informed about what
went wrong.
2004-04-29 19:34:31 +00:00
Wayne Davison
81d2b0ef9d
Use new pathjoin() function.
2004-01-20 05:15:14 +00:00
Wayne Davison
a644fc3cc4
- Moved err_list* stuff to io.c and renamed them to msg_list*.
...
- Call the new send_msg() function to send a remote log message.
2004-01-15 07:42:19 +00:00
Wayne Davison
548abf96ce
Relocated some externs.
2004-01-13 04:50:45 +00:00
Wayne Davison
1bca1de6cc
Handle new RERR_VANISHED error.
2003-12-15 08:06:52 +00:00
Wayne Davison
4a7319be12
Neatened up some whitespace issues and made multi-line comments more
...
consistent.
2003-12-15 01:45:01 +00:00
Wayne Davison
58cadc8608
Merged in the security fixes from 2.5.7.
2003-12-06 21:07:27 +00:00
J.W. Schultz
42d4edc067
removed log_transfer() It was no more than a conditional
...
rprintf() with an unused param.
2003-03-25 02:28:54 +00:00
David Dykstra
b45b059a3d
Back out one of the changes in log.c revision 1.62, and always send errors
...
to the client after multiplexing is enabled.
2003-02-11 19:13:51 +00:00
Jos Backus
1e34e4b7cd
Add "void" to some function definitions so that all declarations in proto.h
...
have full parameter lists. This helps unbreaking compilation on SCO UNIXWare.
Submitted by: Stephen Friedl
2002-12-24 07:42:04 +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
a83600cc82
Change error message "partial transfer" to "some files could not be
...
transferred".
I don't generally like changing that sort of thing, but I think this
one was a persistent source of confusion.
2002-04-08 09:10:50 +00:00
Martin Pool
b35d0d8e9a
Split code out into separate files and remove some global variables to
...
reduce symbol dependencies between files and therefore make it easier
to write unit tests. The diff is large, but the actual code changes
are pretty small.
2002-04-08 04:10:20 +00:00
Martin Pool
900748fca1
rwrite: Doc.
2002-02-18 19:51:12 +00:00
Martin Pool
4f092bee9f
Make sure we call setgroups() after setuid(). (Ethan Benson)
2002-02-09 02:18:42 +00:00
David Dykstra
088aac8597
Make batch mode actually work and add man page documentation. From Jos Backus.
2002-02-06 21:20:48 +00:00
Martin Pool
aa126974ba
log_formatted: Fill the log buffer with nuls to make sure we cannot
...
accidentally leave the string unterminated.
2002-01-24 02:41:38 +00:00
Martin Pool
59ee743c5f
More size_t fixes.
2002-01-23 08:04:54 +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
b2f0246498
For log messages containing ridiculously long strings that might
...
overflow a buffer rsync no longer aborts, but rather prints an
ellipsis at the end of the string. (Patch from Ed Santiago.)
2001-09-04 03:12:55 +00:00
Andrew Tridgell
8950ac03f8
imported new snprintf.c from samba, got rid of slprintf
2001-05-07 06:59:37 +00:00
Andrew Tridgell
ba35824322
"rsync error" is better than "transfer error", especially for -h
2001-03-23 03:46:56 +00:00
Andrew Tridgell
19b27a485e
improved error handling again. Now we report messages for the remote
...
shell failing and propogate errors in a better fashion
2001-03-23 01:26:04 +00:00
Andrew Tridgell
ff81e809f4
new error handling system
...
we now give a non-0 exit code if *any* of the files we have been asked
to transfer fail to transfer
2001-03-22 07:36:51 +00:00
Andrew Tridgell
90ba34e27c
I came up with a new way of avoiding the error handling lockup bug in
...
rsync. It isn't pretty, but it does work and should completely avoid
that class of lockup.
2001-03-21 13:12:44 +00:00
Martin Pool
0c5a792ac7
Oops, fix edit mistake.
2001-03-19 08:19:11 +00:00
Martin Pool
18c71e96f8
Doc.
2001-02-23 01:45:46 +00:00
Martin Pool
3e3dcd624f
Better message grammar.
2001-02-21 07:18:50 +00:00
Martin Pool
af642a61b3
If an error occurs, print an explanatory string rather
...
than just an RERR code.
2000-11-10 03:28:15 +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
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