From: Gerd Hoffmann <kraxel@redhat.com>
To: qemu-devel@nongnu.org
Cc: Gerd Hoffmann <kraxel@redhat.com>,
Christophe Fergeau <cfergeau@redhat.com>
Subject: [Qemu-devel] [PULL 3/4] Fix corner-case when using VNC+SASL+SPICE
Date: Mon, 18 Jan 2016 16:53:43 +0100 [thread overview]
Message-ID: <1453132424-15520-4-git-send-email-kraxel@redhat.com> (raw)
In-Reply-To: <1453132424-15520-1-git-send-email-kraxel@redhat.com>
From: Christophe Fergeau <cfergeau@redhat.com>
Similarly to the commit 764eb39d1b6 fixing VNC+SASL+QXL, when starting
QEMU with SPICE but no SASL, and at the same time VNC with SASL, then
spice_server_init() will get called without a previous call to
spice_server_set_sasl_appname(), which will cause cyrus-sasl to
try to use /etc/sasl2/spice.conf (spice-server uses "spice" as its
default appname) rather than the expected /etc/sasl2/qemu.conf.
This commit unconditionally calls spice_server_set_sasl_appname()
before calling spice_server_init() in order to use the correct appname
even if SPICE without SASL was requested on qemu command line.
Signed-off-by: Christophe Fergeau <cfergeau@redhat.com>
Message-id: 1452607738-1521-1-git-send-email-cfergeau@redhat.com
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
ui/spice-core.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/ui/spice-core.c b/ui/spice-core.c
index 6a62d71..8f27768 100644
--- a/ui/spice-core.c
+++ b/ui/spice-core.c
@@ -727,8 +727,7 @@ void qemu_spice_init(void)
qemu_spice_set_passwd(password, false, false);
}
if (qemu_opt_get_bool(opts, "sasl", 0)) {
- if (spice_server_set_sasl_appname(spice_server, "qemu") == -1 ||
- spice_server_set_sasl(spice_server, 1) == -1) {
+ if (spice_server_set_sasl(spice_server, 1) == -1) {
error_report("spice: failed to enable sasl");
exit(1);
}
@@ -794,6 +793,7 @@ void qemu_spice_init(void)
seamless_migration = qemu_opt_get_bool(opts, "seamless-migration", 0);
spice_server_set_seamless_migration(spice_server, seamless_migration);
+ spice_server_set_sasl_appname(spice_server, "qemu");
if (spice_server_init(spice_server, &core_interface) != 0) {
error_report("failed to initialize spice server");
exit(1);
--
1.8.3.1
next prev parent reply other threads:[~2016-01-18 15:53 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-18 15:53 [Qemu-devel] [PULL 0/4] ui patch queue Gerd Hoffmann
2016-01-18 15:53 ` [Qemu-devel] [PULL 1/4] gtk: implement set_echo Gerd Hoffmann
2016-01-18 15:53 ` [Qemu-devel] [PULL 2/4] vnc: clear vs->tlscreds after unparenting it Gerd Hoffmann
2016-01-18 15:53 ` Gerd Hoffmann [this message]
2016-01-18 15:53 ` [Qemu-devel] [PULL 4/4] vnc: fix tls-creds error message Gerd Hoffmann
2016-01-18 17:09 ` [Qemu-devel] [PULL 0/4] ui patch queue Peter Maydell
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=1453132424-15520-4-git-send-email-kraxel@redhat.com \
--to=kraxel@redhat.com \
--cc=cfergeau@redhat.com \
--cc=qemu-devel@nongnu.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).