* [Qemu-devel] [PATCH] Fix another corner-case of using VNC+SASL+SPICE
@ 2013-10-17 12:00 Christophe Fergeau
0 siblings, 0 replies; only message in thread
From: Christophe Fergeau @ 2013-10-17 12:00 UTC (permalink / raw)
To: qemu-devel
Similarly to the previous commit fixing VNC+SASL+QXL, when starting
QEMU with SPICE but no SASL, and also 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 unconditionnally 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.
---
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 d7566b0..b8af63b 100644
--- a/ui/spice-core.c
+++ b/ui/spice-core.c
@@ -728,8 +728,7 @@ void qemu_spice_init(void)
spice_server_set_ticket(spice_server, password, 0, 0, 0);
}
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);
}
@@ -792,6 +791,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 (0 != spice_server_init(spice_server, &core_interface)) {
error_report("failed to initialize spice server");
exit(1);
--
1.8.3.1
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2013-10-17 12:01 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-17 12:00 [Qemu-devel] [PATCH] Fix another corner-case of using VNC+SASL+SPICE Christophe Fergeau
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).