summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--vnc.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/vnc.c b/vnc.c
index d79dfd9a3a..b09921a7e4 100644
--- a/vnc.c
+++ b/vnc.c
@@ -2193,6 +2193,11 @@ int vnc_display_password(DisplayState *ds, const char *password)
if (password && password[0]) {
if (!(vs->password = qemu_strdup(password)))
return -1;
+ if (vs->auth == VNC_AUTH_NONE) {
+ vs->auth = VNC_AUTH_VNC;
+ }
+ } else {
+ vs->auth = VNC_AUTH_NONE;
}
return 0;