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

Damien Miller <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Assignee|[email protected] |[email protected]
                 CC|                            |[email protected]
   Attachment #3619|                            |ok?([email protected])
              Flags|                            |

--- Comment #4 from Damien Miller <[email protected]> ---
Created attachment 3619
  --> https://bugzilla.mindrot.org/attachment.cgi?id=3619&action=edit
handle glob no-match conditions like olde scp

Original rcp-protocol scp would use the shell for remote glob(3)
expansion, and shells usually fall back in the case where the glob
expansion fails to considering the original path literally.

We can do this in scp in SFTP protocol mode using remote_glob()'s
GLOB_NOCHECK flag, which instructs it to return the original path if
expansion fails.

However, we also depend on GLOB_MARK to annotate directory paths with a
'/' suffix, and that doesn't happen to work for the GLOB_NOCHECK case.

So this changes three things:

1. Turns on GLOB_NOCHECK for the scp remote_glob() calls

2. Adds support to sftp-glob.c:remote_glob() to properly annotate
returned GLOB_NOCHECK paths when GLOB_MARK is enabled

3. Adds existence checks after remote_glob() when a GLOB_NOCHECK result
is returned so it can show a consistent error message for actually
missing files (rather than letting it fall through to the do_download()
call which doesn't do nice error messages).

-- 
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.
_______________________________________________
openssh-bugs mailing list
[email protected]
https://lists.mindrot.org/mailman/listinfo/openssh-bugs

Reply via email to