Wayne Davison
b2e8a9b293
Got rid of an unused extern.
2005-03-14 17:06:08 +00:00
Wayne Davison
ed9d969c4c
Use the new am_starting_up value in who_am_i().
2005-02-25 17:08:57 +00:00
Wayne Davison
638e106568
- Moved delete_file() into flist.c.
...
- No need to separately test for (make_backups && !backup_dir)
because omit_dir_times is now set under those circumstances.
2005-02-21 10:50:32 +00:00
Wayne Davison
042f470ef9
Made delete_file() backup files it is removing if --backup was specified.
2005-02-19 23:39:47 +00:00
Wayne Davison
40cc28516d
Moved deletion_count here so that we honor --max-delete in
...
delete_file().
2005-02-19 23:24:41 +00:00
Wayne Davison
8324bd5c21
When logging PERMS_REPORT messages, send them with the FCLIENT code
...
if the daemon has "%i" in its log message (because it already got a
detailed log message from the generator).
2005-02-19 22:16:53 +00:00
Wayne Davison
c786a7aec5
- Changed the calling args to delete_file() to take an st_mode instead
...
of a DEL_DIR flag.
- Call log_delete() instead of outputting "deleting ..." messages..
- Log deletions if either verbose or log-format is specified.
2005-02-19 02:39:23 +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
4875d6b64d
Adding more calls to safe_fname().
2005-02-07 20:36:43 +00:00
Wayne Davison
794b0a037f
Changed who_am_i() to output "server" or "client" when am_sender
...
is negative. This will only occur during the startup phase
before we know if we're the sender or not (e.g. when parsing
client-side --filter/--exclude/--include options).
2005-02-01 09:45:09 +00:00
Wayne Davison
25ff04417e
Use "#if" (not "#ifdef") for configure-defined macros.
2005-01-28 18:50:49 +00:00
Wayne Davison
4366d2c428
In delete_files(), handle new DEL_NO_RECURSE flag (and use
...
renamed DEL_FORCE_RECURSE flag.
2005-01-25 12:07:13 +00:00
Wayne Davison
82471e68a8
Honor the new omit_dir_times var.
2005-01-24 00:51:34 +00:00
Wayne Davison
11781089d1
In delete_file(): got rid of DEL_NO_RECURSE code and added
...
DEL_RECURSE code. Improved the verbose output of a recursively
deleted directory when --dry-run is specified.
2005-01-20 23:51:57 +00:00
Wayne Davison
f227ffe4b9
Moved the dry_run check in set_perms() so that it only triggers if
...
we don't have a stat-buffer (and returns 1, not 0).
2005-01-20 23:01:34 +00:00
Wayne Davison
dd096ae080
- Updated delete_file() to take a flag arg that makes it more
...
flexible. Optimized away a stat() call since the caller knows
if the item to delete is a directory or not.
- Tweaked delete_file()'s "deleting ..." messages to include a
trailing slash when we're deleting a directory.
- No need for conditional code around do_lstat() anymore.
2005-01-19 20:11:03 +00:00
Wayne Davison
997d9ea67f
Added a "overwriting_basis" arg to finish_transfer().
2005-01-10 10:03:12 +00:00
Wayne Davison
70a2c84cd2
If lchown() is not available, we only skip the call to chown() for a
...
symlink if it will try to follow the symlink (as a normal OS should).
2005-01-03 22:47:55 +00:00
Wayne Davison
a41a1e8718
If there is no lchown(), don't try to set the user & group of a symlink.
2005-01-03 21:05:39 +00:00
Wayne Davison
e484f0cc04
W mustn't backup an inplace file in finish_transfer().
2004-09-07 20:37:36 +00:00
Wayne Davison
ebeacb36fb
Set each file's permissions and modtime before it gets renamed.
2004-08-09 20:57:10 +00:00
Wayne Davison
81b07870c8
One call to link_stat() (in set_perms()) needed to honor the setting
...
of keep_dirlinks if the current item is a directory.
2004-07-31 16:15:41 +00:00
Wayne Davison
ecc81fce17
Use the new safe_fname() function.
2004-07-26 16:36:59 +00:00
Wayne Davison
077e59b769
The inplace handling in finish_transfer() now passes PERMS_SKIP_MTIME
...
to set_perms() if ok_to_set_time wasn't specified.
2004-07-22 15:30:04 +00:00
Wayne Davison
a3221d2ac1
My version of Mark Curtis's --inplace option.
2004-07-16 20:06:24 +00:00
Wayne Davison
da38e779ea
Moved the verbose message about renaming the finished file down into
...
finish_transfer() so that it only gets output when we're actually going
to rename the file.
2004-07-02 18:13:53 +00:00
Wayne Davison
373ef16010
Call link_stat() with its new arg (for --keep-dirlinks support).
2004-06-11 07:40:45 +00:00
Wayne Davison
ee1df1ccae
If --backup was specified without a --backup-dir, don't preserve the
...
directory timestamps.
2004-05-21 08:43:03 +00:00
Wayne Davison
d62bcc17f3
Changed rprintf() calls that included strerror() to use rsyserr().
2004-05-15 19:31:10 +00:00
Wayne Davison
384431886a
Changed PERMS_SKIP_TIME to PERMS_SKIP_MTIME.
2004-05-13 18:51:22 +00:00
Wayne Davison
82b302d928
Got rid of some useless externs.
2004-05-13 18:41:17 +00:00
Wayne Davison
4ecc9e6b64
The finish_transfer() call takes an arg that specifies if we should set the
...
modtime or not on the finished file. It calls set_perms(), which now takes a
flag arg that allows us to specify if we want to skip the modtime modification.
2004-05-13 07:08:25 +00:00
Wayne Davison
a7ed6ca618
A few formatting tweaks in delete_file().
2004-03-23 16:16:15 +00:00
Wayne Davison
3d06165389
Check robust_rename()'s return value using < 0.
2004-03-13 20:18:03 +00:00
Wayne Davison
a174e1ed0f
Tweaked some comments and some whitespace.
2004-02-25 21:20:59 +00:00
Wayne Davison
62c9e6b3a5
Moved the EXDEV handling into robust_rename().
2004-02-17 23:13:10 +00:00
Wayne Davison
ce37eb2d83
If verbose > 2, mention it if we're setting the uid or the gid.
2004-02-03 20:00:35 +00:00
Wayne Davison
c3e5e5851b
New function: who_am_i() returns "sender", "receiver", or "generator".
2004-01-27 23:13:13 +00:00
Wayne Davison
a7725e6df9
Use new pathjoin() function.
2004-01-20 04:53:59 +00:00
Wayne Davison
baa4212ae1
If the do_lchown() fails and we weren't trying to change the user,
...
the error now says that chgrp failed, not chown.
2004-01-15 07:08:00 +00:00
J.W. Schultz
a60e2dca6b
Create GID_NONE for use gid test readability.
2004-01-03 13:17:32 +00:00
Wayne Davison
7352b8736b
Moved the is_in_group() function to uidlist.c.
2004-01-02 16:52:29 +00:00
Wayne Davison
d5a0b48379
Do a small msleep() in the sig_int() handler before shutting down.
...
This kluge allows things like SIGINT to find our children before
we go throwing around SIGUSR1's at them.
2003-12-19 06:52:02 +00:00
Wayne Davison
58cadc8608
Merged in the security fixes from 2.5.7.
2003-12-06 21:07:27 +00:00
Wayne Davison
7a2fd68b96
Tweaked the just-added error message to use my new full_fname()
...
function. Also removed some trailing whitespace from lines.
2003-09-16 05:33:09 +00:00
J.W. Schultz
6a7cc46cb2
Detect and report when open or opendir succeed but read and
...
readdir fail caused by network filesystems issues and
truncated files.
Thanks to David Norwood and Michael Brown
2003-09-16 02:49:59 +00:00
Wayne Davison
ea42541fe0
Improved file-related error messages by using the new
...
full_fname() function.
2003-09-11 04:53:05 +00:00
Paul Green
b0d791bb35
Patch from Roderick Schertler (roderick at argon.org) to ignore
...
non-POSIX directory mode bits that are used by AIX.
2003-02-18 18:07:36 +00:00
David Dykstra
f389ac80a9
Removed debugging statement that was added to sig_int() by the rsync+ patch
...
integration. It was causing the format of the daemon log to be messed up
because of the leading \n.
2001-12-20 15:33:13 +00:00
Martin Pool
6902ed178b
Merge across rsync+ patch; add a little documentation to the manpage. More documentation would be better.
2001-08-14 02:04:47 +00:00