Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 160805 Details for
Bug 247802
sftp problem while transferring files to a partition which is 100% full
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
Proposed patch
openssh-3.9p1-sftp-no-empty.patch (text/plain), 1.48 KB, created by
Tomas Mraz
on 2007-08-07 12:19:10 UTC
(
hide
)
Description:
Proposed patch
Filename:
MIME Type:
Creator:
Tomas Mraz
Created:
2007-08-07 12:19:10 UTC
Size:
1.48 KB
patch
obsolete
>Remove empty files if write error occured. > >diff -up openssh-3.9p1/sftp-server.c.no-empty openssh-3.9p1/sftp-server.c >--- openssh-3.9p1/sftp-server.c.no-empty 2004-07-17 06:07:42.000000000 +0200 >+++ openssh-3.9p1/sftp-server.c 2007-08-07 12:49:22.000000000 +0200 >@@ -117,6 +117,7 @@ struct Handle { > DIR *dirp; > int fd; > char *name; >+ int wrote; /* 0 - no write, >0 - ok, <0 - write error */ > }; > > enum { >@@ -147,6 +148,7 @@ handle_new(int use, const char *name, in > handles[i].dirp = dirp; > handles[i].fd = fd; > handles[i].name = xstrdup(name); >+ handles[i].wrote = 0; > return i; > } > } >@@ -210,6 +212,14 @@ handle_to_fd(int handle) > return -1; > } > >+static void >+handle_write(int handle, int error) >+{ >+ if (handle_is_ok(handle, HANDLE_FILE) >+ && handles[handle].wrote == 0) >+ handles[handle].wrote = error; >+} >+ > static int > handle_close(int handle) > { >@@ -217,6 +227,8 @@ handle_close(int handle) > > if (handle_is_ok(handle, HANDLE_FILE)) { > ret = close(handles[handle].fd); >+ if (handles[handle].wrote < 0) >+ unlink(handles[handle].name); > handles[handle].use = HANDLE_UNUSED; > xfree(handles[handle].name); > } else if (handle_is_ok(handle, HANDLE_DIR)) { >@@ -480,8 +492,10 @@ process_write(void) > if (ret == -1) { > error("process_write: write failed"); > status = errno_to_portable(errno); >+ handle_write(handle, -1); > } else if (ret == len) { > status = SSH2_FX_OK; >+ handle_write(handle, 1); > } else { > logit("nothing at all written"); > }
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 247802
:
160805
|
160853