search for: path_append

Displaying 5 results from an estimated 5 matches for "path_append".

2003 Oct 01
1
3.7.1p2 sftp recurse patch
...Couldn't gather list of remote files"); + goto END; + } + + for (n = 0; d[n] != NULL; n++) { + /* Skip '.' and '..' */ + if ((strcmp(d[n]->filename, ".") == 0) || + (strcmp(d[n]->filename, "..") == 0)) + continue; + remote_tmp = path_append(remote_path, d[n]->filename); + local_tmp = path_append(local_path, d[n]->filename); + err = do_recursive_download(conn, remote_tmp, + local_tmp, pflag); + xfree(remote_tmp); + xfree(local_tmp); + if (err == -1) + break; + } + free_sftp_dirents(d); + } else + err = do_downl...
2006 May 15
0
[PATCH 7/12] bugfix: openssh-4.3p2
...500 @@ -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, char out: xfree(abs_src); - if (abs_dst) - xfree(abs_dst); globfree(&g);...
2006 Nov 02
0
ssh strlen fixes
The following diffs fix negative index array accesses. For the path_append diff, if the first path is empty the second path is just duplicated without a '/'. Is this correct? -Ray- Index: misc.c =================================================================== RCS file: /home/ray/openbsd/src/usr.bin/ssh/misc.c,v retrieving revision 1.64 diff -u -p -r1.64 misc...
2001 Jul 25
1
[PATCH]: sftp: Avoid paths beginning with "//"
...way. Thanks, Corinna Index: sftp-int.c =================================================================== RCS file: /cvs/openssh_cvs/sftp-int.c,v retrieving revision 1.27 diff -u -p -r1.27 sftp-int.c --- sftp-int.c 2001/07/14 02:19:37 1.27 +++ sftp-int.c 2001/07/25 08:44:29 @@ -204,7 +204,8 @@ path_append(char *p1, char *p2) ret = xmalloc(len); strlcpy(ret, p1, len); - strlcat(ret, "/", len); + if (strcmp(p1, "/") != 0) + strlcat(ret, "/", len); strlcat(ret, p2, len); return(ret); Index: sftp-server.c =======================================================...
2003 Oct 13
1
Problem in sftp 'ls' command output
...stdin), TIOCGWINSZ, &ws) != -1) width = ws.ws_col; columns = width / (m + 2); columns = MAX(columns, 1); colspace = width / columns; } -------- which aims to compute the column width and column spacing. But when printing, a few lines below, we perform : -------- tmp = path_append(path, d[n]->filename); fname = path_strip(tmp, strip_path); xfree(tmp); if (lflag & LONG_VIEW) { /* irrelevant code */ } else { printf("%-*s", colspace, fname); if (c >= columns) { printf("\n"); c = 1; } else c++; } -------- What it boils down is tha...