aboutsummaryrefslogtreecommitdiff
path: root/hmp-commands.hx
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2010-10-07 12:22:54 +0200
committerGerd Hoffmann <kraxel@redhat.com>2010-12-09 14:23:25 +0100
commit7572150c189c6553c2448334116ab717680de66d (patch)
treed7f9abaab43ac4df0385b5a45e0d768d3682fc31 /hmp-commands.hx
parent3c9405a0f7d76602415b3cbe8d52d7714b6ce5af (diff)
downloadqemu-7572150c189c6553c2448334116ab717680de66d.zip
qemu-7572150c189c6553c2448334116ab717680de66d.tar.gz
qemu-7572150c189c6553c2448334116ab717680de66d.tar.bz2
vnc/spice: add set_passwd monitor command.
This patch adds new set_password and expire_password monitor commands which allows to change and expire the password for spice and vnc connections. See the doc update patch chunk for details. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'hmp-commands.hx')
-rw-r--r--hmp-commands.hx54
1 files changed, 54 insertions, 0 deletions
diff --git a/hmp-commands.hx b/hmp-commands.hx
index 23024ba..f0ae3b9 100644
--- a/hmp-commands.hx
+++ b/hmp-commands.hx
@@ -1135,6 +1135,60 @@ Set the encrypted device @var{device} password to @var{password}
ETEXI
{
+ .name = "set_password",
+ .args_type = "protocol:s,password:s,connected:s?",
+ .params = "protocol password action-if-connected",
+ .help = "set spice/vnc password",
+ .user_print = monitor_user_noop,
+ .mhandler.cmd_new = set_password,
+ },
+
+STEXI
+@item set_password [ vnc | spice ] password [ action-if-connected ]
+@findex set_password
+
+Change spice/vnc password. Use zero to make the password stay valid
+forever. @var{action-if-connected} specifies what should happen in
+case a connection is established: @var{fail} makes the password change
+fail. @var{disconnect} changes the password and disconnects the
+client. @var{keep} changes the password and keeps the connection up.
+@var{keep} is the default.
+ETEXI
+
+ {
+ .name = "expire_password",
+ .args_type = "protocol:s,time:s",
+ .params = "protocol time",
+ .help = "set spice/vnc password expire-time",
+ .user_print = monitor_user_noop,
+ .mhandler.cmd_new = expire_password,
+ },
+
+STEXI
+@item expire_password [ vnc | spice ] expire-time
+@findex expire_password
+
+Specify when a password for spice/vnc becomes
+invalid. @var{expire-time} accepts:
+
+@table @var
+@item now
+Invalidate password instantly.
+
+@item never
+Password stays valid forever.
+
+@item +nsec
+Password stays valid for @var{nsec} seconds starting now.
+
+@item nsec
+Password is invalidated at the given time. @var{nsec} are the seconds
+passed since 1970, i.e. unix epoch.
+
+@end table
+ETEXI
+
+ {
.name = "info",
.args_type = "item:s?",
.params = "[subcommand]",