Commit Graph

149 Commits

Author SHA1 Message Date
Wayne Davison
b7061c82b4 Allow the argv list the daemon uses for globbing its args to grow. 2004-06-09 21:51:07 +00:00
Wayne Davison
b5bd5542eb Neatened up some of the glob-expand code and made a few other
minor tweaks.
2004-06-05 20:26:56 +00:00
Wayne Davison
edad5898f2 Got rid of a superfluous call to gettimeofday(). 2004-05-24 22:59:16 +00:00
Wayne Davison
9a5ade185c Made full_fname()'s char-pointer arg const. 2004-05-24 08:10:22 +00:00
Wayne Davison
f9e5a0cde2 Improved the depth calculation in sanitize_path() so that it properly
handles a trailing slash, a leading slash, and an empty string.
2004-05-23 23:46:56 +00:00
Wayne Davison
bc6ebcd248 Moved a few externs. 2004-05-21 08:40:25 +00:00
Wayne Davison
d62bcc17f3 Changed rprintf() calls that included strerror() to use rsyserr(). 2004-05-15 19:31:10 +00:00
Wayne Davison
4135d091a6 Changed the non-globbing version of glob_expand_one() so that it
checks the maxargs argument instead of leaving it unused.
2004-05-08 20:03:39 +00:00
Wayne Davison
8b602edda4 In copy_file(), check len < 0 before checking the close() return values. 2004-04-27 19:59:37 +00:00
Wayne Davison
9f27cd8ca6 Check the return code from close() and output an error if it
fails.
2004-04-27 19:51:33 +00:00
Wayne Davison
b084f9e092 Got rid of a debug-output statement. 2004-04-27 16:41:33 +00:00
Wayne Davison
9fdb334e85 Restore the old include behavior where a command-line include could
override a .cvsignore exclude.
2004-04-22 22:17:15 +00:00
Wayne Davison
acfcfa7053 No need to pass a debug string to check_exclude() anymore. 2004-04-22 09:58:21 +00:00
Wayne Davison
b05b3c9b48 Fixed alloc_sanitize_path()'s handling of a rootdir == "/" (the old
code would generate a string that started with "//" instead of "/").
2004-04-17 17:06:03 +00:00
Wayne Davison
bf6dcd1713 Updated the exclude-list code to handle the new linked-list
structure format.
2004-04-14 23:33:34 +00:00
Wayne Davison
5387514eaf Added a description arg to check_exclude(). 2004-04-14 21:59:45 +00:00
Wayne Davison
14b61c63f0 Added alloc_sanitize_path(). 2004-03-27 09:44:49 +00:00
Wayne Davison
62c9e6b3a5 Moved the EXDEV handling into robust_rename(). 2004-02-17 23:13:10 +00:00
Wayne Davison
a8f7e4b835 Made a couple comments a little clearer. 2004-02-07 00:12:40 +00:00
Wayne Davison
4250941710 Fixed a dropped '-'. 2004-02-04 03:01:32 +00:00
Wayne Davison
c284f34a49 Some indentation fixes and the removal of some superfluous parens. 2004-02-03 23:04:25 +00:00
Wayne Davison
5cb374364b Modified sizeof usage and eliminated trailing whitespace. 2004-02-03 22:48:32 +00:00
Wayne Davison
b22260749f Use "%H:%M:%S" instead of "%T" in strftime() call since it looks to be
more portable.
2004-02-02 21:02:13 +00:00
Wayne Davison
a16d8f2b25 Improved a couple comments. 2004-01-21 02:45:10 +00:00
Wayne Davison
4af8fe4e78 - Changed push_dir() to not take a "save" arg and to return 1 or 0
for success or failure instead of a string pointer.  The function
  also ensures that we don't overflow the curr_dir[] buffer.
- Changed pop_dir() to not free() anything and to return 1 or 0
  for success or failure.
