aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ui/vnc.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/ui/vnc.c b/ui/vnc.c
index 02b71bcd2c..8ee39bc030 100644
--- a/ui/vnc.c
+++ b/ui/vnc.c
@@ -2794,7 +2794,9 @@ int vnc_display_disable_login(DisplayState *ds)
}
vs->password = NULL;
- vs->auth = VNC_AUTH_VNC;
+ if (vs->auth == VNC_AUTH_NONE) {
+ vs->auth = VNC_AUTH_VNC;
+ }
return 0;
}
@@ -2818,7 +2820,9 @@ int vnc_display_password(DisplayState *ds, const char *password)
vs->password = NULL;
}
vs->password = g_strdup(password);
- vs->auth = VNC_AUTH_VNC;
+ if (vs->auth == VNC_AUTH_NONE) {
+ vs->auth = VNC_AUTH_VNC;
+ }
return 0;
}