From 9acacdff7ac1384e8a7207436ca2dd132d2a308f Mon Sep 17 00:00:00 2001
Message-Id: <9acacdff7ac1384e8a7207436ca2dd132d2a308f.1344942021.git.minovotn@redhat.com>
From: Michal Novotny <minovotn@redhat.com>
Date: Wed, 25 Jul 2012 11:57:05 +0200
Subject: [PATCH] qemu-options.hx: Fix set_password and expire_password
 description

RH-Author: Michal Novotny <minovotn@redhat.com>
Message-id: <0791f4769c8212c355bef1f9163d193608f46d0e.1343217361.git.minovotn@redhat.com>
Patchwork-id: 40402
O-Subject: [RHEL-6.4 qemu-kvm PATCH v3] qemu-options.hx: Fix set_password and expire_password description
Bugzilla: 813633
RH-Acked-by: Amos Kong <akong@redhat.com>
RH-Acked-by: Miroslav Rezanina <mrezanin@redhat.com>
RH-Acked-by: Pavel Hrdina <phrdina@redhat.com>

Bugzilla: 813633
Upstream commit: 86ee5bc304249da960e7e8b9b567583960745993
                ( + Red Hat specific hunk as not applicable for upstream )

The description for set_password and expire_password commands is
incomplete. This patch fixes the man page that is being generated
to match the real behaviour of these functions.

Signed-off-by: Michal Novotny <minovotn@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
---
 qemu-options.hx |   23 +++++++++++++++++++++--
 1 file changed, 21 insertions(+), 2 deletions(-)

Signed-off-by: Michal Novotny <minovotn@redhat.com>
---
 qemu-options.hx | 23 +++++++++++++++++++++--
 1 file changed, 21 insertions(+), 2 deletions(-)

diff --git a/qemu-options.hx b/qemu-options.hx
index f10fa32..75b2f88 100644
--- a/qemu-options.hx
+++ b/qemu-options.hx
@@ -732,8 +732,27 @@ is a TCP port number, not a display number.
 @item password
 
 Require that password based authentication is used for client connections.
-The password must be set separately using the @code{change} command in the
-@ref{pcsys_monitor}
+
+The password must be set separately using the @code{set_password} command in
+the @ref{pcsys_monitor}. The syntax to change your password is:
+@code{set_password <protocol> <password>} where <protocol> could be either
+"vnc" or "spice".
+
+If you would like to change <protocol> password expiration, you should use
+@code{expire_password <protocol> <expiration-time>} where expiration time could
+be one of the following options: now, never, +seconds or UNIX time of
+expiration, e.g. +60 to make password expire in 60 seconds, or 1335196800
+to make password expire on "Mon Apr 23 12:00:00 EDT 2012" (UNIX time for this
+date and time).
+
+You can also use keywords "now" or "never" for the expiration time to
+allow <protocol> password to expire immediately or never expire.
+
+Alternatively, you could use @code{__com.redhat_set_password <protocol> <password> <expiration>}
+command to set password and expiration which is the Red Hat preferred way of
+setting password - however in this case the <expiration> parameter is integer
+so to disable password expiration entirely (similar to setting up expiration
+to "never" with @code{set_password} command) you can use value 0 instead.
 
 @item tls
 
-- 
1.7.11.2

