Commit Graph

323 Commits

Author SHA1 Message Date
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
Wayne Davison
ba081be327 Made the push_dir() function take an option to skip the actual chdir()
call.  Used when the dest-dir doesn't exist and --dry-run was specified.
2006-10-08 20:56:52 +00:00
Wayne Davison
6ce9432d75 A bug-fix for die_on_unsafe_path() when the path doesn't exist. 2006-10-07 14:19:00 +00:00
Wayne Davison
2cd421d809 Output the who_am_i() info in out-of-memory() and overflow_exit(). 2006-09-24 03:12:24 +00:00
Wayne Davison
c98ad3df96 Check return value of asprintf() in full_fname(), as pointed
out by Ilja van Sprundel.
2006-07-29 21:04:35 +00:00
Wayne Davison
4cff5fa462 Make use of module_dirlen in full_fname(). 2006-06-30 14:24:25 +00:00
Wayne Davison
a3f6dbdf5c The print_child_argv() function should be outputting FCLIENT
messages these days, not FINFO.
2006-05-29 22:33:06 +00:00
Wayne Davison
8936367695 - Added a call to die_on_unsafe_path() to handle_partial_dir().
- Fixed some strange slash handling in partial_dir_fname().
2006-05-05 15:54:20 +00:00
Wayne Davison
f47807900b Added a new function named die_on_unsafe_path(). This is used
by a non-chroot daemon to ensure that a user-supplied path does
not contain an unsafe symlink element.
2006-05-05 05:55:40 +00:00
Wayne Davison
a8167c6611 - Added curr_dir_depth, a variable that keeps track of the depth past
the module root when a sanitizing daemon is running.
- Use the new calling syntax for sanitize_path().
- Updated count_dir_elements() to not count a . component.
- Improved sanitize_path() so that it can take a symlink target string
  and combine it with the symlink's name when the target is relative.
  When working with a symlink, the routine also returns NULL if any ..
  elements try to escape past the module root.
- The new routine safe_stat(), is used when sanitizing paths (i.e. when
  the daemon does not have chroot enabled).  This manually follows a
  chain of symlinks, ensuring they don't try to escape the module.
2006-05-03 00:48:23 +00:00
Wayne Davison
e7c67065c0 Updated the FSF's address to an even newer one. 2006-04-25 23:51:12 +00:00
Wayne Davison
0f78b81511 - Updated the address for the FSF in the opening comment.
- Standardized the format of the opening comment, including adding a
  brief description of what's in the file for those that lacked it.
- Added some missing copyright lines.
- Some minor whitespace tweaks (in a few of the files).
2006-04-25 20:23:34 +00:00
Wayne Davison
85c417579f Made create_directory_path() return -1 if it couldn't create some
portion of the filename's path.
2006-02-24 09:34:44 +00:00
Wayne Davison
e9357a2deb + Added mkdir_defmode().
+ Changed create_directory_path() to drop the (now) unneeded
  base_umask arg and to call mkdir_defmode().
2006-02-24 01:56:01 +00:00
Wayne Davison
7794db7c0d Tweaked the --human-readable code to work with the new option parsing. 2006-02-08 16:52:51 +00:00
Wayne Davison
c2b5407678 - Renamed cmp_modtime() -> cmp_time().
- Moved the delay-bit functions here from receiver.c and transformed
  them into some more generic "bitbag" functions.
2006-02-07 18:15:37 +00:00
Wayne Davison
afa73c75b5 A minor optimization to timestring. 2006-02-03 19:40:16 +00:00
Wayne Davison
3ed8eafccb The robust_rename() function now takes a "partialptr" arg that, if
non-NULL, will be used if we are forced to copy the file.
2006-01-30 07:18:16 +00:00
Wayne Davison
63cf5ae72c Made a bunch of char* args const. 2006-01-29 18:52:53 +00:00
Wayne Davison
f608ebb106 Got rid of unused function u_strcmp(). 2006-01-20 00:14:04 +00:00
Wayne Davison
785abd4802 Got rid of the safe_fname() function and the calls to it. 2006-01-13 22:06:34 +00:00
Wayne Davison
e175fb07f7 Added two new functions: human_num() and human_dnum(), which
output numbers in human-readable units if the --human-readable
option was specified.
2005-11-12 19:53:23 +00:00
Wayne Davison
35812ea1f9 One extra tweak to the just-committed code. 2005-10-15 19:15:29 +00:00
Wayne Davison
7e43da819e If we're sanitizing paths with --relative enabled, we need to
preserve the first /./ dir so that we can use its position to
trim the implied directories.
2005-10-15 19:08:31 +00:00
Wayne Davison
c89330313e Moved a variable in glob_expand_one(). 2005-08-03 04:51:29 +00:00
Wayne Davison
25007999df - Changed set_modtime() to take the file's mode as an arg.
- Made set_modtime() handle symlinks or return 1 if not possible.
2005-07-27 23:30:51 +00:00
Wayne Davison
a1f99493b3 Changed overflow() to overflow_exit(). 2005-07-07 19:49:14 +00:00
Wayne Davison
6f2245c8fa Tweaked the checking of the "limit" in safe_fname(). 2005-05-03 16:44:47 +00:00
Wayne Davison
89d26123ff Changed safe_fname() to output \### (octal) to escape non-printable
characters (not ?) and \\ to escape \ itself.
2005-04-01 16:48:54 +00:00
Wayne Davison
af9f56a09d dropped the "const" from the return value of safe_fname() because
some callers would like to manipulate the string in the buffer.
2005-03-30 19:34:20 +00:00
Wayne Davison
6012eaa183 Fixed a problem with the stripping of the .bak/.old/.orig suffixes
in find_filename_suffix().
2005-03-17 08:45:36 +00:00
Wayne Davison
3e13004b6b Tweaked the comment on copy_file(). 2005-03-11 17:35:57 +00:00
Wayne Davison
bc83274ad6 - Fixed a problem with full_fname() when curr_dir was "/".
- Made full_fname() consistently output a leading "/" for
  module paths no matter if chroot is in use or not.
2005-02-23 02:56:42 +00:00
Wayne Davison
732537212b Cast char* to uchar* when dereferencing characters for isdigit()
and isprint().
2005-02-20 17:07:31 +00:00
Wayne Davison
b485e0c16c Fixed/improved the comment before safe_name(). 2005-02-18 20:17:05 +00:00
Wayne Davison
e64ae6d766 Added find_filename_suffix() and fuzzy_distance(). 2005-02-14 02:41:10 +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