[Bug 2404] scp skips file/directory on permissions error
bugzilla-daemon at mindrot.org
bugzilla-daemon at mindrot.org
Sun May 31 17:03:35 AEST 2015
https://bugzilla.mindrot.org/show_bug.cgi?id=2404
Darren Tucker <dtucker at zip.com.au> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |dtucker at zip.com.au
--- Comment #2 from Darren Tucker <dtucker at zip.com.au> ---
I had a look at this. I don't think it's exactly the same as bug #863;
the change for that is still there and I added a regression test for
it. I also think it only happens for directories and not files.
I added a couple of extra printfs and here's the difference between it
working and not:
Sink: E
File mtime 1433044183 atime 1433044258
Sending file timestamps: T1433044183 0 1433044258 0
-scp: /var/tmp//test/lost+found: set times: Operation not permitted
-do_times: response -1
-rsource: skipping
+Sink: T1433044183 0 1433044258 0
+do_times: response 0
+Entering directory: D0755 0 pqr
+Sink: D0755 0 pqr
+Sink: E
File mtime 1433044183 atime 1433044196
Sending file timestamps: T1433044183 0 1433044196 0
-Sink: T1433044183 0 1433044258 0
Sink: T1433044183 0 1433044196 0
do_times: response 0
Entering directory: D0755 0 abc
@@ -34,9 +35,9 @@
Sink: E
File mtime 1433044183 atime 1433044196
Sending file timestamps: T1433044183 0 1433044196 0
+Sink: T1433044183 0 1433044196 0
do_times: response 0
Entering directory: D0755 0 def
-Sink: T1433044183 0 1433044196 0
Sink: D0755 0 def
Sink: E
Sink: E
Looks like it's this code in scp.c:rsource()
if (pflag) {
if (do_times(remout, verbose_mode, statp) < 0) {
closedir(dirp);
fprintf (stderr, "rsource: skipping\n");
return;
}
}
(void) snprintf(path, sizeof path, "D%04o %d %.1024s\n",
(u_int) (statp->st_mode & FILEMODEMASK), 0, last);
if (verbose_mode)
fprintf(stderr, "Entering directory: %s", path);
Not sure what this code is supposed to do, though.
--
You are receiving this mail because:
You are watching someone on the CC list of the bug.
You are watching the assignee of the bug.
More information about the openssh-bugs
mailing list