search for: globfree

Displaying 20 results from an estimated 29 matches for "globfree".

2002 Oct 18
1
Patch: sftp client support of "ls [flags] [path [localfile]]" feature
...lflag, char* localpath) { glob_t g; int i; Attrib *a; struct stat sb; + FILE *fp = NULL; + 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...
2002 Feb 14
1
HP/UX 11 bug
...do any harm on Solaris or Linux and fixes the problem on HP. Cheers, Mark --- util.c.OLD Tue Jan 29 15:25:08 2002 +++ util.c Tue Jan 29 15:30:03 2002 @@ -542,6 +542,7 @@ return; #else extern int sanitize_paths; + int trailing_slash = 0; glob_t globbuf; int i; @@ -559,10 +560,25 @@ globfree(&globbuf); return; } - for (i=0; i<(maxargs - (*argc)) && i < (int) globbuf.gl_pathc;i++) { + + /* remember pattern's trailing '/' (HP/UX glob(3) leaves it off matches) */ + if (*(argv[*argc] + strlen(argv[*argc]) - 1) == '/') + trailing_slash = 1; + + fo...
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
2016 Jul 07
0
[PATCH 2/2] daemon: fix cleanup of stringsbuf usages
...int eerrno) static char ** get_devices (const char *pattern) { - DECLARE_STRINGSBUF (ret); + CLEANUP_FREE_STRINGSBUF DECLARE_STRINGSBUF (ret); glob_t devs; int err; size_t i; @@ -76,12 +76,10 @@ get_devices (const char *pattern) if (end_stringsbuf (&ret) == -1) goto error; globfree (&devs); - return ret.argv; + return take_stringsbuf (&ret); error: globfree (&devs); - if (ret.argv != NULL) - free_stringslen (ret.argv, ret.size); return NULL; } @@ -176,7 +174,7 @@ parse_json (const char *json, const char *func) static char ** json_value_to_stri...
2017 Jul 14
0
[PATCH 13/27] daemon: Reimplement ‘list_ldm_(volumes|partitions)’ APIs in OCaml.
...rned GLOB_ABORTED: " - "rerun with LIBGUESTFS_DEBUG=1"); - goto error; - } - - for (i = 0; i < devs.gl_pathc; ++i) { - if (add_string (&ret, devs.gl_pathv[i]) == -1) - goto error; - } - - if (end_stringsbuf (&ret) == -1) goto error; - - globfree (&devs); - return take_stringsbuf (&ret); - - error: - globfree (&devs); - - return NULL; -} - -/* All device mapper devices called /dev/mapper/ldm_vol_*. XXX We - * could tighten this up in future if ldmtool had a way to read these - * names back after they have been created. - */...
2016 Jul 07
2
[PATCH 1/2] daemon: free the string on stringsbuf add failure
If add_string_nodup fails free the passed string instead of leaking it, as that string would have been owned by the stringbuf. Adapt few places to this behaviour. --- daemon/btrfs.c | 4 +--- daemon/devsparts.c | 8 ++++---- daemon/guestfsd.c | 1 + 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/daemon/btrfs.c b/daemon/btrfs.c index 9b52aa8..d70565a 100644 ---
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
2019 Jan 25
0
[klibc:update-dash] expand: Fix glibc glob(3) support
...sr/dash/expand.c @@ -1205,7 +1205,8 @@ expandmeta(str, flag) ckfree(p); switch (i) { case 0: - if (!(pglob.gl_flags & GLOB_MAGCHAR)) + if ((pglob.gl_flags & (GLOB_NOMAGIC | GLOB_NOCHECK)) == + (GLOB_NOMAGIC | GLOB_NOCHECK)) goto nometa2; addglob(&pglob); globfree(&pglob);
2020 Mar 28
0
[klibc:update-dash] dash: expand: Fix glibc glob(3) support
...sr/dash/expand.c @@ -1205,7 +1205,8 @@ expandmeta(str, flag) ckfree(p); switch (i) { case 0: - if (!(pglob.gl_flags & GLOB_MAGCHAR)) + if ((pglob.gl_flags & (GLOB_NOMAGIC | GLOB_NOCHECK)) == + (GLOB_NOMAGIC | GLOB_NOCHECK)) goto nometa2; addglob(&pglob); globfree(&pglob);
2006 May 15
0
[PATCH 7/12] bugfix: openssh-4.3p2
..._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); return(err); }
2012 Aug 30
1
Patch to allow glob patterns as authorized keys file names
...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); }
2013 May 25
0
R in the browser ...
...al filesystem" for the JS code was populated with the contents of /usr/local/lib/R which I trimmed down a bit to get rid of stuff that wasn't going to work. - The emscripten libc implementation is incomplete so I had to stub out some functions that are probably quite important - glob() and globfree(). That really needs to be fixed! I also stubbed out __locale_mb_cur_max to return some value or other, as I wasn't sure where it was supposed to come from, and I was getting tired. At the moment all compiler optimisations are turned off, which makes a big difference to code size and performan...
2006 Apr 01
0
sftp tab completion patch (First release - NOT FOR INCLUDING YET)
..., 0, sizeof(g)); + snprintf(tmp, len, "%s*", file); + if (remote == LOCAL) + glob(tmp, GLOB_DOOFFS, NULL, &g); + else + remote_glob(conn, tmp, 0, NULL, &g); + + xfree(tmp); + + if (g.gl_matchc == 0) + return (0); + + tmp = complete_ambiguous(file, g.gl_pathv, g.gl_matchc); + globfree(&g); + if (tmp != NULL && strlen(tmp) > strlen(file)) { + if (el_insertstr(el, tmp + strlen(file)) == -1) + fatal("el_insertstr failed."); + xfree(tmp); + } + return (g.gl_matchc); +} + +unsigned char +complete(EditLine *el, int ch) +{ + const LineInfo *lf; + size_t len...
2007 Dec 12
0
Revisiting sftp tab completion patch
....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(&g); + if (tmp != NULL) { + if (strlen(tmp) > strlen(file)) { + char *ap, *tmp2 = tmp + strlen(file); + u_int len = strlen(tmp2); + + while ((ap = strsep(&tmp2, " ")) != NULL) { + if (strlen(ap) > 0) { + if (el_insertstr(el, ap) == -1) + fatal("el_i...
2011 Nov 11
3
[PATCH v2] Add mdadm-create, list-md-devices APIs.
This adds the mdadm-create API for creating RAID devices, and includes various fixes for the other two patches. Rich.
2015 Sep 11
11
[Bug 2463] New: Conflict with openbsd compat glob() function in shared libraries
https://bugzilla.mindrot.org/show_bug.cgi?id=2463 Bug ID: 2463 Summary: Conflict with openbsd compat glob() function in shared libraries Product: Portable OpenSSH Version: 7.1p1 Hardware: Other OS: Linux Status: NEW Severity: enhancement Priority: P5 Component:
2012 Mar 13
2
[PATCH 0/2] 'int' to 'size_t' changes
These two patches are probably not completely independent, but separating them is a lot of work. With *both* patches applied, all the tests and extra-tests pass. That's no guarantee however that there isn't a mistake, so I don't think this patch is a candidate for the 1.16 branch, until it's had a lot more testing in development. Rich.
2017 Jun 05
19
[PATCH v3 00/19] Allow APIs to be implemented in OCaml.
v2 was here: https://www.redhat.com/archives/libguestfs/2017-June/msg00008.html This series gets as far as a working (and faster) reimplementation of ‘guestfs_list_filesystems’. I also have another patch series on top of this one which reimplements the inspection APIs inside the daemon, but that needs a bit more work still, since inspection turns out to be a very large piece of code. Rich.
2017 Jul 27
23
[PATCH v3 00/23] Reimplement many daemon APIs in OCaml.
I think this fixes everything mentioned: - Added the Optgroups module as suggested. - Remove command temporary files. - Replace command ~flags with ?fold_stdout_on_stderr. - Nest _with_mounted function. - Rebase & retest. Rich.
2017 Jul 21
27
[PATCH v2 00/23] Reimplement many daemon APIs in OCaml.
v1 was posted here: https://www.redhat.com/archives/libguestfs/2017-July/msg00098.html This series now depends on two small patches which I posted separately: https://www.redhat.com/archives/libguestfs/2017-July/msg00207.html https://www.redhat.com/archives/libguestfs/2017-July/msg00209.html v1 -> v2: - Previously changes to generator/daemon.ml were made incrementally through the patch