[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 07/14] qapi: Introduce change-vnc-password
From: |
Luiz Capitulino |
Subject: |
[Qemu-devel] [PATCH 07/14] qapi: Introduce change-vnc-password |
Date: |
Wed, 18 Jan 2012 15:41:17 -0200 |
New QMP command to change the VNC password.
Signed-off-by: Anthony Liguori <address@hidden>
Signed-off-by: Luiz Capitulino <address@hidden>
Signed-off-by: Luiz Capitulino <address@hidden>
---
qapi-schema.json | 14 ++++++++++++++
qmp-commands.hx | 6 ++++++
qmp.c | 7 +++++++
3 files changed, 27 insertions(+), 0 deletions(-)
diff --git a/qapi-schema.json b/qapi-schema.json
index 42682eb..fe935a9 100644
--- a/qapi-schema.json
+++ b/qapi-schema.json
@@ -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'} }
diff --git a/qmp-commands.hx b/qmp-commands.hx
index 185beba..886d589 100644
--- a/qmp-commands.hx
+++ b/qmp-commands.hx
@@ -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,
+ },
diff --git a/qmp.c b/qmp.c
index 8b7b379..f218485 100644
--- a/qmp.c
+++ b/qmp.c
@@ -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);
+ }
+}
--
1.7.9.rc0.dirty
- [Qemu-devel] [PULL 00/14]: QMP queue, Luiz Capitulino, 2012/01/18
- [Qemu-devel] [PATCH 02/14] qapi: Convert set_password, Luiz Capitulino, 2012/01/18
- [Qemu-devel] [PATCH 01/14] vnc: Simplify vnc_display_password(), Luiz Capitulino, 2012/01/18
- [Qemu-devel] [PATCH 03/14] qapi: Convert expire_password, Luiz Capitulino, 2012/01/18
- [Qemu-devel] [PATCH 05/14] qapi: Convert eject, Luiz Capitulino, 2012/01/18
- [Qemu-devel] [PATCH 04/14] block: eject_device(): Use error_set(), Luiz Capitulino, 2012/01/18
- [Qemu-devel] [PATCH 06/14] monitor: expose readline state, Luiz Capitulino, 2012/01/18
- [Qemu-devel] [PATCH 07/14] qapi: Introduce change-vnc-password,
Luiz Capitulino <=
- [Qemu-devel] [PATCH 08/14] qerror: Extend QERR_DEVICE_ENCRYPTED, Luiz Capitulino, 2012/01/18
- [Qemu-devel] [PATCH 09/14] qapi: Convert change, Luiz Capitulino, 2012/01/18
- [Qemu-devel] [PATCH 10/14] qapi: Convert block_set_io_throttle, Luiz Capitulino, 2012/01/18
- [Qemu-devel] [PATCH 13/14] qerror: restore alphabetical order over qerrors, Luiz Capitulino, 2012/01/18
- [Qemu-devel] [PATCH 14/14] block: use proper qerrors in qmp_block_resize, Luiz Capitulino, 2012/01/18
- [Qemu-devel] [PATCH 12/14] qerror: add check-qerror.sh to verify alphabetical order, Luiz Capitulino, 2012/01/18
- [Qemu-devel] [PATCH 11/14] qmp: Add missing gcc format attribute and fix format string, Luiz Capitulino, 2012/01/18
- Re: [Qemu-devel] [PULL 00/14]: QMP queue, Anthony Liguori, 2012/01/19