In data martedì 31 maggio 2016 11:23:06, Richard W.M. Jones ha scritto:
On Tue, May 31, 2016 at 12:06:15PM +0200, Pino Toscano wrote:
> Run sudo with -n (non-interactive), so it will fail right away when not
> configured to not require a password. This will avoid the connection to
> time out.
> ---
> p2v/ssh.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/p2v/ssh.c b/p2v/ssh.c
> index b432cbd..c6bf306 100644
> --- a/p2v/ssh.c
> +++ b/p2v/ssh.c
> @@ -490,7 +490,7 @@ 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;
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?
Makes sense indeed -- added in the other two places, and pushed.
Thanks,
--
Pino Toscano