search for: set_ssh_error

Displaying 15 results from an estimated 15 matches for "set_ssh_error".

2014 Aug 11
2
[PATCH] p2v: check results of strndup and sscanf
...al_port, int *remote_port) }, ovector, ovecsize)) { 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; +...
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 May 31
2
[PATCH] p2v: require a non-interative sudo (RHBZ#1340809)
...@@ test_connection (struct config *config) */ 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
2019 Dec 03
7
[p2v PATCH 0/6] Use GLib a bit more
In an effort to reduce the code, start to use few bits of GLib: - replace the gnulib c-type module - replace the gnulib getprogname module - use g_spawn_sync to launch curl, and drop a file reading function Pino Toscano (6): Include glib.h in p2v.h Use g_ascii_isspace instead of c_isspace from gnulib Use g_get_prgname instead of getprogname from gnulib build: remove no more used gnulib
2016 May 31
0
Re: [PATCH] p2v: require a non-interative sudo (RHBZ#1340809)
...nfig *config) > */ > 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; 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?...
2017 Oct 11
1
[PATCH] p2v: Test for sudo requiring a password first (RHBZ#1500673).
...}, ovector, ovecsize)) { case 100: /* Got version string. */ @@ -805,15 +805,15 @@ test_connection (struct config *config) #endif break; - case 101: /* Got the prompt. */ - goto 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 t...
2015 Nov 16
0
[PATCH] p2v: Send physical server 'dmesg' output to debug dir on conversion server.
...quot;cat > '%s/dmesg' << '__%s__'\n" + "%s" + "\n" + "__%s__\n", + remote_dir, magic, + dmesg, + magic) == -1) { + set_ssh_error ("mexp_printf: %m"); + goto error; + } + + if (wait_for_prompt (h) == -1) + goto error; + } + return h; error: diff --git a/p2v/virt-p2v.pod b/p2v/virt-p2v.pod index be6b015..1d1b41c 100644 --- a/p2v/virt-p2v.pod +++ b/p2v/virt-p2v.pod @@ -628,6 +628,14 @@ Into thi...
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,
2015 Aug 25
4
[PATCH 0/4] Various p2v fixes and features
A mixed bag, but all the patches make sense together! Patch 1: Fix a bug that Tingting found: https://bugzilla.redhat.com/show_bug.cgi?id=1256222 Patch 2: Revert a patch that makes no sense now that we've added virt-v2v into base RHEL. This is just included because it's a cleanup needed before applying patch 3. Patch 3: Add the ability to use SSH identities (private keys) for virt-p2v
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
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
2015 Aug 27
5
[PATCH v2 0/4] p2v: Wait for network to come online before testing connection
Fixes https://bugzilla.redhat.com/1256222
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.
2016 Apr 04
2
[PATCH 1/2] Use 'error' function consistently throughout.
.../p2v/ssh.c index 6aeafd7..6ddfcb2 100644 --- a/p2v/ssh.c +++ b/p2v/ssh.c @@ -45,6 +45,7 @@ #include <inttypes.h> #include <unistd.h> #include <errno.h> +#include <error.h> #include <locale.h> #include <assert.h> #include <libintl.h> @@ -78,11 +79,9 @@ set_ssh_error (const char *fs, ...) len = vasprintf (&msg, fs, args); va_end (args); - if (len < 0) { - perror ("vasprintf"); - fprintf (stderr, "original error format string: %s\n", fs); - exit (EXIT_FAILURE); - } + if (len < 0) + error (EXIT_FAILURE, errno,...
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.