vncserver: extract EnsureAtLeastOneKasmUserExists()
This commit is contained in:
@@ -42,10 +42,8 @@ $pidFile = "$vncUserDir/$host:$displayNumber.pid";
|
|||||||
$kasmAuthEnabled = 1;
|
$kasmAuthEnabled = 1;
|
||||||
&DisableVncAuth();
|
&DisableVncAuth();
|
||||||
|
|
||||||
@kasmPasswdUsers = &LoadKasmPasswdUsers();
|
if ($kasmAuthEnabled) {
|
||||||
if ($kasmAuthEnabled && !&AtLeastOneUserConfigured()) {
|
&EnsureAtLeastOneKasmUserExists();
|
||||||
&GuideUserToSetupKasmPasswdUser();
|
|
||||||
@kasmPasswdUsers = &LoadKasmPasswdUsers();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
&SetupXauthorityFile();
|
&SetupXauthorityFile();
|
||||||
@@ -1048,3 +1046,11 @@ sub PrepareDefaultsForPassingToXvnc {
|
|||||||
&SetReasonabeDefaults();
|
&SetReasonabeDefaults();
|
||||||
&LoadSystemThenUserThenMandatoryConfigs();
|
&LoadSystemThenUserThenMandatoryConfigs();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sub EnsureAtLeastOneKasmUserExists {
|
||||||
|
@kasmPasswdUsers = &LoadKasmPasswdUsers();
|
||||||
|
if (!&AtLeastOneUserConfigured()) {
|
||||||
|
&GuideUserToSetupKasmPasswdUser();
|
||||||
|
@kasmPasswdUsers = &LoadKasmPasswdUsers();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user