Displaying 20 results from an estimated 47 matches for "gl_pathv".
2003 Oct 01
1
3.7.1p2 sftp recurse patch
...;
+ } else
+ err = do_upload(conn, local_path, remote_path, pflag);
+END:
+ return err;
+}
+
+static int
process_get(struct sftp_conn *conn, char *src, char *dst, char *pwd, int pflag)
{
char *abs_src = NULL;
@@ -482,7 +588,7 @@
abs_dst = tmp;
printf("Fetching %s to %s\n", g.gl_pathv[i], abs_dst);
- if (do_download(conn, g.gl_pathv[i], abs_dst, pflag) == -1)
+ if (do_recursive_download(conn, g.gl_pathv[i], abs_dst, pflag) == -1)
err = -1;
xfree(abs_dst);
abs_dst = NULL;
@@ -528,7 +634,7 @@
}
for (i = 0; g.gl_pathv[i]; i++) {
- if (!is_reg(g.gl_pathv[i])) {
+...
2002 Feb 06
2
SFTP Status Bar..
...mysignal(SIGALRM, updateprogressmeter);
+ alarm(PROGRESSTIME);
+ } else
+ alarm(0);
+
+ errno = save_errno;
+}
+
+static void
help(void)
{
printf("Available commands:\n");
@@ -380,8 +399,8 @@
err = -1;
goto out;
}
- printf("Fetching %s to %s\n", g.gl_pathv[0], abs_dst);
- err = do_download(in, out, g.gl_pathv[0], abs_dst, pflag);
+ err = do_download(in, out, g.gl_pathv[0], abs_dst, pflag,
+ NULL);
goto out;
}
@@ -404,8 +423,8 @@
} else
abs_dst = tmp;
- printf("Fetching %s to %s\n", g.gl_pathv[i], abs_dst);
- if (do_...
2008 Jul 21
2
sftp needs a long time for sending a filelist
Hello all
Im using sftp 1:4.7p1-8ubuntu1.2
in a batchjob
Ive noticed that sftp needs a long time for sending a filelist.
The timespan increases exponential if many files are on the
remoteserver.
for example "ls -la *.txt" needs 10 seconds for 2000 files
but needs 50 seconds for 4000 files.
For 150.000 Files i have to wait 15 minutes for example
but the
2003 Jan 16
1
Core dump in sftp from CVS
...-b ./batch
Attaching to sftp-server...
sftp> version
SFTP protocol version 3
sftp> get /bin/ls ./copy.1
sftp> put /bin/ls ./copy.2
Segmentation Fault (core dumped)
The cause appears to be sftp-int.c line 508:
506 /* Only one match, dst may be file, directory or unspecified */
507 if (g.gl_pathv[0] && g.gl_matchc == 1) {
508 if (!is_reg(g.gl_pathv[i])) {
^^^
The variable "i" is uninitialized at this point. The code is the same
in OpenBSD and portable.
Attached patch passes regression on Solaris 8.
--
Darren Tucker (dtucker at zip.com.au)
GPG Fingerprint D...
2002 Feb 02
0
Version two of progressbar for scp/sftp
...signal(SIGALRM, updateprogressmeter);
+ alarm(PROGRESSTIME);
+ } else
+ alarm(0);
+
+ errno = save_errno;
+}
+
+static void
help(void)
{
printf("Available commands:\n");
@@ -382,8 +401,8 @@
err = -1;
goto out;
}
- printf("Fetching %s to %s\n", g.gl_pathv[0], abs_dst);
- err = do_download(in, out, g.gl_pathv[0], abs_dst, pflag);
+ err = do_download(in, out, g.gl_pathv[0], abs_dst, pflag,
+ NULL);
goto out;
}
@@ -406,8 +425,8 @@
} else
abs_dst = tmp;
- printf("Fetching %s to %s\n", g.gl_pathv[i], abs_dst);
- if (do_...
2002 Dec 05
2
[Bug 452] sftp does not abort when commands given via -b fail
http://bugzilla.mindrot.org/show_bug.cgi?id=452
------- Additional Comments From spin at avalon.net 2002-12-06 03:15 -------
Forgot to mention that this is 3.1p1-6 RedHat RPM.
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
2008 Nov 24
5
[Bug 1541] New: sftp: the do_stat() failure is ignored for chown, chgrp ops. in parse_dispatch_command()
...Status: NEW
Severity: trivial
Priority: P5
Component: sftp
AssignedTo: unassigned-bugs at mindrot.org
ReportedBy: anedvedicky at gmail.com
This is a realy small bug.
the code in parse_dispatch_command() looks as follows
@1186
for (i = 0; g.gl_pathv[i] && !interrupted; i++) {
if (!(aa = do_stat(conn, g.gl_pathv[i], 0))) {
if (err != 0 && err_abort)
break;
else
continue;
the err is always 0, once for loop is entered (this is guaranteed by
code in...
2003 Oct 30
2
sftp client reget reput
...onn *conn, char *src, char *dst, char *pwd, int pflag, int rflag)
+#else
process_get(struct sftp_conn *conn, char *src, char *dst, char *pwd, int pflag)
+#endif
{
char *abs_src = NULL;
char *abs_dst = NULL;
@@ -482,7 +501,11 @@
abs_dst = tmp;
printf("Fetching %s to %s\n", g.gl_pathv[i], abs_dst);
+#ifdef REGET
+ if (do_download(conn, g.gl_pathv[i], abs_dst, pflag, rflag) == -1)
+#else
if (do_download(conn, g.gl_pathv[i], abs_dst, pflag) == -1)
+#endif
err = -1;
xfree(abs_dst);
abs_dst = NULL;
@@ -497,7 +520,11 @@
}
static int
+#ifdef REGET
+process_put(struct...
2013 Sep 10
2
[Bug 2151] New: Call to upload_dir() has pflag and printflag swapped
...mp;action=edit
Make definition match actual usage.
While working on a patch for sftp(1), I noticed that the pflag and
This seems to have been the case since the initial inclusion in 5.4.
sftp.c-718- if (!quiet)
sftp.c-719- printf("Uploading %s to %s\n",
g.gl_pathv[i], abs_dst);
sftp.c-720- if (pathname_is_dir(g.gl_pathv[i]) && (rflag ||
global_rflag)) {
sftp.c:721: if (upload_dir(conn, g.gl_pathv[i],
abs_dst,
sftp.c-722- pflag || global_pflag, 1) == -1)
sftp.c-723- er...
2007 Dec 12
0
Revisiting sftp tab completion patch
...file);
+
+ memset(&g, 0, sizeof(g));
+ if (remote != LOCAL) {
+ tmp = make_absolute(tmp, remote_path);
+ remote_glob(conn, tmp, 0, NULL, &g);
+ } else
+ glob(tmp, GLOB_DOOFFS, NULL, &g);
+
+ xfree(tmp);
+
+ if (g.gl_matchc == 0)
+ return (0);
+
+ tmp2 = complete_ambiguous(file, g.gl_pathv, g.gl_matchc);
+ tmp = path_strip(tmp2, remote_path);
+ xfree(tmp2);
+
+ if (g.gl_matchc > 1) {
+ char *pwd = strrchr(g.gl_pathv[0], '/');
+ u_int len = 0;
+
+ if (pwd != NULL)
+ len = strlen(g.gl_pathv[0]) - strlen(pwd) + 1;
+
+ complete_display(g.gl_pathv, len);
+ }
+
+ globfree(...
2010 Feb 23
1
Compiling R on Linux with SunStudio 12.1: "wide-character type" problems (rt)
...c99 -xlibmil -m32 -xlibmieee -nofstore
-c platform.c -o platform.o
"/usr/include/glob.h", line 175: identifier redeclared: glob64
current : function(pointer to const char, int, pointer to function(..)
returning int, pointer to struct {unsigned int gl_pathc, pointer to pointer
to char gl_pathv, unsigned int gl_offs, int gl_flags, pointer to
function(..) returning void gl_closedir, pointer to function(..) returning
pointer to struct dirent64 {..} gl_readdir, pointer to function(..)
returning pointer to void gl_opendir, pointer to function(..) returning int
gl_lstat, pointer to function(.....
2002 Feb 14
1
HP/UX 11 bug
...glob(3) leaves it off matches) */
+ if (*(argv[*argc] + strlen(argv[*argc]) - 1) == '/')
+ trailing_slash = 1;
+
+ for (i = 0; i < (maxargs - (*argc)) && i < (int)globbuf.gl_pathc; i++) {
+ char *mpath;
if (i == 0) free(argv[*argc]);
- argv[(*argc) + i] = strdup(globbuf.gl_pathv[i]);
- if (!argv[(*argc) + i]) out_of_memory("glob_expand");
+ mpath = globbuf.gl_pathv[i];
+ /* pattern had a trailing '/' and this matching path does not */
+ if (trailing_slash && *mpath && (mpath[strlen(mpath) - 1] != '/')) {
+ argv[(*argc) + i] =...
2002 Jan 30
1
Quick sftp status indicator.
...===============================
RCS file: /cvs/src/usr.bin/ssh/sftp-int.c,v
retrieving revision 1.41
diff -u -r1.41 sftp-int.c
--- sftp-int.c 2001/12/19 07:18:56 1.41
+++ sftp-int.c 2002/01/29 23:16:32
@@ -382,7 +382,6 @@
err = -1;
goto out;
}
- printf("Fetching %s to %s\n", g.gl_pathv[0], abs_dst);
err = do_download(in, out, g.gl_pathv[0], abs_dst, pflag);
goto out;
}
@@ -464,7 +463,6 @@
}
abs_dst = make_absolute(abs_dst, pwd);
}
- printf("Uploading %s to %s\n", g.gl_pathv[0], abs_dst);
err = do_upload(in, out, g.gl_pathv[0], abs_dst, pflag);...
2010 May 05
2
[Bug 1767] New: Inconsistend wildcard expansion in 'ls *'
https://bugzilla.mindrot.org/show_bug.cgi?id=1767
Summary: Inconsistend wildcard expansion in 'ls *'
Product: Portable OpenSSH
Version: 5.5p1
Platform: All
OS/Version: All
Status: NEW
Severity: normal
Priority: P2
Component: sftp
AssignedTo: unassigned-bugs at mindrot.org
2002 Oct 18
1
Patch: sftp client support of "ls [flags] [path [localfile]]" feature
...;
+ FILE *fp1 = NULL;
memset(&g, 0, sizeof(g));
***************
*** 628,637 ****
if ((a->flags & SSH2_FILEXFER_ATTR_PERMISSIONS) &&
S_ISDIR(a->perm)) {
globfree(&g);
! return (do_ls_dir(conn, path, strip_path, lflag));
}
}
for (i = 0; g.gl_pathv[i]; i++) {
char *fname, *lname;
--- 651,675 ----
if ((a->flags & SSH2_FILEXFER_ATTR_PERMISSIONS) &&
S_ISDIR(a->perm)) {
globfree(&g);
! return (do_ls_dir(conn, path, strip_path, lflag, localpath));
}
}
+ if (localpath)
+ {
+ fp = fopen(loca...
2015 Jul 17
1
[PATCH] daemon: add a space after func/macro to fit code-style
...(node);
if (ret == TYPE_ERROR)
goto bad_type;
diff --git a/daemon/md.c b/daemon/md.c
index 08a17e3..06b5142 100644
--- a/daemon/md.c
+++ b/daemon/md.c
@@ -248,7 +248,7 @@ do_list_md_devices (void)
n = dev;
n = mempcpy (n, DEV, strlen (DEV));
- n = mempcpy (n, &mds.gl_pathv[i][strlen(PREFIX)], len);
+ n = mempcpy (n, &mds.gl_pathv[i][strlen (PREFIX)], len);
*n = '\0';
if (!is_raid_device (dev)) {
@@ -273,7 +273,7 @@ error:
}
char **
-do_md_detail(const char *md)
+do_md_detail (const char *md)
{
size_t i;
int r;
@@ -345,15 +345,15...
2002 Jan 18
0
[Bug 73] New: sftp segfaults on an attempt to up/download a nonexistent file
...ment
to a 'get' or 'put' command, sftp(1) fails to interpret correctly
the result of the glob(3) invocation. glob(3) does not return
an error (a non-zero exit), yet it does not return any meaningful
file names, either, so process_get() and process_put()'s attempts
to access the gl_pathv[] array fail miserably.
A trivial patch is posted in the audit-trail of the FreeBSD
problem report referenced by the URL above.
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
2002 Aug 18
0
SEGV on mget with wildcards with no match
...p> mget zqw*
Program received signal SIGSEGV, Segmentation fault.
0x804c5db in process_get (conn=0x80520e0, src=0x80540b0 "zwq*",
dst=0x0,
pwd=0x8052100 "/home/faculty/elf", pflag=0)
at
/usr/src/secure/usr.bin/sftp/../../../crypto/openssh/sftp-int.c:371
(gdb) p g.gl_pathv[0]
Error accessing memory address 0x0: Bad address.
2006 May 15
0
[PATCH 7/12] bugfix: openssh-4.3p2
...000000000 -0600
+++ openssh-4.3p2-kylie/sftp.c 2006-05-08 15:01:49.907239064 -0500
@@ -539,14 +539,15 @@ process_get(struct sftp_conn *conn, char
if (g.gl_matchc == 1 && dst) {
/* If directory specified, append filename */
if (is_dir(dst)) {
+ xfree(tmp);
if (infer_path(g.gl_pathv[0], &tmp)) {
err = 1;
goto out;
}
abs_dst = path_append(dst, tmp);
- xfree(tmp);
} else
abs_dst = xstrdup(dst);
+ xfree(tmp);
} else if (dst) {
abs_dst = path_append(dst, tmp);
xfree(tmp);
@@ -562,8 +563,6 @@ process_get(struct sftp_conn *conn, cha...
2012 Aug 30
1
Patch to allow glob patterns as authorized keys file names
...options.authorized_keys_files[i], pw);
- success = user_key_allowed2(pw, key, file);
+ glob(file, GLOB_NOCHECK, NULL, &glob_result);
+ for (j = 0; !success && j < glob_result.gl_pathc; j++) {
+ char *f = glob_result.gl_pathv[j];
+ success = user_key_allowed2(pw, key, f);
+ }
+ globfree(&glob_result);
xfree(file);
}