Displaying 15 results from an estimated 15 matches for "local_fd".
Did you mean:
local_fs
2003 Oct 30
2
sftp client reget reput
...+#ifdef REGET
+do_download(struct sftp_conn *conn, char *remote_path, char *local_path,
+ int pflag, int rflag)
+#else
do_download(struct sftp_conn *conn, char *remote_path, char *local_path,
int pflag)
+#endif
{
Attrib junk, *a;
Buffer msg;
@@ -798,8 +803,17 @@
return(-1);
}
- local_fd = open(local_path, O_WRONLY | O_CREAT | O_TRUNC,
- mode | S_IWRITE);
+#ifdef REGET
+ if (rflag)
+ local_fd = open(local_path, O_WRONLY, mode | S_IWRITE);
+ else {
+ local_fd = open(local_path, O_WRONLY | O_CREAT | O_TRUNC,
+ mode | S_IWRITE);
+ }
+#else
+ local_fd = open(local_path...
2002 Nov 05
2
[PATCH] fix sftp to preserve permissions and uid/gid
...rn(status);
--- 666,672 ----
status = get_status(conn->fd_in, id);
if (status != SSH2_FX_OK)
! error("Couldn't symlink file \"%s\" to \"%s\": %s", oldpath,
newpath, fx2txt(status));
return(status);
***************
*** 746,752 ****
int local_fd, status, num_req, max_req, write_error;
int read_error, write_errno;
u_int64_t offset, size;
! u_int handle_len, mode, type, id, buflen;
struct request {
u_int id;
u_int len;
--- 796,802 ----
int local_fd, status, num_req, max_req, write_error;
int read_error, write_errno;...
2001 Sep 10
0
[PATCH] quick hack for 'resume' support in sftp
...,687 ****
--- 685,691 ----
Buffer msg;
Attrib junk, *a;
int status;
+ struct stat localfile;
a = do_stat(fd_in, fd_out, remote_path, 0);
if (a == NULL)
***************
*** 698,705 ****
error("Cannot download a directory: %s", remote_path);
return(-1);
}
!
! local_fd = open(local_path, O_WRONLY | O_CREAT | O_TRUNC, mode);
if (local_fd == -1) {
error("Couldn't open local file \"%s\" for writing: %s",
local_path, strerror(errno));
--- 702,720 ----
error("Cannot download a directory: %s", remote_path);
retur...
2013 Jan 12
1
[Bug 2021] sftp resume support (using size and offset)
https://bugzilla.mindrot.org/show_bug.cgi?id=2021
--- Comment #10 from Loganaden Velvindron <loganaden at gmail.com> ---
ping :-) ?
--
You are receiving this mail because:
You are watching the assignee of the bug.
You are watching someone on the CC list of the bug.
2002 Jan 06
3
sftp/scp performance testing
Folks, I've noticed poor performance using sftp. If anyone has any
advice on how to improve performance, I'd like to hear it. Test simply
involved transferring a single 143MB MP3 file using defaults for all the
program configs. The opensshd 3.0.2p1 server is used in all tests.
Software:
openssh suite 3.0.2p1
psftp (putty sftp client) latest dev snapshot
pscp (putty scp client) latest
2002 Jan 03
3
[PATCH] Improving sftp client performance
...buffer_put_int64(m, rq->offset);
+ buffer_put_int(m, rq->len);
+ send_msg(fd, m);
+ debug3("Sent message SSH2_FXP_READ I:%d O:%llu S:%u",
+ rq->id, rq->offset, rq->len);
+}
+
int
do_init(int fd_in, int fd_out)
{
@@ -674,12 +721,15 @@
int pflag)
{
int local_fd;
- u_int expected_id, handle_len, mode, type, id;
+ u_int handle_len, mode, type, id;
u_int64_t offset;
char *handle;
Buffer msg;
Attrib junk, *a;
int status;
+ struct request req[REQUEST_QUEUE_SIZE];
+ int num_req = 0, max_req = 1, reply;
+ int write_error = 0, read_error = 0, write_errn...
2013 Jun 19
9
[Bug 2021] sftp resume support (using size and offset)
https://bugzilla.mindrot.org/show_bug.cgi?id=2021
Loganaden Velvindron <loganaden at gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #2199|0 |1
is obsolete| |
--- Comment #12 from Loganaden Velvindron
2013 Nov 30
4
[Bug 2176] New: unchecked returned value from ftruncate
...achment.cgi?id=2378&action=edit
sftp_unchecked_return
@@ -1253,7 +1253,9 @@ do_download(struct sftp_conn *conn, char
"server reordered requests", local_path);
}
debug("truncating at %llu", (unsigned long long)highwater);
- ftruncate(local_fd, highwater);
ftruncate value isn't checked.
--
You are receiving this mail because:
You are watching the assignee of the bug.
2002 Feb 06
2
SFTP Status Bar..
...ss Meter items */
+off_t statbytes = 0;
+off_t totalbytes = 0;
+char *curfile = NULL;
+
static void
send_msg(int fd, Buffer *m)
{
@@ -671,7 +676,7 @@
int
do_download(int fd_in, int fd_out, char *remote_path, char *local_path,
- int pflag)
+ int pflag, void (*progressbar)(int))
{
int local_fd;
u_int expected_id, handle_len, mode, type, id;
@@ -724,6 +729,11 @@
return(-1);
}
+ totalbytes = a->size;
+ curfile = remote_path;
+ if (progressbar)
+ (progressbar)(0);
+
/* Read from remote and write to local */
offset = 0;
for(;;) {
@@ -785,6 +795,7 @@
offset += len;...
2013 Nov 12
3
[Bug 2171] New: potential fd leak
...er
OS: Linux
Status: NEW
Severity: enhancement
Priority: P5
Component: sftp
Assignee: unassigned-bugs at mindrot.org
Reporter: loganaden at gmail.com
in sftp-client.c:
if (resume_flag) {
if (fstat(local_fd, &st) == -1) {
error("Unable to stat local file \"%s\": %s",
local_path, strerror(errno));
goto fail;
}
if ((size_t)st.st_size > size) {
err...
2002 Jan 30
1
Quick sftp status indicator.
...int save_errno = errno;
+
+ progressmeter(0, offset, file_size, filename);
+ signal(SIGALRM, updateprogressmeter);
+ alarm(PROGRESSTIME);
+ errno = save_errno;
+}
+
int
do_download(int fd_in, int fd_out, char *remote_path, char *local_path,
int pflag)
{
int local_fd;
u_int expected_id, handle_len, mode, type, id;
- u_int64_t offset;
char *handle;
Buffer msg;
Attrib junk, *a;
@@ -723,6 +739,12 @@
return(-1);
}
+ file_size = a->size;
+ filename = remote_path;
+ progressmeter(-1, offset, file_size, filename);
+ signal(SIGALRM, updateprogressmete...
2019 Jun 21
2
sftp client: upload from pipe
...urpose for such a behaviour and limitation? As experiment,
I removed following piece of code which is responsible for this check
(sftp-client.c, do_upload() function):
if (!S_ISREG(sb.st_mode)) {
error("%s is not a regular file", local_path);
close(local_fd);
return(-1);
}
and nothing bad happened. It was still possible to upload regular files,
but additionaly there was an opportunity for upload data piped from other
command (what in my opinion is very useful feature) and even directly
from terminal. Would it be possible to re...
2002 Feb 02
0
Version two of progressbar for scp/sftp
...ss Meter items */
+off_t statbytes = 0;
+off_t totalbytes = 0;
+char *curfile = NULL;
+
static void
send_msg(int fd, Buffer *m)
{
@@ -670,7 +675,7 @@
int
do_download(int fd_in, int fd_out, char *remote_path, char *local_path,
- int pflag)
+ int pflag, void (*progressbar)(int))
{
int local_fd;
u_int expected_id, handle_len, mode, type, id;
@@ -723,6 +728,11 @@
return(-1);
}
+ totalbytes = a->size;
+ curfile = remote_path;
+ if (progressbar)
+ (progressbar)(0);
+
/* Read from remote and write to local */
offset = 0;
for (;;) {
@@ -784,6 +794,7 @@
offset += len;...
2002 Feb 20
11
Call for testing.
Recently we made somemajor changes to do_child() in
OpenSSH -current. Those changes included splitting it up
into smaller chunks to help with readability and also to
extract out IRIX and AIX specific code to reduce the number
of lines in our diffs against the OpenSSH tree.
I need people to do some testing on different platforms to ensure
that all the right #ifdef/#endif bits got put back in
2001 Feb 16
7
OpenSSH 2.5.0p1
Known issues:
1) Linux 'sleep 20' -- Unfixable before 2.5.0 (known work around)
2) HP/UX signal issue -- Patched and HP/UX 11 works in v2
3) SCO 2/ Native Compiler -- Unfixable before 2.5.0 (known work around)
4) NeXTStep -- Resynced, MAX_GROUPS vs NGROUPS unresolved (not major)
5) DG/UX regcomp/regexec -- Fixed.
6) Cray signal issues -- ???
7) Solaris '$PATH' issue -- ??