Commit Graph

259 Commits

Author SHA1 Message Date
Wayne Davison
3a8fad7805 Moving big_num() into lib/compat.c so tls.c can use it. 2008-07-17 16:59:59 -07:00
Wayne Davison
6d56efa6ea Changed human_num() to big_num() with an extra arg so that it can
be used in place of all %.0f output idioms.
2008-07-17 07:37:31 -07:00
Wayne Davison
951e826b75 Added the --info=FLAGS an --debug=FLAGS options, which allows
fine-grained output control (in addition to the coarse -v).
2008-07-13 20:51:08 -07:00
Wayne Davison
e9489cd6cb Fixed several issues with preserving xattrs when using --backup. 2008-05-17 09:35:46 -07:00
Wayne Davison
f1ca7c4429 Preserve the right errno value when trying adjunct functions during
robust backup, copy, and renaming activities.
2008-05-17 08:25:22 -07:00
Wayne Davison
6db1db5488 Fix a file-globbing bug in the daemon when chroot is on. 2008-04-11 22:32:38 -07:00
Wayne Davison
1fe2a3533f Fixed a potential overflow issue with realloc() that Sebastian Krahmer
pointed out.
2008-04-08 08:01:43 -07:00
Wayne Davison
29a89172f7 Improved the chdir() code:
- Renamed push_dir() to change_dir() and revised it a little so that it
  can chdir() to a relative path without an intervening chdir() back to
  the staring path.
