Message ID | 1405071380-13652-2-git-send-email-kraxel@redhat.com |
---|---|
State | New |
Headers | show |
Gerd Hoffmann <kraxel@redhat.com> writes: > Set auth to sasl when sasl is enabled, this makes "info spice" correctly > display sasl auth. Fixes SPICE_CHANNEL_EVENT_CONNECTED similarly, doesn't it? If yes, I'd recommend to note this in the commit message. > Also throw an error in case someone tries to set > a spice password via monitor without auth mode being "spice". > > Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Since the patch looks fine to me: Reviewed-by: Markus Armbruster <armbru@redhat.com>
On 11 July 2014 12:18, Markus Armbruster <armbru@redhat.com> wrote: > Gerd Hoffmann <kraxel@redhat.com> writes: > >> Set auth to sasl when sasl is enabled, this makes "info spice" correctly >> display sasl auth. > > Fixes SPICE_CHANNEL_EVENT_CONNECTED similarly, doesn't it? > > If yes, I'd recommend to note this in the commit message. > >> Also throw an error in case someone tries to set >> a spice password via monitor without auth mode being "spice". >> >> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> > > Since the patch looks fine to me: > > Reviewed-by: Markus Armbruster <armbru@redhat.com> Bit late now, given this is the pullreq; original patch was on list for review 2 July. thanks -- PMM
Peter Maydell <peter.maydell@linaro.org> writes: > On 11 July 2014 12:18, Markus Armbruster <armbru@redhat.com> wrote: >> Gerd Hoffmann <kraxel@redhat.com> writes: >> >>> Set auth to sasl when sasl is enabled, this makes "info spice" correctly >>> display sasl auth. >> >> Fixes SPICE_CHANNEL_EVENT_CONNECTED similarly, doesn't it? >> >> If yes, I'd recommend to note this in the commit message. >> >>> Also throw an error in case someone tries to set >>> a spice password via monitor without auth mode being "spice". >>> >>> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> >> >> Since the patch looks fine to me: >> >> Reviewed-by: Markus Armbruster <armbru@redhat.com> > > Bit late now, given this is the pullreq; original patch was on > list for review 2 July. I spotted the PULL in the subject right after I sent %-}
diff --git a/ui/spice-core.c b/ui/spice-core.c index 70df446..7bb91e6 100644 --- a/ui/spice-core.c +++ b/ui/spice-core.c @@ -741,6 +741,7 @@ void qemu_spice_init(void) error_report("spice: failed to enable sasl"); exit(1); } + auth = "sasl"; } if (qemu_opt_get_bool(opts, "disable-ticketing", 0)) { auth = "none"; @@ -894,6 +895,10 @@ static int qemu_spice_set_ticket(bool fail_if_conn, bool disconnect_if_conn) int qemu_spice_set_passwd(const char *passwd, bool fail_if_conn, bool disconnect_if_conn) { + if (strcmp(auth, "spice") != 0) { + return -1; + } + g_free(auth_passwd); auth_passwd = g_strdup(passwd); return qemu_spice_set_ticket(fail_if_conn, disconnect_if_conn);
Set auth to sasl when sasl is enabled, this makes "info spice" correctly display sasl auth. Also throw an error in case someone tries to set a spice password via monitor without auth mode being "spice". Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> --- ui/spice-core.c | 5 +++++ 1 file changed, 5 insertions(+)