Skip to contentSkip to conversation

spice: auth fixes

GIT PULL Applied Gerd Hoffmann 3 participants 6 messages Jul 11, 2014

lore
Share & tools
lore
#0 lore raw

Hi,

Bugfix for spice sasl authentication.

please pull,
Gerd

The following changes since commit 9e99c5fd7060267a0331d900e73fdb36047bfe0c:

tests: Fix unterminated string output visitor enum human string (2014-07-10 11:53:14 +0100)

are available in the git repository at:

git://anongit.freedesktop.org/spice/qemu tags/pull-spice-20140711-1

for you to fetch changes up to b1ea7b79e1675355ea7abe2548ad71dcf7d64b60:

spice: auth fixes (2014-07-11 10:12:47 +0200)

----------------------------------------------------------------
spice: auth fixes

----------------------------------------------------------------
Gerd Hoffmann (1):
spice: auth fixes

 ui/spice-core.c | 5 +++++
 1 file changed, 5 insertions(+)
#1 lore raw

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".

---
 ui/spice-core.c | 5 +++++
 1 file changed, 5 insertions(+)
ui/spice-core.c +5 -0
index 70df446..7bb91e6 100644
@@ -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);
Signature · 1 line
1.8.3.1
Reviewed-by
#2 lore raw
Quoted 2 lines · Gerd Hoffmann

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.

Quoted 4 lines

Also throw an error in case someone tries to set
a spice password via monitor without auth mode being "spice".

Since the patch looks fine to me:

#3 lore raw
Quoted 9 lines · Markus Armbruster
Quoted 2 lines · Gerd Hoffmann

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.

Quoted 8 lines
Quoted 4 lines

Also throw an error in case someone tries to set
a spice password via monitor without auth mode being "spice".

Since the patch looks fine to me:

Bit late now, given this is the pullreq; original patch was on list for review 2 July.

thanks
-- PMM

#4 lore raw
Quoted 13 lines · Peter Maydell
Quoted 12 lines · Markus Armbruster
Quoted 2 lines · Gerd Hoffmann

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.

Quoted 3 lines

Also throw an error in case someone tries to set
a spice password via monitor without auth mode being "spice".

Quoted 8 lines
Quoted 5 lines
Quoted 1 line

Since the patch looks fine to me:

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 %-}

#5 lore raw
In reply to Gerd Hoffmann
Quoted 17 lines · Gerd Hoffmann

Hi,

Bugfix for spice sasl authentication.

please pull,
Gerd

The following changes since commit 9e99c5fd7060267a0331d900e73fdb36047bfe0c:

tests: Fix unterminated string output visitor enum human string (2014-07-10 11:53:14 +0100)

are available in the git repository at:

git://anongit.freedesktop.org/spice/qemu tags/pull-spice-20140711-1

for you to fetch changes up to b1ea7b79e1675355ea7abe2548ad71dcf7d64b60:

Quoted 8 lines

spice: auth fixes (2014-07-11 10:12:47 +0200)

----------------------------------------------------------------
spice: auth fixes

----------------------------------------------------------------
Gerd Hoffmann (1):
spice: auth fixes

Applied, thanks.

-- PMM