All of lore.kernel.org
 help / color / mirror / Atom feed
From: Markus Armbruster <armbru@redhat.com>
To: Fabian Ebner <f.ebner@proxmox.com>
Cc: w.bumiller@proxmox.com, berrange@redhat.com,
	qemu-devel@nongnu.org, dgilbert@redhat.com,
	marcandre.lureau@gmail.com, kraxel@redhat.com,
	pbonzini@redhat.com, marcandre.lureau@redhat.com,
	eblake@redhat.com, t.lamprecht@proxmox.com
Subject: Re: [PATCH v9 3/3] qapi/monitor: allow VNC display id in set/expire_password
Date: Fri, 25 Feb 2022 13:44:39 +0100	[thread overview]
Message-ID: <87wnhjjetk.fsf@pond.sub.org> (raw)
In-Reply-To: <39e1b9b4-d82b-4efc-2a5d-9ce904ecbffe@proxmox.com> (Fabian Ebner's message of "Fri, 25 Feb 2022 13:23:00 +0100")

Fabian Ebner <f.ebner@proxmox.com> writes:

> Am 25.02.22 um 12:34 schrieb Markus Armbruster:
>> Fabian Ebner <f.ebner@proxmox.com> writes:
>> 
>>> From: Stefan Reiter <s.reiter@proxmox.com>
>>>
>>> It is possible to specify more than one VNC server on the command line,
>>> either with an explicit ID or the auto-generated ones à la "default",
>>> "vnc2", "vnc3", ...
>>>
>>> It is not possible to change the password on one of these extra VNC
>>> displays though. Fix this by adding a "display" parameter to the
>>> "set_password" and "expire_password" QMP and HMP commands.
>>>
>>> For HMP, the display is specified using the "-d" value flag.
>>>
>>> For QMP, the schema is updated to explicitly express the supported
>>> variants of the commands with protocol-discriminated unions.
>>>
>>> Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
>>> [FE: update "Since: " from 6.2 to 7.0
>>>      make @connected a common member of @SetPasswordOptions]
>>> Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
>> 
>> [...]
>> 
>>> diff --git a/qapi/ui.json b/qapi/ui.json
>>> index e112409211..4a13f883a3 100644
>>> --- a/qapi/ui.json
>>> +++ b/qapi/ui.json
>>> @@ -38,20 +38,47 @@
>>>    'data': [ 'keep', 'fail', 'disconnect' ] }
>>>  
>>>  ##
>>> -# @set_password:
>>> +# @SetPasswordOptions:
>>>  #
>>> -# Sets the password of a remote display session.
>>> +# Options for set_password.
>>>  #
>>>  # @protocol: - 'vnc' to modify the VNC server password
>>>  #            - 'spice' to modify the Spice server password
>>>  #
>>>  # @password: the new password
>>>  #
>>> -# @connected: how to handle existing clients when changing the
>>> -#             password.  If nothing is specified, defaults to 'keep'
>>> -#             'fail' to fail the command if clients are connected
>>> -#             'disconnect' to disconnect existing clients
>>> -#             'keep' to maintain existing clients
>>> +# @connected: How to handle existing clients when changing the
>>> +#             password. If nothing is specified, defaults to 'keep'.
>>> +#             For VNC, only 'keep' is currently implemented.
>>> +#
>>> +# Since: 7.0
>>> +#
>>> +##
>>> +{ 'union': 'SetPasswordOptions',
>>> +  'base': { 'protocol': 'DisplayProtocol',
>>> +            'password': 'str',
>>> +            '*connected': 'SetPasswordAction' },
>>> +  'discriminator': 'protocol',
>>> +  'data': { 'vnc': 'SetPasswordOptionsVnc' } }
>>> +
>>> +##
>>> +# @SetPasswordOptionsVnc:
>>> +#
>>> +# Options for set_password specific to the VNC procotol.
>>> +#
>>> +# @display: The id of the display where the password should be changed.
>>> +#           Defaults to the first.
>> 
>> Is this default equivalent to any value?  "The first" suggests it's not.
>> 
>
> The value will be NULL and QTAILQ_FIRST(&vnc_displays) is picked, which
> means the display defaults to the first display. But yeah, the value
> doesn't actually default to the id of the first display, it just behaves
> as if it did.

QAPI lets you give "absent" a meaning different from any value (because
it lets you distinguish "absent" from any value).  I prefer not to make
use of it.  But it's not wrong.  My Acked-by stands.



  reply	other threads:[~2022-02-25 12:59 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-25  8:49 [PATCH v9 0/3] VNC-related HMP/QMP fixes Fabian Ebner
2022-02-25  8:49 ` [PATCH v9 1/3] monitor/hmp: add support for flag argument with value Fabian Ebner
2022-02-25  8:49 ` [PATCH v9 2/3] qapi/monitor: refactor set/expire_password with enums Fabian Ebner
2022-02-25  8:49 ` [PATCH v9 3/3] qapi/monitor: allow VNC display id in set/expire_password Fabian Ebner
2022-02-25 11:34   ` Markus Armbruster
2022-02-25 12:23     ` Fabian Ebner
2022-02-25 12:44       ` Markus Armbruster [this message]
2022-03-01 11:29   ` Dr. David Alan Gilbert
2022-03-02 11:26 ` [PATCH v9 0/3] VNC-related HMP/QMP fixes Dr. David Alan Gilbert

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87wnhjjetk.fsf@pond.sub.org \
    --to=armbru@redhat.com \
    --cc=berrange@redhat.com \
    --cc=dgilbert@redhat.com \
    --cc=eblake@redhat.com \
    --cc=f.ebner@proxmox.com \
    --cc=kraxel@redhat.com \
    --cc=marcandre.lureau@gmail.com \
    --cc=marcandre.lureau@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=t.lamprecht@proxmox.com \
    --cc=w.bumiller@proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.