search for: mexp_close

Displaying 12 results from an estimated 12 matches for "mexp_close".

2014 Aug 11
2
[PATCH] p2v: check results of strndup and sscanf
...csize)) { case 100: /* Ephemeral port. */ port_str = strndup (&h->buffer[ovector[2]], ovector[3]-ovector[2]); - sscanf (port_str, "%d", remote_port); + if (port_str == NULL) { + set_ssh_error ("not enough memory for strndup"); + mexp_close (h); + return NULL; + } + if (sscanf (port_str, "%d", remote_port) != 1) { + set_ssh_error ("cannot extract the port number from '%s'", port_str); + mexp_close (h); + return NULL; + } break; case MEXP_EOF: -- 1.9.3
2014 Dec 11
1
[PATCH] p2v: show error dialog if virt-v2v fails (RHBZ#1167601)
...= -1) + if (mexp_printf (control_h, "; exit $(< %s/status)", remote_dir) == -1) goto printf_fail; if (mexp_printf (control_h, "\n") == -1) goto printf_fail; @@ -313,8 +314,18 @@ start_conversion (struct config *config, ret = 0; out: - if (control_h) - mexp_close (control_h); + if (control_h) { + if ((status = mexp_close (control_h)) == -1) { + set_conversion_error ("mexp_close: %m"); + ret = -1; + } else if (ret == 0 && + WIFEXITED (status) && + WEXITSTATUS (status) != 0) { + set_c...
2016 Jun 23
1
[PATCH] p2v: improve error message for sudo with password
...{ 0 } }, ovector, ovecsize)) { case 100: /* Got version string. */ @@ -546,6 +550,11 @@ test_connection (struct config *config) case 101: /* Got the prompt. */ goto end_of_version; + case 102: + mexp_close (h); + set_ssh_error ("sudo for user '%s' requires a password", config->username); + return -1; + case MEXP_EOF: mexp_close (h); set_ssh_error ("unexpected end of file waiting virt-v2v --version output"); -- 2.5.5
2016 Jun 30
4
[PATCH 0/4] p2v: Send ^C to remote end to cancel the conversion.
(I don't have a BZ# for this yet, but I'm expecting it to be filed as an RFE) Currently if the user is in the virt-p2v GUI and cancels the conversion, all that happens is we abruptly close the ssh session to virt-v2v. That is bad .. possibly (or maybe not). But in any case there is an alternative: we can send a ^C key to the virt-v2v process, which it could catch and handle gracefully,
2016 May 31
2
[PATCH] p2v: require a non-interative sudo (RHBZ#1340809)
...if (mexp_printf (h, "%svirt-v2v --version\n", - config->sudo ? "sudo " : "") == -1) { + config->sudo ? "sudo -n " : "") == -1) { set_ssh_error ("mexp_printf: %m"); mexp_close (h); return -1; -- 2.5.5
2017 Oct 11
1
[PATCH] p2v: Enable miniexpect debugging.
.../* Got password prompt. */ - if (mexp_printf (h, "%s\n", config->password) == -1) { + if (mexp_printf_password (h, "%s", config->password) == -1 || + mexp_printf (h, "\n") == -1) { set_ssh_mexp_error ("mexp_printf"); mexp_close (h); return NULL; @@ -658,6 +662,9 @@ scp_file (struct config *config, const char *target, const char *local, ...) set_ssh_internal_error ("scp: mexp_spawnv: %m"); return -1; } +#if DEBUG_STDERR + mexp_set_debug_file (h, stderr); +#endif /* We want the ssh Conn...
2017 Oct 11
1
[PATCH] p2v: Test for sudo requiring a password first (RHBZ#1500673).
...to end_of_version; - - case 102: + case 101: set_ssh_error ("sudo for user \"%s\" requires a password. Edit /etc/sudoers on the conversion server to ensure the \"NOPASSWD:\" option is set for this user.", config->username); mexp_close (h); return -1; + case 102: /* Got the prompt. */ + goto end_of_version; + case MEXP_EOF: set_ssh_unexpected_eof ("\"virt-v2v --version\" output"); mexp_close (h); -- 2.13.2
2019 Sep 10
3
[PATCH 0/2] Remove virt-p2v from libguestfs
Now that virt-p2v has its own repository [1] and releases [2], it is time to remove it from libguestfs. [1] https://github.com/libguestfs/virt-p2v [2] http://download.libguestfs.org/virt-p2v/ Pino Toscano (2): Remove virt-p2v Remove remaining virt-p2v bits .gitignore | 4 - Makefile.am | 7 +- bash/Makefile.am
2016 May 31
0
Re: [PATCH] p2v: require a non-interative sudo (RHBZ#1340809)
...gt; "%svirt-v2v --version\n", > - config->sudo ? "sudo " : "") == -1) { > + config->sudo ? "sudo -n " : "") == -1) { > set_ssh_error ("mexp_printf: %m"); > mexp_close (h); > return -1; ACK, but to be on the safe side shouldn't we also need to do the same thing for the 'virt-v2v --machine-readable' command, and also for the final virt-v2v command that runs from conversion.c:start_conversion? Rich. -- Richard Jones, Virtualization Group, Re...
2018 Jun 29
3
p2v: Various cleanups.
These are a prelude to fixing https://bugzilla.redhat.com/show_bug.cgi?id=1590220 A lot of the virt-p2v configuration code was duplicated manually. These changes make sure that most of it is generated. Rich.
2019 Jul 09
7
[PATCH 0/5] Split virt-p2v in own repository
Hi, as it was already discussed on this list, here it is my attempt in splitting virt-p2v in an own repository. Sadly there are things that must be copied from libguestfs, as it cannot be avoided. The approach taken was to run a script (will send separately) to just get the "p2v" subdirectory with its history as own repository, and then add in few followup commits all the bits needed
2015 Feb 14
2
[PATCH 0/2] Change guestfs__*
libguestfs has used double and triple underscores in identifiers. These aren't valid for global names in C++. (http://stackoverflow.com/a/228797) These large but completely mechanical patches change the illegal identifiers to legal ones. Rich.