The behavior of scp when there are special characters in remote
"filenames" should be documented in the man page, such as:

  Special characters in the remote file names are not escaped and
  will be interpreted by the remote shell.

In fact, I've often used this feature, e.g. "scp host:file\* ." to
retrieve several files.

If this is not considered to be safe, then scp should probably
detect special characters and return an error.

Another suggestion:

The different behaviors could be implemented as options to put in
the user's .ssh/config file (remote shells may behave in different
manners, but as options may be host-dependent, this is not a real
problem). For instance, this could be:

  ShellMetaCharacters "'`*?\
  ShellQuote no | auto | error

(no = current behavior, auto = spaces and metacharacters are
automatically quoted by scp, error = if the file name contains
a space or a metacharacter, then an error is returned by scp).

I don't know if POSIX completly defines the metacharacters, but
if it does, one should be able to write:

  ShellMetaCharacters posix

and this should probably be the default.

Any comment?

-- 
Vincent Lefèvre <[EMAIL PROTECTED]> - Web: <http://www.vinc17.org/>
100% accessible validated (X)HTML - Blog: <http://www.vinc17.org/blog/>
Work: CR INRIA - computer arithmetic / SPACES project at LORIA


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to