search for: linelen

Displaying 20 results from an estimated 39 matches for "linelen".

2008 Nov 22
0
[patch] [vuxml] net/wireshark: fix DoS in SMTP dissector
...+ gboolean is_continuation_line; + int cmdlen; + fragment_data *frag_msg = NULL; +@@ -217,21 +214,6 @@ + * longer than what's in the buffer, so the "tvb_get_ptr()" call + * won't throw an exception. + */ +- linelen = tvb_find_line_end(tvb, offset, -1, &next_offset, +- smtp_desegment && pinfo->can_desegment); +- if (linelen == -1) { +- /* +- * We didn't find a line ending, and we're doing desegmentation; +- * tell the TCP dissector where the data for this message...
2020 Jul 14
3
[PATCH nbdkit RFC 0/2] curl: Implement authorization scripts.
This is an RFC only, at the very least it lacks tests. This implements a rather complex new feature in nbdkit-curl-plugin allowing you to specify an external shell script that can be used to fetch an authorization token for services which requires a token or cookie for access, especially if that token must be renewed periodically. The motivation can be seen in the changes to the docs in patch 2.
2012 Oct 18
10
[PATCH 0/10] Add a mini-library for running external commands.
Inspired by libvirt's virCommand* internal mini-library, this adds some internal APIs for running commands. The first patch contains the new APIs. The subsequent patches change various parts of the library over to use it. Rich.
2020 Jul 15
0
[PATCH nbdkit v2] curl: Implement header and cookie scripts.
...; +} + +/* This is called with the lock held when we must run or re-run the + * header-script. + */ +static int +run_header_script (struct curl_handle *h) +{ + int fd; + char tmpfile[] = "/tmp/errorsXXXXXX"; + FILE *fp; + CLEANUP_FREE char *cmd = NULL, *line = NULL; + size_t len = 0, linelen = 0, nr_headers = 0; + + assert (header_script != NULL); /* checked by caller */ + + /* Reset the list of headers. */ + curl_slist_free_all (headers_from_script); + headers_from_script = NULL; + + /* Create a temporary file for the errors so we can redirect them + * into nbdkit_error. + */...
2016 Jun 18
8
[PATCH 0/7] p2v: Multiple improvements to the look of virt-p2v.
In the run dialog, I have implemented an ANSI colour escape sequence interpreter, so that colours displayed by the remote virt-v2v are now shown to the user. (https://bugzilla.redhat.com/show_bug.cgi?id=1314244) This requires virt-v2v to send colours. It wasn't doing that because the output was a pipe (as we capture the output into the log file). So I added a global --colours option to make
2020 Jul 15
2
[PATCH nbdkit v2] curl: Implement header and cookie scripts.
Evolution of this patch series: https://www.redhat.com/archives/libguestfs/2020-July/thread.html#00073 Instead of auth-script, this implements header-script and cookie-script. It can be used for similar purposes but the implementation is somewhat saner. Rich.
2020 Jul 31
0
[RFC nbdkit PATCH 4/4] sh, eval: Add .list_exports support
...ugins/sh/methods.c +++ b/plugins/sh/methods.c @@ -225,6 +225,97 @@ struct sh_handle { int can_zero; }; +static int +parse_exports (const char *script, + const char *s, size_t slen, struct nbdkit_exports *exports) +{ + FILE *fp = NULL; + CLEANUP_FREE char *line = NULL; + size_t linelen = 0; + ssize_t len; + int ret = -1; + + fp = fmemopen ((void *) s, slen, "r"); + if (!fp) { + nbdkit_error ("%s: fmemopen: %m", script); + goto out; + } + + while ((len = getline (&line, &linelen, fp)) != -1) { + bool quoted = *line == '\''; +...
2020 Jul 14
0
[PATCH nbdkit RFC 2/2] curl: Implement authorization scripts.
...rn 0; +} + +/* This is called with the lock held when we must run or re-run the + * auth script. + */ +static int +run_auth_script (struct curl_handle *h) +{ + int fd; + char tmpfile[] = "/tmp/errorsXXXXXX"; + FILE *fp; + CLEANUP_FREE char *cmd = NULL, *line = NULL; + size_t len = 0, linelen = 0; + + assert (auth_script != NULL); /* checked by caller */ + + /* Reset the list of headers and cookies. */ + string_vector_iter (&script_headers, (void *) free); + string_vector_iter (&script_cookies, (void *) free); + string_vector_reset (&script_headers); + string_vector_re...
2020 May 01
1
[PATCH] WIP: ddrescue mapfile filter
...t64_t start; + int64_t end; + int64_t size; + char status; +}; + +struct mapfile { + int ranges_count; + struct range *ranges; +}; + +static struct mapfile map = { 0, NULL }; + +static int +parse_mapfile (const char *filename) +{ + FILE *fp = NULL; + CLEANUP_FREE char *line = NULL; + size_t linelen = 0; + ssize_t len; + int ret = -1; + int status_seen = 0; + + fp = fopen (filename, "r"); + if (!fp) { + nbdkit_error ("%s: ddrescue: fopen: %m", filename); + goto out; + } + + while ((len = getline (&line, &linelen, fp)) != -1) { + const char *delim = &...
2020 May 22
0
[PATCH] [v3] ddrescue mapfile filter
...t64_t start; + int64_t end; + int64_t size; + char status; +}; + +struct mapfile { + int ranges_count; + struct range *ranges; +}; + +static struct mapfile map = { 0, NULL }; + +static int +parse_mapfile (const char *filename) +{ + FILE *fp = NULL; + CLEANUP_FREE char *line = NULL; + size_t linelen = 0; + ssize_t len; + int ret = -1; + int status_seen = 0; + + fp = fopen (filename, "r"); + if (!fp) { + nbdkit_error ("%s: ddrescue: fopen: %m", filename); + goto out; + } + + while ((len = getline (&line, &linelen, fp)) != -1) { + const char *delim = &...
2020 May 22
0
[PATCH nbdkit] DDRESCUE: MISC FIXES
...t; - struct range *ranges; + ranges ranges; }; -static struct mapfile map = { 0, NULL }; +static struct mapfile map = { 0, empty_vector }; static int parse_mapfile (const char *filename) @@ -75,8 +77,6 @@ parse_mapfile (const char *filename) } while ((len = getline (&line, &linelen, fp)) != -1) { - const char *delim = " \t"; - char *sp, *p; int64_t offset, length; char status; @@ -95,7 +95,8 @@ parse_mapfile (const char *filename) continue; } - if (sscanf (line, "%" SCNi64 "\t%" SCNi64 "\t%c", &off...
2020 May 01
4
[PATCH] [v2] WIP: ddrescue mapfile filter
...t64_t start; + int64_t end; + int64_t size; + char status; +}; + +struct mapfile { + int ranges_count; + struct range *ranges; +}; + +static struct mapfile map = { 0, NULL }; + +static int +parse_mapfile (const char *filename) +{ + FILE *fp = NULL; + CLEANUP_FREE char *line = NULL; + size_t linelen = 0; + ssize_t len; + int ret = -1; + int status_seen = 0; + + fp = fopen (filename, "r"); + if (!fp) { + nbdkit_error ("%s: ddrescue: fopen: %m", filename); + goto out; + } + + while ((len = getline (&line, &linelen, fp)) != -1) { + const char *delim = &...
2020 May 22
3
[PATCH nbdkit] ddrescue: Miscellaneous fixes.
A few fixes and a possible enhancement to the ddrescue filter. If you think these are all OK, I will squash it into your patch and push it. Rich.
2016 May 30
2
[PATCH 0/2] p2v: Allow virt-p2v to be built with Gtk 2 or 3.
... and a small initial patch which makes it easier to test virt-p2v without having to start up a virtual machine. There is still a bug in Gtk 3 where the GtkTextView on the final (running) dialog ignores gtk_widget_set_size_request and so the window appears just a single pixel high. Rich.
2016 May 30
4
[PATCH v2 0/3] p2v: Allow virt-p2v to be built with Gtk 2 or 3.
This is basically the same as what I posted earlier today. The main difference is I split out the GDK thread sychronization (removal of) changes from the other Gtk 2/3 changes, which should make it a bit easier to review. Gtk 3 is still not quite perfect. Apart from the problem with the GtkTextView noted before, there are also vertical alignment and padding problems with labels in GtkGrid
2020 Jul 31
6
[RFC nbdkit PATCH 0/4] Progress towards .list_exports
This takes Rich's API proposal and starts fleshing it out with enough meat that I was able to test 'nbdkit eval' advertising multiple exports with descriptions paired with 'qemu-nbd --list'. Eric Blake (3): server: Add exports list functions server: Prepare to use export list from plugin sh, eval: Add .list_exports support Richard W.M. Jones (1): server: Implement
2008 Nov 13
69
[PATCH 00 of 38] xen: add more Xen dom0 support
Hi Ingo, Here''s the chunk of patches to add Xen Dom0 support (it''s probably worth creating a new xen/dom0 topic branch for it). A dom0 Xen domain is basically the same as a normal domU domain, but it has extra privileges to directly access hardware. There are two issues to deal with: - translating to and from the domain''s pseudo-physical addresses and real machine
2007 Apr 18
24
[patch 00/24] Xen-paravirt_ops: Xen guest implementation for paravirt_ops interface
Hi Andi, This patch series implements the Linux Xen guest as a paravirt_ops backend. The features in implemented this patch series are: * domU only * UP only (most code is SMP-safe, but there's no way to create a new vcpu) * writable pagetables, with late pinning/early unpinning (no shadow pagetable support) * supports both PAE and non-PAE modes * xen hvc console (console=hvc0) *
2007 Apr 18
24
[patch 00/24] Xen-paravirt_ops: Xen guest implementation for paravirt_ops interface
Hi Andi, This patch series implements the Linux Xen guest as a paravirt_ops backend. The features in implemented this patch series are: * domU only * UP only (most code is SMP-safe, but there's no way to create a new vcpu) * writable pagetables, with late pinning/early unpinning (no shadow pagetable support) * supports both PAE and non-PAE modes * xen hvc console (console=hvc0) *
2007 Apr 18
24
[patch 00/24] Xen-paravirt_ops: Xen guest implementation for paravirt_ops interface
Hi Andi, This patch series implements the Linux Xen guest as a paravirt_ops backend. The features in implemented this patch series are: * domU only * UP only (most code is SMP-safe, but there's no way to create a new vcpu) * writable pagetables, with late pinning/early unpinning (no shadow pagetable support) * supports both PAE and non-PAE modes * xen hvc console (console=hvc0) *