Re: [libvirt] PATCH: Support VNC password for QEMU guests

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Jan 20, 2009 at 11:08:56PM +0000, Daniel P. Berrange wrote:
[..snip..] 
> +static int
> +qemudInitPasswords(virConnectPtr conn,
> +                   virDomainObjPtr vm) {
> +    char *info = NULL;
> +
> +    /*
> +     * NB: Might have more passwords to set in the future. eg a qcow
> +     * disk decryption password, but there's no monitor command
> +     * for that yet...
> +     */
> +
> +    if (vm->def->graphics &&
> +        vm->def->graphics->type == VIR_DOMAIN_GRAPHICS_TYPE_VNC &&
> +        vm->def->graphics->data.vnc.passwd) {
> +
> +        if (qemudMonitorCommandExtra(vm, "change vnc password",
> +                                     vm->def->graphics->data.vnc.passwd,
> +                                     QEMU_PASSWD_PROMPT,
> +                                     &info) < 0) {
> +            qemudReportError(conn, NULL, NULL, VIR_ERR_INTERNAL_ERROR,
> +                             "%s", _("resume operation failed"));
				         \--- cut'n'paste?

> +            return -1;
> +        }
> +        VIR_FREE(info);
> +    }
> +
> +    return 0;
> +}
 -- Guido

--
Libvir-list mailing list
Libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]