- Renamed push_pathname() to change_pathname() and revised it to take
  different args and to only call path_is_daemon_excluded() on a new
  path (not a revisit of a file's already-checked path).
- Fixed change_pathname() to set the right pathname value when a chdir()
  call fails.
- Set orig_dir once outside of the change_pathname() function.
- Got rid of pop_dir().
2008-03-30 15:44:46 -07:00
Wayne Davison
1df02d13d3 Don't send daemon-config filter-action messages back to the user. 2008-03-24 10:14:59 -07:00
Wayne Davison
b5daf5300f Made the filename arg-parsing code skip args that have excluded path
components, returning the same errors that would occur if the path
elements didn't actually exist.  The glob_match() code was also
changed to no longer truncate an arg with an excluded path element
(it just omits excluded items from glob matching).
2008-03-22 15:33:18 -07:00
Wayne Davison
bc267e0f57 Improved ENSURE_MEMSPACE() macro and use it in more places in glob code. 2008-03-22 08:13:04 -07:00
Wayne Davison
91f625cee0 Make glob_expand() return an indicator if the glob had no matches. 2008-03-21 15:00:28 -07:00
Wayne Davison
987a546756 A couple improvements to the new arg-globbing code:
- Put all the state variables into a single struct.
- Reuse the buffer memory for each glob_expand() call until a final
  call with a NULL pointer tells us to free it.
2008-03-21 07:22:34 -07:00
Wayne Davison
4d30f17671 Changed the arg-globbing routine to use a custom arg-globbing algorithm
that does not include any daemon-excluded items in the matches.  It is
also not subverted by the presence of one or more dot-dir elements in
an arg.
2008-03-20 23:30:09 -07:00
Wayne Davison
d48810ba5b Some improvements to the file-name cleaning code:
- Removed the CFN_KEEP_LEADING_DOT_DIR flag for clean_fname().
- Explicitly add an implied dot-dir to the transfer rather than keeping
  a leading a "./" prefix as a part of a relative pathname.
- Added the CFN_KEEP_DOT_DIRS flag for clean_fname().
- Added the SP_KEEP_DOT_DIRS flag for sanitize_path().
- Call clean_fname() a couple more times.
2008-03-20 22:39:29 -07:00
Wayne Davison
819bfe4599 Changed the name of the server_filter_list to be
daemon_filter_list, for improved clarity.
2008-03-20 10:42:43 -07:00
Wayne Davison
d2f6e19262 Fixed a bug in the truncating of daemon-excluded paths. 2008-03-20 10:35:53 -07:00
Wayne Davison
e0fd68f5ce Improved arg-path checking so that wildcards can't be used to
avoid a daemon-exclude.
2008-03-18 10:57:54 -07:00
Wayne Davison
d3d07a5e86 Include 2008 in the copyright years. 2008-03-01 12:01:41 -08:00
Wayne Davison
beef86d0dd A few minor changes, including better push_dir()/pop_dir() verbosity. 2008-02-15 22:19:43 -08:00
Wayne Davison
a5bb0902b4 One more fix in set_modtime() when we get ENOSYS on a symlink. 2008-02-10 15:39:21 -08:00
Wayne Davison
7210dbfd2a Some minor tweaking to name_to_uid() and name_to_gid(). 2007-12-29 22:52:04 -08:00
Wayne Davison
77d4c400c2 Only ignore ENOSYS error from lutimes(). 2007-12-16 17:18:01 -08:00
Wayne Davison
af5ed0f257 Make push_dir() output where we are when verbosity is high. 2007-12-15 07:39:33 -08:00
Wayne Davison
3f0211b63a New logging categories added to allow differentiation between
transfer errors, normal errors, and warnings.  New messages are
translated into old FERROR/FINFO categories for older protocols.
2007-11-22 10:05:36 -08:00
Wayne Davison
29bca53f9b Got rid of the unused symlink parameter to sanitize_path(). 2007-11-20 17:37:53 -08:00
Wayne Davison
4f9b139ab9 The HAVE_UTIMBUF define changed to HAVE_STRUCT_UTIMBUF. 2007-11-02 20:53:04 +00:00
Wayne Davison
6bb82fe0a8 Changed clean_fname() to take a flag int instead of a BOOL. Added
a few extra cleaning options (all off by default).
2007-10-31 04:43:25 +00:00
Wayne Davison
2cce75453c My version of Matt's cleanup patch from bug 5051. This makes
--copy-dest use a temp file when not in in-place mode, and has
various improvments for the code.  I have also "#if 0"ed the code
in the receiver that makes missing directories to see if we can
figure out if it is needed (and if so, what for).
2007-10-29 20:43:34 +00:00
Wayne Davison
f5b532b144 Added an option to copy_file() that tells it to try to make a
backup directory if the open of the dest file fails.
2007-09-23 21:03:46 +00:00
Wayne Davison
1b42f628f4 Moved inline functions from rsync.h into ifuncs.h. 2007-09-22 16:52:58 +00:00
Wayne Davison
0b515981fc Changed print_child_argv() to take its prefix message as an arg. 2007-09-16 21:41:42 +00:00
Wayne Davison
044dc29307 - Made glob_expand_one() public.
- Tweaking the calling syntax for glob_expand().
2007-09-09 07:53:22 +00:00
Wayne Davison
a2dc4d687b Tweaked _new_array() to handle new use_calloc parameter. 2007-09-03 04:19:02 +00:00
Wayne Davison
8e41b68e8f Tweaking the license text a bit more. 2007-07-10 13:55:49 +00:00
Wayne Davison
4fd842f98d Switching to GPL 3. 2007-07-07 05:33:14 +00:00
Wayne Davison
7c73536c25 Use module_dir instead of lp_path(). 2007-07-02 22:06:48 +00:00
Wayne Davison
1c3344a105 The ACL support has arrived! This version has a brand new protocol
that makes it incompatible with all prior versions.  A patch will be
provided to allow talking with older (patched) rsync versions.
2007-03-11 00:13:34 +00:00
Wayne Davison
ba2133d6ad Further modifications to the copyright comment section. 2007-02-04 14:54:58 +00:00
Wayne Davison
db0f7613e1 Got rid of an incorrect comment. 2006-11-28 19:34:01 +00:00
Wayne Davison
264042760b Use an explicit cast when a value gets stored in a smaller var. 2006-11-21 08:35:58 +00:00
Wayne Davison
4a19c3b254 Added "const" to appropriate char pointers. 2006-11-19 00:23:21 +00:00
Wayne Davison
2c70847654 Turned the char * args to push_dir() and pop_dir() into const char *. 2006-11-13 00:27:04 +00:00
Wayne Davison
149a78e33f Ignore a time-setting error on a symlink (which is only attempted
on a system with lutimes() anyway).
2006-11-12 21:18:26 +00:00
Wayne Davison
2dc7b8bd0e Got rid of type-casting into isFOO() and toFOO() functions by
using static inline functions that take a signed char pointer.
2006-11-09 02:39:29 +00:00
Wayne Davison
434c40986d Use the MAX_RENAMES_DIGITS define in the relevant snprintf(). 2006-10-14 20:31:33 +00:00
Wayne Davison
83078af5b0 Changed sprintf() calls to snprintf(). 2006-10-13 23:46:32 +00:00
Wayne Davison
33394b769d Mark out_of_memory() and overflow_exit() with NORETURN. 2006-10-13 07:38:11 +00:00
Wayne Davison
ff530f04a0 Function fcntl() only takes 2 args when using F_GETFL. 2006-10-13 06:26:02 +00:00
Wayne Davison
1a7f3d99c5 Removed the changes in symlink handling in non-chroot daemon mode as
they were not yet safe (I'll consider similar changes for the next
release).
2006-10-12 03:01:18 +00:00