Bugzilla – Attachment 1304 Details for
Bug 1236
SCP inappropriate truncate error when copying to FIFO file
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Truncate only for regular files that already existed
scp-fifotrunc.diff (text/plain), 585 bytes, created by
Damien Miller
on 2007-06-12 21:26:30 AEST
(
hide
)
Description:
Truncate only for regular files that already existed
Filename:
MIME Type:
Creator:
Damien Miller
Created:
2007-06-12 21:26:30 AEST
Size:
585 bytes
patch
obsolete
>Index: scp.c >=================================================================== >RCS file: /cvs/src/usr.bin/ssh/scp.c,v >retrieving revision 1.157 >diff -u -p -r1.157 scp.c >--- scp.c 12 Jun 2007 08:24:20 -0000 1.157 >+++ scp.c 12 Jun 2007 11:23:01 -0000 >@@ -1009,7 +1009,8 @@ bad: run_err("%s: %s", np, strerror(er > wrerr = YES; > wrerrno = errno; > } >- if (wrerr == NO && ftruncate(ofd, size) != 0) { >+ if (wrerr == NO && (!exists || S_ISREG(stb.st_mode)) && >+ ftruncate(ofd, size) != 0) { > run_err("%s: truncate: %s", np, strerror(errno)); > wrerr = DISPLAYED; > }
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 1236
:
1189
| 1304