aboutsummaryrefslogtreecommitdiff
path: root/ui/vnc.c
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2021-06-04 14:09:15 +0200
committerPaolo Bonzini <pbonzini@redhat.com>2021-06-15 17:17:09 +0200
commitb65310ab34cbada47a5570c94d6f8f5efd39d171 (patch)
tree66fe7509aafcb2c5a644635bcbc8e94e29b483b2 /ui/vnc.c
parent1ea06abceec61b6f3ab33dadb0510b6e09fb61e2 (diff)
vnc: avoid deprecation warnings for SASL on OS X
Apple has deprecated sasl.h functions in OS X 10.11. Therefore, all files that use SASL API need to disable -Wdeprecated-declarations. Remove the only use that is outside vnc-auth-sasl.c and add the relevant #pragma GCC diagnostic there. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Message-Id: <20210604120915.286195-1-pbonzini@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'ui/vnc.c')
-rw-r--r--ui/vnc.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/ui/vnc.c b/ui/vnc.c
index b3d4d7b9a5..f0a1550d58 100644
--- a/ui/vnc.c
+++ b/ui/vnc.c
@@ -4154,14 +4154,8 @@ void vnc_display_open(const char *id, Error **errp)
trace_vnc_auth_init(vd, 1, vd->ws_auth, vd->ws_subauth);
#ifdef CONFIG_VNC_SASL
- if (sasl) {
- int saslErr = sasl_server_init(NULL, "qemu");
-
- if (saslErr != SASL_OK) {
- error_setg(errp, "Failed to initialize SASL auth: %s",
- sasl_errstring(saslErr, NULL, NULL));
- goto fail;
- }
+ if (sasl && !vnc_sasl_server_init(errp)) {
+ goto fail;
}
#endif
vd->lock_key_sync = lock_key_sync;