sim-card
/
qemu
Archived
10
0
Fork 0

qapi: Introduce change-vnc-password

New QMP command to change the VNC password.

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>

Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
This commit is contained in:
Luiz Capitulino 2011-12-08 11:45:55 -02:00
parent 7060b478d3
commit 270b243f91
3 changed files with 27 additions and 0 deletions

View File

@ -1352,3 +1352,17 @@
# Since: 0.14.0
##
{ 'command': 'eject', 'data': {'device': 'str', '*force': 'bool'} }
##
# @change-vnc-password:
#
# Change the VNC server password.
#
# @target: the new password to use with VNC authentication
#
# Since: 1.1
#
# Notes: An empty password in this command will set the password to the empty
# string. Existing clients are unaffected by executing this command.
##
{ 'command': 'change-vnc-password', 'data': {'password': 'str'} }

View File

@ -2018,3 +2018,9 @@ EQMP
.args_type = "path:s,property:s",
.mhandler.cmd_new = qmp_qom_get,
},
{
.name = "change-vnc-password",
.args_type = "password:s",
.mhandler.cmd_new = qmp_marshal_input_change_vnc_password,
},

7
qmp.c
View File

@ -343,3 +343,10 @@ void qmp_expire_password(const char *protocol, const char *whenstr,
error_set(errp, QERR_INVALID_PARAMETER, "protocol");
}
void qmp_change_vnc_password(const char *password, Error **errp)
{
if (vnc_display_password(NULL, password) < 0) {
error_set(errp, QERR_SET_PASSWD_FAILED);
}
}