Mercurial > illumos > illumos-gate
changeset 9927:4aa6e446614d
6705402 ssh issue with scp, naming conventions within the command
author | Pravas K Panda <pravas@Sun.COM> |
---|---|
date | Mon, 22 Jun 2009 08:25:32 -0700 |
parents | e64db7b88234 |
children | 7e332a7c18f5 |
files | usr/src/cmd/ssh/scp/scp.c |
diffstat | 1 files changed, 12 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/usr/src/cmd/ssh/scp/scp.c Mon Jun 22 18:30:05 2009 +0800 +++ b/usr/src/cmd/ssh/scp/scp.c Mon Jun 22 08:25:32 2009 -0700 @@ -1131,9 +1131,18 @@ c = (int)*cp; if (c & 0200) goto bad; - if (!isalpha(c) && !isdigit(c) && - c != '_' && c != '-' && c != '.' && c != '+') - goto bad; + if (!isalpha(c) && !isdigit(c)) { + switch (c) { + case '\'': + case '"': + case '`': + case ' ': + case '#': + goto bad; + default: + break; + } + } } while (*++cp); return (1);