[Bug 12569] New: Missing directory errors not ignored

samba-bugs at samba.org samba-bugs at samba.org
Tue Feb 7 11:31:43 UTC 2017


https://bugzilla.samba.org/show_bug.cgi?id=12569

            Bug ID: 12569
           Summary: Missing directory errors not ignored
           Product: rsync
           Version: 3.1.2
          Hardware: All
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P5
         Component: core
          Assignee: wayned at samba.org
          Reporter: axkibe at gmail.com
        QA Contact: rsync-qa at samba.org

When using --delete-missing-args and --ignore-errors with a a file list it
terminates anyway if one directory, that is not a sub of root, is not existing.

See:

~$ mkdir -p src/a trg/a
~$ echo "/a/b/c" > list
~$ /usr/local/bin/rsync -slt --ignore-errors --force --ignore-missing-args
--delete-missing-args --files-from=list --rsync-path=/usr/local/bin/rsync src
localhost:`pwd`/trg
file has vanished: "/home/axel/src/a/b"
ABORTING due to invalid path from sender: a/b/c
rsync error: protocol incompatibility (code 2) at generator.c(1270)
[generator=3.1.2]
~$ /usr/local/bin/rsync --version
rsync  version 3.1.2  protocol version 31
Copyright (C) 1996-2015 by Andrew Tridgell, Wayne Davison, and others.
Web site: http://rsync.samba.org/
Capabilities:
    64-bit files, 64-bit inums, 64-bit timestamps, 64-bit long ints,
    socketpairs, hardlinks, symlinks, IPv6, batchfiles, inplace,
    append, no ACLs, xattrs, iconv, symtimes, prealloc

rsync comes with ABSOLUTELY NO WARRANTY.  This is free software, and you
are welcome to redistribute it under certain conditions.  See the GNU
General Public Licence for details.


Following patch fixes it for me, albeit it ignores this kind of error now
always:
--- rsync-3.1.2-org/generator.c    2015-12-05 20:10:24.000000000 +0100
+++ rsync-3.1.2/generator.c    2017-02-07 10:58:33.768453242 +0100
@@ -1264,10 +1264,11 @@
              && (*dn != '.' || dn[1]) /* Avoid an issue with --relative and
the "." dir. */
              && (prior_dir_file && strcmp(dn, f_name(prior_dir_file, NULL)) !=
0)
              && flist_find_name(cur_flist, dn, 1) < 0) {
+                io_error |= IOERR_VANISHED;
                 rprintf(FERROR,
-                    "ABORTING due to invalid path from sender: %s/%s\n",
+                    "WARNING: invalid path from sender: %s/%s\n",
                     dn, file->basename);
-                exit_cleanup(RERR_PROTOCOL);
+                return;
             }
             if (relative_paths && !implied_dirs
              && do_stat(dn, &sx.st) < 0) {

Now the exit code is 24, partial transfer, as would be expected.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.



More information about the rsync mailing list