2004-01-20 17:46:29 +00:00
Wayne Davison
368ad70e05 Added stringjoin() and pathjoin(). 2004-01-20 04:43:49 +00:00
Wayne Davison
5c1b7bfd2a No need to conditionally-compile EINTR code -- no other files do this. 2004-01-02 07:31: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
eb61be192d Added a new function, full_fname(), that makes a filename more complete
for error messages.  If the path is in a module, we ensure that the
"path" setting (from the config file) is not revealed, while still
reminding the user that the path is relative to the module's root.
2003-09-11 04:48:15 +00:00
Wayne Davison
4791825d49 Modified the glob_expand_one() function to check the args against the
server's config-specified exclude list.  This prevents the user from
going around directory exclusions.  Fixed push_dir() to not append
"/." onto the end of the current path if it is called with "." as the
"dir" arg.  Made curr_dir[] exported so the exclude code can use it
(for the daemon-config absolute-path excludes).
2003-07-01 21:45:31 +00:00
Wayne Davison
7afa3a4a48 Optimized unsafe_symlink() to avoid malloc/free calls. 2003-01-19 21:37:11 +00:00
Wayne Davison
a70d070cc5 Make unsafe_symlink() take const args so that we don't get any
compiler warnings when calling it with a const char *.
2003-01-15 17:49:44 +00:00
Martin Pool
32f761755e Try to fix ctype issues by always calling these functions as
if (!isdigit(* (unsigned char *) p)) {

so that the argument is always in the range of unsigned char when
coerced to an int.

(See digit 1.)
2002-04-11 02:25:53 +00:00
Martin Pool
07a874fd9b Correction from Nelson Beebe: argument to functions such as isspace()
must be an int, not a char.  This could cause sign-extension problems.
2002-04-09 06:15:13 +00:00
Martin Pool
4e5db0ad4a Doc. 2002-04-08 05:21:51 +00:00
Martin Pool
b4235b3165 Doc. 2002-04-08 04:48:51 +00:00
Martin Pool
0ecfbf27c3 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:16:46 +00:00
Martin Pool
25d34a5c80 Rearrange code slightly to avoid util.c depending on main.c. 2002-04-08 03:37:19 +00:00
Martin Pool
036e70b024 Document unsafe_symlink(). 2002-04-08 03:10:01 +00:00
Martin Pool
ac13ad106a Clean up comments for Doxygen. 2002-04-08 03:03:04 +00:00
Martin Pool
4cf64834ed Patch from Paul Haas:
* Fix situation where failure to fork (e.g. because out of process
      slots) would cause rsync to kill all processes owned by the
      current user.  Yes, really!  (Paul Haas, Martin Pool)

Also, add a little more documentation and paranoia to make sure we
never call kill(2) with a negative pid.
2002-03-20 01:09:49 +00:00
Martin Pool
c579310a00 If we've finished transferring a file, show the time taken; otherwise
show expected time to complete.  That's kind of inconsistent, but
people can probably cope.  Hopefully we'll get more consistent and
complete progress reporting soon. (Cameron Simpson)
2002-03-15 12:45:10 +00:00
Martin Pool
6dd41b67fb print_child_argv can be static. 2002-02-23 00:05:06 +00:00
Martin Pool
404e813c52 Add -vvv trace statement to set_modtime to help with Debian bug
#100295.
2002-02-18 22:25:55 +00:00
David Dykstra
1bbd10fe07 Remove the "rsync:" prefixes on FINFO messages. Return the "building file
list ... done" to the way it was in 2.5.1 and before when not using -P.
Apply the file list progress messages when receiving files in addition to
sending files.
2002-02-07 16:36:12 +00:00
Martin Pool
0b1ffe2755 Only print the command used to open connections with -vv, not just -v.
<Pine.LNX.4.33L2.0201301015260.11155-100000@phong.blorf.net>
2002-02-05 00:34:03 +00:00
Martin Pool
a261989cda More signedness fixes; should be harmless. 2002-01-25 23:07:33 +00:00
Martin Pool
5ad0e46f08 Show command used to start connection child. 2002-01-24 04:36:00 +00:00
Martin Pool
1b5814e338 indent -kr -i8 2002-01-24 04:26:55 +00:00
Martin Pool
76f79ba748 Patch from Jos Backus -- Fix breakage from dev_t to DEV64_T in batch
mode.

Also, drop -f and -F for batch mode: these should be reserved for
options that are more commonly used.

It also appends a newline to the argvs file and skips adding the
source directory to the command line.
2002-01-23 05:51:06 +00:00