Bugzilla – Attachment 680 Details for
Bug 891
possible problem with non-printing characters during scp copy
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Encode newlines in filename for scp transfer
openssh-scp-newline.patch (text/plain), 1.08 KB, created by
Darren Tucker
on 2004-07-04 16:14:30 AEST
(
hide
)
Description:
Encode newlines in filename for scp transfer
Filename:
MIME Type:
Creator:
Darren Tucker
Created:
2004-07-04 16:14:30 AEST
Size:
1.08 KB
patch
obsolete
>Index: scp.c >=================================================================== >RCS file: /usr/local/src/security/openssh/cvs/openssh_cvs/scp.c,v >retrieving revision 1.127 >diff -u -p -r1.127 scp.c >--- scp.c 22 Jun 2004 02:56:02 -0000 1.127 >+++ scp.c 4 Jul 2004 05:58:28 -0000 >@@ -505,7 +505,7 @@ source(int argc, char **argv) > BUF *bp; > off_t i, amt, result, statbytes; > int fd, haderr, indx; >- char *last, *name, buf[2048]; >+ char *last, *name, buf[2048], encname[MAXPATHLEN]; > int len; > > for (indx = 0; indx < argc; ++indx) { >@@ -514,13 +514,13 @@ source(int argc, char **argv) > len = strlen(name); > while (len > 1 && name[len-1] == '/') > name[--len] = '\0'; >- if (strchr(name, '\n') != NULL) { >- run_err("%s: skipping, filename contains a newline", >- name); >- goto next; >- } > if ((fd = open(name, O_RDONLY, 0)) < 0) > goto syserr; >+ if (strchr(name, '\n') != NULL) { >+ strnvis(encname, name, sizeof(encname), VIS_NL); >+ name = encname; >+ error("DAZ: name %s", name); >+ } > if (fstat(fd, &stb) < 0) { > syserr: run_err("%s: %s", name, strerror(errno)); > goto next;
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 891
:
680
|
1306