Correct non-basicauth and command-line user:pass being read-only

This commit is contained in:
Lauri Kasanen
2020-10-14 14:27:08 +03:00
parent 0c83a86bc8
commit 36deba3a75

View File

@@ -1027,6 +1027,11 @@ bool VNCSConnectionST::getPerms(bool &write, bool &owner) const
{ {
bool found = false; bool found = false;
const char *colon = strchr(basicauth, ':'); const char *colon = strchr(basicauth, ':');
if (!colon || colon[1]) {
// We're running without basicauth, or with both user:pass on the command line
write = true;
return true;
}
if (colon && !colon[1] && user[0]) { if (colon && !colon[1] && user[0]) {
struct kasmpasswd_t *set = readkasmpasswd(kasmpasswdpath); struct kasmpasswd_t *set = readkasmpasswd(kasmpasswdpath);
unsigned i; unsigned i;