[Bug 2338] scp -3 doesn't give an error on missing source directory

bugzilla-daemon at mindrot.org bugzilla-daemon at mindrot.org
Thu Apr 23 23:08:34 AEST 2015


https://bugzilla.mindrot.org/show_bug.cgi?id=2338

--- Comment #1 from Jakub Jelen <jjelen at redhat.com> ---
Created attachment 2600
  --> https://bugzilla.mindrot.org/attachment.cgi?id=2600&action=edit
Patch to show errors from remote ends

To catch up with Red Hat bugzilla: Implementation of extended remote to
remote is sending error messages back and forth from one remote to the
other and none of them is writing them out. It seems half-baked.
This can be solved by catching such messages in initiator process (or
writing them out in the remote processes, but it requires changes on
server side).

After some digging in this case I managed to make stream redirection
and catching errors in the initiator process. This change doesn't
require any changes on server side so there are no drawbacks about
backward compatibility.

For now it is fully functional implementation. Some notes for future
self (or anyone having look into it):
 * Follows scp state protocol in simple FSM
 * It would be nicer to use atomicio everywhere (I read all line
instead of reading byte after byte as implementation on server side)
 * Progress-meter is working again
 * Still doesn't work using password authentication on both ends, since
the prompts are print over each other.
 * There is some overhead, but if you aim for speed you will not use -3
option

I tried my best to come up with quality code, but feel free to comment
if you find some problem or something is not clear. Patch can be
applied to upstream sources

-- 
You are receiving this mail because:
You are watching the assignee of the bug.


More information about the openssh-bugs mailing list